diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-04-30 18:32:11 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-04-30 18:32:11 -0400 |
commit | 3f2d0b48cab355f34bbf18ebd49cf8f30d0ba8b5 (patch) | |
tree | e849de766e7faf5f9150b8e207c18b98b6a94ed5 /eval.c | |
parent | facf34bd2ffc16eb2a5e770d9be3d8010b4add42 (diff) | |
download | bfs-3f2d0b48cab355f34bbf18ebd49cf8f30d0ba8b5.tar.xz |
Don't forget an access mode to openat() in -empty
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -319,7 +319,7 @@ bool eval_empty(const struct expr *expr, struct eval_state *state) { struct BFTW *ftwbuf = state->ftwbuf; if (ftwbuf->typeflag == BFTW_DIR) { - int flags = 0; + int flags = O_RDONLY | O_CLOEXEC; #ifdef O_DIRECTORY flags |= O_DIRECTORY; #endif |