nspawn: normalize pivot_root paths
Originally reported on yeswehack.com as:
YWH-PGM9780-116
Follow-up for b53ede699c
This commit is contained in:
@@ -1370,7 +1370,9 @@ int pivot_root_parse(char **pivot_root_new, char **pivot_root_old, const char *s
|
||||
|
||||
if (!path_is_absolute(root_new))
|
||||
return -EINVAL;
|
||||
if (root_old && !path_is_absolute(root_old))
|
||||
if (!path_is_normalized(root_new))
|
||||
return -EINVAL;
|
||||
if (root_old && (!path_is_absolute(root_old) || !path_is_normalized(root_old)))
|
||||
return -EINVAL;
|
||||
|
||||
free_and_replace(*pivot_root_new, root_new);
|
||||
|
||||
Reference in New Issue
Block a user