Some simplifications
authorVolker Lendecke <vl@samba.org>
Mon, 17 Mar 2008 20:00:16 +0000 (21:00 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 17 Mar 2008 20:10:16 +0000 (21:10 +0100)
source/printing/nt_printing.c
source/smbd/uid.c
source/utils/net_rpc.c

index 04dde0e8a042f4421821c7d86682a00c5152f8cb..68b035962f22e7051bcf5435e2369ca7a3ff0ec2 100644 (file)
@@ -344,7 +344,6 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
        int result, i;
        uint32 sd_size;
        size_t size_new_sec;
-       DOM_SID sid;
 
        if (!data.dptr || data.dsize == 0) {
                return 0;
@@ -405,13 +404,10 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
 
        /* create a new SEC_DESC with the appropriate owner and group SIDs */
 
-       if (!string_to_sid(&sid, "S-1-5-32-544" )) {
-               prs_mem_free( &ps );
-               return 0;
-       }
        new_sec = make_sec_desc( ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
-               &sid, &sid,
-               NULL, NULL, &size_new_sec );
+                                &global_sid_Builtin_Administrators,
+                                &global_sid_Builtin_Administrators,
+                                NULL, NULL, &size_new_sec );
        if (!new_sec) {
                prs_mem_free( &ps );
                return 0;
index 1a3b7383c96e41d4c39d72266d0a0ec2b16c826a..ffa643a8f56b5ebe23c8423b3a053b494e22b8fd 100644 (file)
@@ -391,8 +391,9 @@ void become_root(void)
          * no good way to handle push_sec_ctx() failing without changing
          * the prototype of become_root()
          */
-       if (!push_sec_ctx())
-               return;
+       if (!push_sec_ctx()) {
+               smb_panic("become_root: push_sec_ctx failed");
+       }
        push_conn_ctx();
        set_root_sec_ctx();
 }
index 50465da9b903b1114c394252870957d39a9c5ed4..85a3f87b35358ad2031a6a6c07a1268bfa70a750 100644 (file)
@@ -3048,7 +3048,7 @@ static NTSTATUS rpc_group_members_internals(const DOM_SID *domain_sid,
 
                rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
 
-               (void) string_to_sid(&sid_Builtin, "S-1-5-32");
+               sid_copy(&sid_Builtin, &global_sid_Builtin);
 
                result = rpccli_samr_OpenDomain(pipe_hnd, mem_ctx,
                                                &connect_pol,