Fix the same bug with user -> user_obj.
authorJeremy Allison <jra@samba.org>
Fri, 25 Jan 2008 02:22:41 +0000 (18:22 -0800)
committerJeremy Allison <jra@samba.org>
Fri, 25 Jan 2008 02:22:41 +0000 (18:22 -0800)
Jeremy.

source/smbd/posix_acls.c

index 21ad4222a15aba87404466afa1817b2e1e48c7fb..f40a344124ebca5b498306d3e16b5cbf3c5e4d42 100644 (file)
@@ -1402,7 +1402,13 @@ static BOOL create_canon_ace_lists(files_struct *fsp, SMB_STRUCT_STAT *pst,
 
                } else if (sid_to_uid( &current_ace->trustee, &current_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( &current_ace->trustee, &current_ace->unix_ug.gid)) {
                        current_ace->owner_type = GID_ACE;
                        /* If it's the primary group, this is a group_obj, not