diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-28 14:09:30 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-28 14:09:30 +0200 |
commit | 2012f8697caabceb3e45260367fe3524dba7015f (patch) | |
tree | 8a0c5e1b1e75d9e1d3578abfb5412c67648aeebd /nq.c | |
parent | 7a28310a3ed18524c0ec7ee97f7f48e95b1d92a9 (diff) | |
download | nq-2012f8697caabceb3e45260367fe3524dba7015f.tar.gz nq-2012f8697caabceb3e45260367fe3524dba7015f.tar.xz nq-2012f8697caabceb3e45260367fe3524dba7015f.zip |
nq: open dirfd with O_DIRECTORY to fail early
Diffstat (limited to 'nq.c')
-rw-r--r-- | nq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nq.c b/nq.c index a324bd3..04223bd 100644 --- a/nq.c +++ b/nq.c @@ -121,7 +121,7 @@ usage: } } - dirfd = open(path, O_RDONLY); + dirfd = open(path, O_RDONLY | O_DIRECTORY); if (dirfd < 0) { perror("dir open"); exit(111); |