diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-10-27 16:28:15 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-11-17 11:13:44 +0100 |
commit | 99be45a46fc9b45046a0f7b83a9f3e321f29d2da (patch) | |
tree | 725cda8b33bb95a6eb2dd5bf29f9ea0d405db178 /src/mount/mount-tool.c | |
parent | 5db9818772757bd6ad431a17cecc38320211c72b (diff) | |
download | systemd-99be45a46fc9b45046a0f7b83a9f3e321f29d2da.tar.gz |
fs-util: rename path_is_safe() → path_is_normalized()
Already, path_is_safe() refused paths container the "." dir. Doing that
isn't strictly necessary to be "safe" by most definitions of the word.
But it is necessary in order to consider a path "normalized". Hence,
"path_is_safe()" is slightly misleading a name, but
"path_is_normalize()" is more descriptive, hence let's rename things
accordingly.
No functional changes.
Diffstat (limited to 'src/mount/mount-tool.c')
-rw-r--r-- | src/mount/mount-tool.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index 7bd40613c3..f6e845e04a 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -886,8 +886,8 @@ static int stop_mounts( return -EINVAL; } - if (!path_is_safe(where)) { - log_error("Path contains unsafe components: %s", where); + if (!path_is_normalized(where)) { + log_error("Path contains non-normalized components: %s", where); return -EINVAL; } @@ -1568,8 +1568,8 @@ int main(int argc, char* argv[]) { goto finish; } - if (!path_is_safe(arg_mount_what)) { - log_error("Path contains unsafe components: %s", arg_mount_what); + if (!path_is_normalized(arg_mount_what)) { + log_error("Path contains non-normalized components: %s", arg_mount_what); r = -EINVAL; goto finish; } @@ -1592,8 +1592,8 @@ int main(int argc, char* argv[]) { goto finish; } - if (!path_is_safe(arg_mount_where)) { - log_error("Path contains unsafe components: %s", arg_mount_where); + if (!path_is_normalized(arg_mount_where)) { + log_error("Path contains non-normalized components: %s", arg_mount_where); r = -EINVAL; goto finish; } |