From: Jeremy Allison Date: Fri, 25 Jan 2008 02:22:41 +0000 (-0800) Subject: Fix the same bug with user -> user_obj. X-Git-Tag: samba-3.0.28a~39 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=485cedadb0e61775e6cb152f42f4dfdf17e82666;p=samba.git Fix the same bug with user -> user_obj. Jeremy. --- diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 21ad4222a15..f40a344124e 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -1402,7 +1402,13 @@ static BOOL create_canon_ace_lists(files_struct *fsp, SMB_STRUCT_STAT *pst, } else if (sid_to_uid( ¤t_ace->trustee, ¤t_ace->unix_ug.uid)) { current_ace->owner_type = UID_ACE; - current_ace->type = SMB_ACL_USER; + /* If it's the owning user, this is a user_obj, not + * a user. */ + if (current_ace->unix_ug.uid == pst->st_uid) { + current_ace->type = SMB_ACL_USER_OBJ; + } else { + current_ace->type = SMB_ACL_USER; + } } else if (sid_to_gid( ¤t_ace->trustee, ¤t_ace->unix_ug.gid)) { current_ace->owner_type = GID_ACE; /* If it's the primary group, this is a group_obj, not