summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2016-01-09 16:21:39 +0000
committerdchagin <dchagin@FreeBSD.org>2016-01-09 16:21:39 +0000
commitf186d260e20055dcef427cd84b8175fb7b70b81b (patch)
tree3daa74fea849f02f303adaf7e9ab730e5dc281cf /sys/compat/linux
parent9bb36bc01cd74565fb879d43a4431edff14a2741 (diff)
downloadFreeBSD-src-f186d260e20055dcef427cd84b8175fb7b70b81b.zip
FreeBSD-src-f186d260e20055dcef427cd84b8175fb7b70b81b.tar.gz
MFC r283428:
Change linux faccessat syscall definition to match actual linux one. The AT_EACCESS and AT_SYMLINK_NOFOLLOW flags are actually implemented within the glibc wrapper function for faccessat(). If either of these flags are specified, then the wrapper function employs fstatat() to determine access permissions.
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/linux_file.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 3e8e818..9c49cbc 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -580,10 +580,8 @@ int
linux_faccessat(struct thread *td, struct linux_faccessat_args *args)
{
char *path;
- int error, dfd, flag;
+ int error, dfd;
- if (args->flag & ~LINUX_AT_EACCESS)
- return (EINVAL);
/* linux convention */
if (args->amode & ~(F_OK | X_OK | W_OK | R_OK))
return (EINVAL);
@@ -596,8 +594,7 @@ linux_faccessat(struct thread *td, struct linux_faccessat_args *args)
printf(ARGS(access, "%s, %d"), path, args->amode);
#endif
- flag = (args->flag & LINUX_AT_EACCESS) == 0 ? 0 : AT_EACCESS;
- error = kern_accessat(td, dfd, path, UIO_SYSSPACE, flag, args->amode);
+ error = kern_accessat(td, dfd, path, UIO_SYSSPACE, 0, args->amode);
LFREEPATH(path);
return (error);
OpenPOWER on IntegriCloud