s3-lsa: Fix pointless check for sec_info flags in _lsa_QuerySecurity().
authorGünther Deschner <gd@samba.org>
Thu, 16 Jul 2009 16:37:19 +0000 (18:37 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 16 Jul 2009 22:13:29 +0000 (00:13 +0200)
Guenther

source3/rpc_server/srv_lsa_nt.c

index 1243787503181d6b88c7e045ac0992a266cb81a8..1a6d3bae16e7848f7fbd59c6b562bb8b3faee756 100644 (file)
@@ -1992,19 +1992,9 @@ NTSTATUS _lsa_QuerySecurity(pipes_struct *p,
                return status;
        }
 
                return status;
        }
 
-       switch (r->in.sec_info) {
-       case 1:
-               /* SD contains only the owner */
-               if((*r->out.sdbuf = make_sec_desc_buf(p->mem_ctx, sd_size, psd)) == NULL)
-                       return NT_STATUS_NO_MEMORY;
-               break;
-       case 4:
-               /* SD contains only the ACL */
-               if((*r->out.sdbuf = make_sec_desc_buf(p->mem_ctx, sd_size, psd)) == NULL)
-                       return NT_STATUS_NO_MEMORY;
-               break;
-       default:
-               return NT_STATUS_INVALID_LEVEL;
+       *r->out.sdbuf = make_sec_desc_buf(p->mem_ctx, sd_size, psd);
+       if (!*r->out.sdbuf) {
+               return NT_STATUS_NO_MEMORY;
        }
 
        return status;
        }
 
        return status;