diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-06 17:59:32 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-06 17:59:32 +0100 |
commit | 5cdd120f0c6423a42fa2eec2311126142a9a49f0 (patch) | |
tree | ca688521c96d2cc58d4bf72ce486023741a8106e /archival | |
parent | 0a90960f446ebaf062244afbc626546b14689e0a (diff) | |
download | busybox-w32-5cdd120f0c6423a42fa2eec2311126142a9a49f0.tar.gz busybox-w32-5cdd120f0c6423a42fa2eec2311126142a9a49f0.tar.bz2 busybox-w32-5cdd120f0c6423a42fa2eec2311126142a9a49f0.zip |
unzip: do not set directory mode to 0777
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882177
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r-- | archival/unzip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/archival/unzip.c b/archival/unzip.c index 653fdd10f..da4b2a544 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -336,7 +336,9 @@ static void unzip_create_leading_dirs(const char *fn) | |||
336 | { | 336 | { |
337 | /* Create all leading directories */ | 337 | /* Create all leading directories */ |
338 | char *name = xstrdup(fn); | 338 | char *name = xstrdup(fn); |
339 | if (bb_make_directory(dirname(name), 0777, FILEUTILS_RECUR)) { | 339 | |
340 | /* mode of -1: set mode according to umask */ | ||
341 | if (bb_make_directory(dirname(name), -1, FILEUTILS_RECUR)) { | ||
340 | xfunc_die(); /* bb_make_directory is noisy */ | 342 | xfunc_die(); /* bb_make_directory is noisy */ |
341 | } | 343 | } |
342 | free(name); | 344 | free(name); |