Skip to content
Snippets Groups Projects
Commit 3321c450 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard
Browse files

server: Include groups in file mode calculation if the security descriptor...

server: Include groups in file mode calculation if the security descriptor matches the current user.
parent a28c7caf
No related branches found
No related tags found
No related merge requests found
......@@ -505,15 +505,15 @@ mode_t sd_to_mode( const struct security_descriptor *sd, const SID *owner )
{
denied_mode |= (mode << 6) | (mode << 3) | mode; /* all */
}
else if (security_equal_sid( sid, owner ))
{
denied_mode |= (mode << 6); /* user only */
}
else if ((security_equal_sid( user, owner ) &&
token_sid_present( current->process->token, sid, TRUE )))
{
denied_mode |= (mode << 6) | (mode << 3); /* user + group */
}
else if (security_equal_sid( sid, owner ))
{
denied_mode |= (mode << 6); /* user only */
}
break;
case ACCESS_ALLOWED_ACE_TYPE:
aa_ace = (const ACCESS_ALLOWED_ACE *)ace;
......@@ -523,15 +523,15 @@ mode_t sd_to_mode( const struct security_descriptor *sd, const SID *owner )
{
new_mode |= (mode << 6) | (mode << 3) | mode; /* all */
}
else if (security_equal_sid( sid, owner ))
{
new_mode |= (mode << 6); /* user only */
}
else if ((security_equal_sid( user, owner ) &&
token_sid_present( current->process->token, sid, FALSE )))
{
new_mode |= (mode << 6) | (mode << 3); /* user + group */
}
else if (security_equal_sid( sid, owner ))
{
new_mode |= (mode << 6); /* user only */
}
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment