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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user