diff options
author | Jim Meyering <jim@meyering.net> | 2005-12-23 08:28:14 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-12-23 08:28:14 +0000 |
commit | bd80c2e5a73be2a92fab9796df83f109c0f16399 (patch) | |
tree | a0f12c01dbabe2b60fa01c20ce218ab6ab7b6c56 /lib/chdir-safer.c | |
parent | 6ed15904b1a59abc541279afdeb8078f68f458b9 (diff) | |
download | coreutils-bd80c2e5a73be2a92fab9796df83f109c0f16399.tar.xz |
(O_NOFOLLOW): Define, if necessary.
Diffstat (limited to 'lib/chdir-safer.c')
-rw-r--r-- | lib/chdir-safer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chdir-safer.c b/lib/chdir-safer.c index e97b2fce6..e77924fb1 100644 --- a/lib/chdir-safer.c +++ b/lib/chdir-safer.c @@ -34,6 +34,10 @@ #include "fcntl--.h" /* for the open->open_safer mapping */ +#if !defined O_NOFOLLOW +# define O_NOFOLLOW 0 +#endif + /* Assuming we can use open-with-O_NOFOLLOW, open DIR and fchdir into it -- but fail (setting errno to EACCES) if anyone replaces it with a symlink, or otherwise changes its type. Return zero upon success. */ |