PERFORCE change 106545 for review
Roman Divacky
rdivacky at FreeBSD.org
Sat Sep 23 03:36:27 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106545
Change 106545 by rdivacky at rdivacky_witten on 2006/09/23 10:35:33
Return EINVAL instead of EACCESS if invalid access mode is entered.
Affected files ...
.. //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#4 edit
Differences ...
==== //depot/projects/linuxolator/src/sys/compat/linux/linux_file.c#4 (text+ko) ====
@@ -49,6 +49,7 @@
#include <sys/syscallsubr.h>
#include <sys/sysproto.h>
#include <sys/tty.h>
+#include <sys/unistd.h>
#include <sys/vnode.h>
#include <ufs/ufs/extattr.h>
@@ -480,6 +481,10 @@
char *path;
int error;
+ /* linux convention */
+ if (args->flags & ~(F_OK | X_OK | W_OK | R_OK))
+ return (EINVAL);
+
LCONVPATHEXIST(td, args->path, &path);
#ifdef DEBUG
@@ -488,6 +493,7 @@
#endif
error = kern_access(td, path, UIO_SYSSPACE, args->flags);
LFREEPATH(path);
+
return (error);
}
More information about the p4-projects
mailing list