Workaround owner/group SIDs being NULL
* sec_acl.cc (set_posix_access): Workaround owner/group SIDs being NULL. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
baacff7c79
commit
de67909ac1
|
@ -1,3 +1,7 @@
|
||||||
|
2015-04-16 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* sec_acl.cc (set_posix_access): Workaround owner/group SIDs being NULL.
|
||||||
|
|
||||||
2015-04-15 Corinna Vinschen <corinna@vinschen.de>
|
2015-04-15 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* sec_acl.cc (set_posix_access): Handle files with owner == group.
|
* sec_acl.cc (set_posix_access): Handle files with owner == group.
|
||||||
|
|
|
@ -141,7 +141,7 @@ set_posix_access (mode_t attr, uid_t uid, gid_t gid,
|
||||||
mode_t class_obj = 0, other_obj, group_obj, deny;
|
mode_t class_obj = 0, other_obj, group_obj, deny;
|
||||||
DWORD access;
|
DWORD access;
|
||||||
int idx, start_idx, class_idx, tmp_idx;
|
int idx, start_idx, class_idx, tmp_idx;
|
||||||
bool owner_eq_group;
|
bool owner_eq_group = false;
|
||||||
bool dev_saw_admins = false;
|
bool dev_saw_admins = false;
|
||||||
|
|
||||||
/* Initialize local security descriptor. */
|
/* Initialize local security descriptor. */
|
||||||
|
@ -166,7 +166,10 @@ set_posix_access (mode_t attr, uid_t uid, gid_t gid,
|
||||||
__seterrno_from_nt_status (status);
|
__seterrno_from_nt_status (status);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
owner_eq_group = RtlEqualSid (owner, group);
|
/* If the account DBs are broken, we might end up without SIDs. Better
|
||||||
|
check them here. */
|
||||||
|
if (owner && group)
|
||||||
|
owner_eq_group = RtlEqualSid (owner, group);
|
||||||
|
|
||||||
/* No POSIX ACL? Use attr to generate one from scratch. */
|
/* No POSIX ACL? Use attr to generate one from scratch. */
|
||||||
if (!aclbufp)
|
if (!aclbufp)
|
||||||
|
|
Loading…
Reference in New Issue