summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-20 08:50:52 -0500
committerAnthony G. Basile <blueness@gentoo.org>2014-12-20 08:50:52 -0500
commitc26b217d918a571104a072eec5068ac8ad94329e (patch)
treeb7b986fc90dc1d7b0e853a9e1c44d5b1f7f92a8e /src/shared/util.h
parent6b16cd5fedbcb4ca5162ee263ae9a16533390465 (diff)
util: when using basename() for creating temporary files, verify the resulting name is actually valid
Also, rename filename_is_safe() to filename_is_valid(), since it actually does a full validation for what the kernel will accept as file name, it's not just a heuristic. NOTE: eudev doesn't have filename_is_safe() -- AGB Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index 21e977dc51..5cc8452407 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -453,7 +453,7 @@ union file_handle_union {
char padding[sizeof(struct file_handle) + MAX_HANDLE_SZ];
};
-char *tempfn_xxxxxx(const char *p);
+int tempfn_xxxxxx(const char *p, char **ret);
int is_dir(const char *path, bool follow);