From b238b37a0f9d12f87dc9b7ce1ece4bcde566a45f Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 13 Sep 2012 20:56:25 -0400 Subject: add O_PATH/O_SEARCH support to fcntl.h I'm not 100% sure that Linux's O_PATH meets the POSIX requirements for O_SEARCH, but it seems very close if not perfect. and old kernels ignore it, so O_SEARCH will still work as desired as long as the caller has read permissions to the directory. --- include/fcntl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/fcntl.h') diff --git a/include/fcntl.h b/include/fcntl.h index cbaec5da..b06c276f 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -37,7 +37,7 @@ int openat(int, const char *, int, ...); int posix_fadvise(int, off_t, off_t, int); int posix_fallocate(int, off_t, off_t); -#define O_ACCMODE 03 +#define O_ACCMODE (O_RDWR|O_SEARCH) #define O_RDONLY 00 #define O_WRONLY 01 #define O_RDWR 02 -- cgit v1.2.1