summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-03-17 21:00:16 +0100
committerVolker Lendecke <vl@samba.org>2008-03-17 21:10:16 +0100
commitc5356479c1953b15fee8097d5d3436204fc7a4ce (patch)
tree1e3a5f8a989625e3bbbae972f638580b9e901fc5 /source3
parente06aa46b9fab1e107fea8f6453fb13deffa91e96 (diff)
downloadsamba-c5356479c1953b15fee8097d5d3436204fc7a4ce.tar.gz
samba-c5356479c1953b15fee8097d5d3436204fc7a4ce.tar.bz2
samba-c5356479c1953b15fee8097d5d3436204fc7a4ce.zip
Some simplifications
(This used to be commit b59b436997fba47afd02ffb6f1194dfaef229d44)
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/nt_printing.c10
-rw-r--r--source3/smbd/uid.c5
-rw-r--r--source3/utils/net_rpc.c2
3 files changed, 7 insertions, 10 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 04dde0e8a0..68b035962f 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -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;
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 1a3b7383c9..ffa643a8f5 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -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();
}
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 50465da9b9..85a3f87b35 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -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,