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/basic/unit-name.c | |
parent | core: don't allow DefaultStandardOutput= be set to socket/fd:/file: (diff) | |
download | systemd-99be45a46fc9b45046a0f7b83a9f3e321f29d2da.tar.xz systemd-99be45a46fc9b45046a0f7b83a9f3e321f29d2da.zip |
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/basic/unit-name.c')
-rw-r--r-- | src/basic/unit-name.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c index 27ce432197..d37b75b72f 100644 --- a/src/basic/unit-name.c +++ b/src/basic/unit-name.c @@ -382,7 +382,7 @@ int unit_name_path_escape(const char *f, char **ret) { if (STR_IN_SET(p, "/", "")) s = strdup("-"); else { - if (!path_is_safe(p)) + if (!path_is_normalized(p)) return -EINVAL; /* Truncate trailing slashes */ @@ -432,7 +432,7 @@ int unit_name_path_unescape(const char *f, char **ret) { if (!s) return -ENOMEM; - if (!path_is_safe(s)) { + if (!path_is_normalized(s)) { free(s); return -EINVAL; } |