mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
@ -344,7 +344,6 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
|
|||||||
int result, i;
|
int result, i;
|
||||||
uint32 sd_size;
|
uint32 sd_size;
|
||||||
size_t size_new_sec;
|
size_t size_new_sec;
|
||||||
DOM_SID sid;
|
|
||||||
|
|
||||||
if (!data.dptr || data.dsize == 0) {
|
if (!data.dptr || data.dsize == 0) {
|
||||||
return 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 */
|
/* 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,
|
new_sec = make_sec_desc( ctx, SEC_DESC_REVISION, SEC_DESC_SELF_RELATIVE,
|
||||||
&sid, &sid,
|
&global_sid_Builtin_Administrators,
|
||||||
NULL, NULL, &size_new_sec );
|
&global_sid_Builtin_Administrators,
|
||||||
|
NULL, NULL, &size_new_sec );
|
||||||
if (!new_sec) {
|
if (!new_sec) {
|
||||||
prs_mem_free( &ps );
|
prs_mem_free( &ps );
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -391,8 +391,9 @@ void become_root(void)
|
|||||||
* no good way to handle push_sec_ctx() failing without changing
|
* no good way to handle push_sec_ctx() failing without changing
|
||||||
* the prototype of become_root()
|
* the prototype of become_root()
|
||||||
*/
|
*/
|
||||||
if (!push_sec_ctx())
|
if (!push_sec_ctx()) {
|
||||||
return;
|
smb_panic("become_root: push_sec_ctx failed");
|
||||||
|
}
|
||||||
push_conn_ctx();
|
push_conn_ctx();
|
||||||
set_root_sec_ctx();
|
set_root_sec_ctx();
|
||||||
}
|
}
|
||||||
|
@ -3048,7 +3048,7 @@ static NTSTATUS rpc_group_members_internals(const DOM_SID *domain_sid,
|
|||||||
|
|
||||||
rpccli_samr_Close(pipe_hnd, mem_ctx, &domain_pol);
|
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,
|
result = rpccli_samr_OpenDomain(pipe_hnd, mem_ctx,
|
||||||
&connect_pol,
|
&connect_pol,
|
||||||
|
Reference in New Issue
Block a user