Check the return code from mbr_uid_to_uuid()/mbr_gid_to_uuid() so
authorWayne Davison <wayned@samba.org>
Sat, 23 Feb 2008 15:44:55 +0000 (07:44 -0800)
committerWayne Davison <wayned@samba.org>
Sat, 23 Feb 2008 15:44:55 +0000 (07:44 -0800)
that the user sees the right error if they failed.

lib/sysacls.c

index 008e4c1..26ae86b 100644 (file)
@@ -2703,6 +2703,8 @@ int sys_acl_set_info(SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T tag_type, uint32 bits,
                rc = mbr_uid_to_uuid(u_g_id, uu);
        else
                rc = mbr_gid_to_uuid(u_g_id, uu);
                rc = mbr_uid_to_uuid(u_g_id, uu);
        else
                rc = mbr_gid_to_uuid(u_g_id, uu);
+       if (rc != 0)
+               return rc;
 
        if (acl_set_tag_type(entry, tag_type) != 0
         || acl_set_qualifier(entry, &uu) != 0
 
        if (acl_set_tag_type(entry, tag_type) != 0
         || acl_set_qualifier(entry, &uu) != 0