diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-06-11 13:42:21 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2010-06-11 13:42:21 +0300 |
commit | 43cb554c3fd94ba394b708265c5fa2225a37a9eb (patch) | |
tree | ff9708008237754d46c3c2188cdb866a4d0fd195 /src/archive.c | |
parent | bcbe575c3b28997a03a65426b241bdfef4d8b747 (diff) | |
download | apk-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/archive.c')
-rw-r--r-- | src/archive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/archive.c b/src/archive.c index 2df93d9..e7260b6 100644 --- a/src/archive.c +++ b/src/archive.c @@ -355,7 +355,7 @@ int apk_archive_entry_extract(int atfd, const struct apk_file_info *ae, break; case S_IFREG: if (ae->link_target == NULL) { - int flags = O_RDWR | O_CREAT | O_TRUNC; + int flags = O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC; fd = openat(atfd, fn, flags, ae->mode & 07777); if (fd < 0) { |