user-util: simplify paths retrieved from $HOME and $SHELL
Let's add some extra paranoia, after #11910
This commit is contained in:
@@ -463,7 +463,7 @@ int get_home_dir(char **_h) {
|
||||
if (!h)
|
||||
return -ENOMEM;
|
||||
|
||||
*_h = h;
|
||||
*_h = path_simplify(h, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ int get_home_dir(char **_h) {
|
||||
if (!h)
|
||||
return -ENOMEM;
|
||||
|
||||
*_h = h;
|
||||
*_h = path_simplify(h, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ int get_shell(char **_s) {
|
||||
if (!s)
|
||||
return -ENOMEM;
|
||||
|
||||
*_s = s;
|
||||
*_s = path_simplify(s, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ int get_shell(char **_s) {
|
||||
if (!s)
|
||||
return -ENOMEM;
|
||||
|
||||
*_s = s;
|
||||
*_s = path_simplify(s, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user