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>
This commit is contained in:
Denys Vlasenko
2018-02-06 17:59:32 +01:00
parent 0a90960f44
commit 5cdd120f0c
2 changed files with 13 additions and 7 deletions

View File

@@ -336,7 +336,9 @@ static void unzip_create_leading_dirs(const char *fn)
{
/* Create all leading directories */
char *name = xstrdup(fn);
if (bb_make_directory(dirname(name), 0777, FILEUTILS_RECUR)) {
/* mode of -1: set mode according to umask */
if (bb_make_directory(dirname(name), -1, FILEUTILS_RECUR)) {
xfunc_die(); /* bb_make_directory is noisy */
}
free(name);