Fixed enabling permissions when no UserMapping file is found
parent
7449af78ca
commit
d9f8647ef9
|
@ -3732,9 +3732,7 @@ static char *parse_mount_options(const char *orig_opts)
|
|||
goto err_exit;
|
||||
sscanf(val, "%o", &ctx->fmask);
|
||||
ctx->dmask = ctx->fmask;
|
||||
#if !POSIXACLS
|
||||
default_permissions = 1;
|
||||
#endif
|
||||
want_permissions = 1;
|
||||
} else if (!strcmp(opt, "fmask")) {
|
||||
if (missing_option_value(val, "fmask"))
|
||||
goto err_exit;
|
||||
|
@ -4387,8 +4385,14 @@ int main(int argc, char *argv[])
|
|||
/* same ownership/permissions for all files */
|
||||
ctx->security.mapping[MAPUSERS] = (struct MAPPING*)NULL;
|
||||
ctx->security.mapping[MAPGROUPS] = (struct MAPPING*)NULL;
|
||||
if (ctx->secure_flags & (1 << SECURITY_WANTED))
|
||||
if ((ctx->secure_flags & (1 << SECURITY_WANTED))
|
||||
&& !(ctx->secure_flags & (1 << SECURITY_DEFAULT))) {
|
||||
ctx->secure_flags |= (1 << SECURITY_DEFAULT);
|
||||
if (strappend(&parsed_options, ",default_permissions")) {
|
||||
err = NTFS_VOLUME_SYNTAX_ERROR;
|
||||
goto err_out;
|
||||
}
|
||||
}
|
||||
if (ctx->secure_flags & (1 << SECURITY_DEFAULT)) {
|
||||
ctx->secure_flags |= (1 << SECURITY_RAW);
|
||||
permissions_mode = "Global ownership and permissions enforced";
|
||||
|
|
|
@ -3702,9 +3702,7 @@ static char *parse_mount_options(const char *orig_opts)
|
|||
goto err_exit;
|
||||
sscanf(val, "%o", &ctx->fmask);
|
||||
ctx->dmask = ctx->fmask;
|
||||
#if !POSIXACLS
|
||||
default_permissions = 1;
|
||||
#endif
|
||||
want_permissions = 1;
|
||||
} else if (!strcmp(opt, "fmask")) {
|
||||
if (missing_option_value(val, "fmask"))
|
||||
goto err_exit;
|
||||
|
@ -4361,8 +4359,14 @@ int main(int argc, char *argv[])
|
|||
/* same ownership/permissions for all files */
|
||||
ctx->security.mapping[MAPUSERS] = (struct MAPPING*)NULL;
|
||||
ctx->security.mapping[MAPGROUPS] = (struct MAPPING*)NULL;
|
||||
if (ctx->secure_flags & (1 << SECURITY_WANTED))
|
||||
if ((ctx->secure_flags & (1 << SECURITY_WANTED))
|
||||
&& !(ctx->secure_flags & (1 << SECURITY_DEFAULT))) {
|
||||
ctx->secure_flags |= (1 << SECURITY_DEFAULT);
|
||||
if (strappend(&parsed_options, ",default_permissions")) {
|
||||
err = NTFS_VOLUME_SYNTAX_ERROR;
|
||||
goto err_out;
|
||||
}
|
||||
}
|
||||
if (ctx->secure_flags & (1 << SECURITY_DEFAULT)) {
|
||||
ctx->secure_flags |= (1 << SECURITY_RAW);
|
||||
permissions_mode = "Global ownership and permissions enforced";
|
||||
|
|
Loading…
Reference in New Issue