diff options
author | Christoph Hellwig <hch@lst.de> | 2020-07-22 11:14:02 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-07-31 08:17:53 +0200 |
commit | eb9d7d390e51108b4c6a9a7993ed9be92548c8f7 (patch) | |
tree | 6881b1da19a06e63f1c4d6ba81403dfe94697553 /include/linux | |
parent | 1097742efc643ffc667c5c6684635b2663145a7d (diff) |
init: add an init_eaccess helper
Add a simple helper to check if a file exists based on kernel space file
name and switch the early init code over to it. Note that this
theoretically changes behavior as it always is based on the effective
permissions. But during early init that doesn't make a difference.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/init_syscalls.h | 1 | ||||
-rw-r--r-- | include/linux/syscalls.h | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/include/linux/init_syscalls.h b/include/linux/init_syscalls.h index 2b1b4dc58682..7031c0934bee 100644 --- a/include/linux/init_syscalls.h +++ b/include/linux/init_syscalls.h @@ -7,5 +7,6 @@ int __init init_chdir(const char *filename); int __init init_chroot(const char *filename); int __init init_chown(const char *filename, uid_t user, gid_t group, int flags); int __init init_chmod(const char *filename, umode_t mode); +int __init init_eaccess(const char *filename); int __init init_unlink(const char *pathname); int __init init_rmdir(const char *pathname); diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 8b71fa321ca2..a2779638e414 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -1304,13 +1304,6 @@ static inline long ksys_link(const char __user *oldname, return do_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0); } -long do_faccessat(int dfd, const char __user *filename, int mode, int flags); - -static inline long ksys_access(const char __user *filename, int mode) -{ - return do_faccessat(AT_FDCWD, filename, mode, 0); -} - extern int do_fchownat(int dfd, const char __user *filename, uid_t user, gid_t group, int flag); |