diff options
author | Luke Leighton <lkcl@samba.org> | 1999-10-26 16:46:45 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-10-26 16:46:45 +0000 |
commit | ea6592046f40ca21c689bff6472b4dd764850e43 (patch) | |
tree | 20c95af4ac1b735d9a1a42ddd5776f1d544d7a37 /source3/rpcclient | |
parent | 9d890f269cf54291edee585168960a56731cb363 (diff) | |
download | samba-ea6592046f40ca21c689bff6472b4dd764850e43.tar.gz samba-ea6592046f40ca21c689bff6472b4dd764850e43.tar.bz2 samba-ea6592046f40ca21c689bff6472b4dd764850e43.zip |
adding extra parameter back in to trust account functions (trust account name).
restoring opening S-1-5-20 in sam enum users code.
(This used to be commit 1be877114e2e958c59e6516dacf22d3fb5a4240f)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_netlogon.c | 5 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 48 |
2 files changed, 27 insertions, 26 deletions
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 3652218692..5c17e5c3da 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -45,7 +45,9 @@ experimental nt login. void cmd_netlogon_login_test(struct client_info *info) { uint16 nt_pipe_fnum; +#if 0 extern BOOL global_machine_password_needs_changing; +#endif fstring nt_user_name; fstring password; @@ -195,7 +197,8 @@ void cmd_sam_sync(struct client_info *info) return; } - if (do_sam_sync(smb_cli, trust_passwd, global_myname, + if (do_sam_sync(smb_cli, trust_passwd, + smb_cli->mach_acct, global_myname, hdr_deltas, deltas, &num)) { display_sam_sync(out_hnd, ACTION_HEADER , hdr_deltas, deltas, num); diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index a226608680..7d59503de4 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -1280,8 +1280,9 @@ static void req_alias_info(struct client_info *info, uint16 fnum, ptr_sid = (uint32*) malloc(sizeof(ptr_sid[0]) * 1); als_sid = (DOM_SID2*)malloc(sizeof(als_sid[0]) * 1); - make_dom_sid2(&als_sid[0], sid1); + sid_copy(&als_sid[0].sid, sid1); sid_append_rid(&als_sid[0].sid, user_rid); + als_sid[0].num_auths = als_sid[0].sid.num_auths; ptr_sid[0] = 1; @@ -1365,6 +1366,7 @@ int msrpc_sam_enum_users(struct client_info *info, uint32 user_idx; BOOL res = True; BOOL res1 = True; + BOOL res2 = True; uint32 start_idx = 0x0; uint16 unk_0 = 0x0; uint16 acb_mask = 0; @@ -1412,39 +1414,37 @@ int msrpc_sam_enum_users(struct client_info *info, &info->dom.samr_pol_connect, ace_perms, &sid1, &info->dom.samr_pol_open_domain) : False; -#if 0 /* connect to the S-1-5-20 domain */ - res1 = res ? samr_open_domain(smb_cli, fnum, + res2 = res ? samr_open_domain(smb_cli, fnum, &info->dom.samr_pol_connect, ace_perms, &sid_1_5_20, &info->dom.samr_pol_open_builtindom) : False; -#endif - /* read some users */ - while (res1 && status == STATUS_MORE_ENTRIES) + if (res1) { - status = samr_enum_dom_users(smb_cli, fnum, - &info->dom.samr_pol_open_domain, - &start_idx, acb_mask, unk_1, 0x01, - &info->dom.sam, &info->dom.num_sam_entries); - } - + /* read some users */ + while (status == STATUS_MORE_ENTRIES) + { + status = samr_enum_dom_users(smb_cli, fnum, + &info->dom.samr_pol_open_domain, + &start_idx, acb_mask, unk_1, 0x01, + &info->dom.sam, &info->dom.num_sam_entries); + } + - if (res1 && info->dom.num_sam_entries == 0) - { - report(out_hnd, "No users\n"); - } + if (info->dom.num_sam_entries == 0) + { + report(out_hnd, "No users\n"); + } - if (res1) - { /* query all the users */ for (user_idx = 0; res && user_idx < - info->dom.num_sam_entries; user_idx++) + info->dom.num_sam_entries; user_idx++) { uint32 user_rid = info->dom.sam[user_idx].rid; report(out_hnd, "User RID: %8x User Name: %s\n", - user_rid, - info->dom.sam[user_idx].acct_name); + user_rid, + info->dom.sam[user_idx].acct_name); if (request_group_info) { @@ -1463,12 +1463,10 @@ int msrpc_sam_enum_users(struct client_info *info, } } -#if 0 - res1 = res1 ? samr_close(smb_cli, fnum, + res2 = res2 ? samr_close(smb_cli, fnum, &info->dom.samr_pol_open_builtindom) : False; -#endif - res = res ? samr_close(smb_cli, fnum, + res1 = res1 ? samr_close(smb_cli, fnum, &info->dom.samr_pol_open_domain) : False; res = res ? samr_close(smb_cli, fnum, |