summaryrefslogtreecommitdiff
path: root/src/audit.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-06-11 13:42:21 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-06-11 13:42:21 +0300
commit43cb554c3fd94ba394b708265c5fa2225a37a9eb (patch)
treeff9708008237754d46c3c2188cdb866a4d0fd195 /src/audit.c
parentbcbe575c3b28997a03a65426b241bdfef4d8b747 (diff)
downloadapk-tools-43cb554c3fd94ba394b708265c5fa2225a37a9eb.tar.gz
apk-tools-43cb554c3fd94ba394b708265c5fa2225a37a9eb.tar.bz2
apk-tools-43cb554c3fd94ba394b708265c5fa2225a37a9eb.tar.xz
apk-tools-43cb554c3fd94ba394b708265c5fa2225a37a9eb.zip
various: use O_CLOEXEC and add some error checking
Diffstat (limited to 'src/audit.c')
-rw-r--r--src/audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audit.c b/src/audit.c
index 9867227..ca0945e 100644
--- a/src/audit.c
+++ b/src/audit.c
@@ -55,7 +55,7 @@ static int audit_directory(apk_hash_item item, void *ctx)
if (!(dbd->flags & APK_DBDIRF_PROTECTED))
return 0;
- dir = fdopendir(openat(db->root_fd, dbd->name, O_RDONLY));
+ dir = fdopendir(openat(db->root_fd, dbd->name, O_RDONLY | O_CLOEXEC));
if (dir == NULL)
return 0;