Fix mode constants not in octal.
This commit is contained in:
parent
3e80b9d407
commit
4ffd6f5e20
|
@ -962,7 +962,7 @@ static int init_chain(const char* target)
|
||||||
mountpoints_mount(true);
|
mountpoints_mount(true);
|
||||||
snprintf(chain_location_dev, sizeof(chain_location_dev), "%s/dev",
|
snprintf(chain_location_dev, sizeof(chain_location_dev), "%s/dev",
|
||||||
chain_location);
|
chain_location);
|
||||||
if ( mkdir(chain_location_dev, 755) < 0 && errno != EEXIST )
|
if ( mkdir(chain_location_dev, 0755) < 0 && errno != EEXIST )
|
||||||
fatal("mkdir: %s: %m", chain_location_dev);
|
fatal("mkdir: %s: %m", chain_location_dev);
|
||||||
int old_dev_fd = open("/dev", O_DIRECTORY | O_RDONLY);
|
int old_dev_fd = open("/dev", O_DIRECTORY | O_RDONLY);
|
||||||
if ( old_dev_fd < 0 )
|
if ( old_dev_fd < 0 )
|
||||||
|
|
|
@ -699,7 +699,7 @@ static void ExtractTo(Ref<Descriptor> desc,
|
||||||
char* prev = strdup(path);
|
char* prev = strdup(path);
|
||||||
if ( !prev )
|
if ( !prev )
|
||||||
PanicF("%s: strdup: %m", path);
|
PanicF("%s: strdup: %m", path);
|
||||||
if ( ExtractTo_mkdir(desc, &ctx->ioctx, dirname(prev), 755) < 0 )
|
if ( ExtractTo_mkdir(desc, &ctx->ioctx, dirname(prev), 0755) < 0 )
|
||||||
PanicF("%s: mkdir -p: %s: %m", path, prev);
|
PanicF("%s: mkdir -p: %s: %m", path, prev);
|
||||||
free(prev);
|
free(prev);
|
||||||
file = desc->open(&ctx->ioctx, path, oflags, 0644);
|
file = desc->open(&ctx->ioctx, path, oflags, 0644);
|
||||||
|
|
|
@ -742,7 +742,7 @@ class object* create_user::command_line(const char* command)
|
||||||
user.pw_passwd = strdup(answers[1]);
|
user.pw_passwd = strdup(answers[1]);
|
||||||
user.pw_shell = strdup("sh");
|
user.pw_shell = strdup("sh");
|
||||||
|
|
||||||
mkdir(user.pw_dir, 777);
|
mkdir(user.pw_dir, 0777);
|
||||||
|
|
||||||
fp = fopen("/etc/passwd", "a");
|
fp = fopen("/etc/passwd", "a");
|
||||||
fprintf(fp, "%s:%s:%ju:%ju:%s:%s:%s\n",
|
fprintf(fp, "%s:%s:%ju:%ju:%s:%s:%s\n",
|
||||||
|
|
Loading…
Reference in New Issue