svn commit: r250447 - in user/dchagin/lemul/sys: amd64/linux amd64/linux32 compat/linux i386/linux

Dmitry Chagin dchagin at FreeBSD.org
Fri May 10 11:10:59 UTC 2013


Author: dchagin
Date: Fri May 10 11:10:58 2013
New Revision: 250447
URL: http://svnweb.freebsd.org/changeset/base/250447

Log:
  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.

Modified:
  user/dchagin/lemul/sys/amd64/linux/syscalls.master
  user/dchagin/lemul/sys/amd64/linux32/syscalls.master
  user/dchagin/lemul/sys/compat/linux/linux_file.c
  user/dchagin/lemul/sys/i386/linux/syscalls.master

Modified: user/dchagin/lemul/sys/amd64/linux/syscalls.master
==============================================================================
--- user/dchagin/lemul/sys/amd64/linux/syscalls.master	Fri May 10 11:08:46 2013	(r250446)
+++ user/dchagin/lemul/sys/amd64/linux/syscalls.master	Fri May 10 11:10:58 2013	(r250447)
@@ -446,7 +446,7 @@
 268	AUE_FCHMODAT	STD	{ int linux_fchmodat(l_int dfd, const char *filename, \
 				    l_mode_t mode); }
 269	AUE_FACCESSAT	STD	{ int linux_faccessat(l_int dfd, const char *filename, \
-				    l_int amode, l_int flag); }
+				    l_int amode); }
 270	AUE_SELECT	STD	{ int linux_pselect6(l_int nfds,			\
 		    			    l_fd_set *readfds, l_fd_set *writefds,	\
 					    l_fd_set *exceptfds,			\

Modified: user/dchagin/lemul/sys/amd64/linux32/syscalls.master
==============================================================================
--- user/dchagin/lemul/sys/amd64/linux32/syscalls.master	Fri May 10 11:08:46 2013	(r250446)
+++ user/dchagin/lemul/sys/amd64/linux32/syscalls.master	Fri May 10 11:10:58 2013	(r250447)
@@ -504,7 +504,7 @@
 					char *buf, l_int bufsiz); }
 306	AUE_FCHMODAT	STD	{ int linux_fchmodat(l_int dfd, const char *filename, \
 					l_mode_t mode); }
-307	AUE_FACCESSAT	STD	{ int linux_faccessat(l_int dfd, const char *filename, l_int amode, int flag); }
+307	AUE_FACCESSAT	STD	{ int linux_faccessat(l_int dfd, const char *filename, l_int amode); }
 308	AUE_SELECT	STD	{ int linux_pselect6(l_int nfds,		\
 				    l_fd_set *readfds, l_fd_set *writefds,	\
 				    l_fd_set *exceptfds,			\

Modified: user/dchagin/lemul/sys/compat/linux/linux_file.c
==============================================================================
--- user/dchagin/lemul/sys/compat/linux/linux_file.c	Fri May 10 11:08:46 2013	(r250446)
+++ user/dchagin/lemul/sys/compat/linux/linux_file.c	Fri May 10 11:10:58 2013	(r250447)
@@ -582,8 +582,6 @@ linux_faccessat(struct thread *td, struc
 	char *path;
 	int error, dfd, flag;
 
-	if (args->flag & ~LINUX_AT_EACCESS)
-		return (EINVAL);
 	/* linux convention */
 	if (args->amode & ~(F_OK | X_OK | W_OK | R_OK))
 		return (EINVAL);
@@ -596,7 +594,7 @@ linux_faccessat(struct thread *td, struc
 		printf(ARGS(access, "%s, %d"), path, args->amode);
 #endif
 
-	flag = (args->flag & LINUX_AT_EACCESS) == 0 ? 0 : AT_EACCESS;
+	flag = AT_EACCESS;
 	error = kern_accessat(td, dfd, path, UIO_SYSSPACE, flag, args->amode);
 	LFREEPATH(path);
 

Modified: user/dchagin/lemul/sys/i386/linux/syscalls.master
==============================================================================
--- user/dchagin/lemul/sys/i386/linux/syscalls.master	Fri May 10 11:08:46 2013	(r250446)
+++ user/dchagin/lemul/sys/i386/linux/syscalls.master	Fri May 10 11:10:58 2013	(r250447)
@@ -514,7 +514,7 @@
 					char *buf, l_int bufsiz); }
 306	AUE_FCHMODAT	STD	{ int linux_fchmodat(l_int dfd, const char *filename, \
 					l_mode_t mode); }
-307	AUE_FACCESSAT	STD	{ int linux_faccessat(l_int dfd, const char *filename, l_int amode, l_int flag); }
+307	AUE_FACCESSAT	STD	{ int linux_faccessat(l_int dfd, const char *filename, l_int amode); }
 308	AUE_SELECT	STD	{ int linux_pselect6(l_int nfds,			\
 		    			    l_fd_set *readfds, l_fd_set *writefds,	\
 					    l_fd_set *exceptfds,			\


More information about the svn-src-user mailing list