From 2803a72751cf511aa0b5e6745e1b169faa66f68a Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Wed, 24 Nov 1999 22:45:09 +0000 Subject: ok. *whew*. this is the first completed part of the restructure. verified that lsaquery, lsalookupsids work, and found some bugs in the parameters of these commands :-) soo... we now have an lsa_* api that has the same arguments as the nt Lsa* api! cool! the only significant coding difference is the introduction of a user_credentials structure, containing user, domain, pass and ntlmssp flags. (This used to be commit 57bff6fe82d777e599d535f076efb2328ba1188b) --- source3/rpc_client/cli_lsarpc.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'source3/rpc_client/cli_lsarpc.c') diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 26b17243cd..a7c15307a1 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -31,8 +31,6 @@ extern int DEBUGLEVEL; -extern struct cli_state *rpc_smb_cli; - /**************************************************************************** obtain the sid from the PDC. do some verification along the way... ****************************************************************************/ @@ -45,8 +43,12 @@ BOOL get_domain_sids(const char *myname, BOOL res = True; fstring dom3; fstring dom5; - - rpc_smb_cli = &cli; + extern struct user_credentials *usr_creds; + struct user_credentials usr; + + usr_creds = &usr; + ZERO_STRUCT(usr); + pwd_set_nullpwd(&usr.pwd); if (sid3 == NULL && sid5 == NULL) { @@ -142,7 +144,12 @@ BOOL get_trust_sid_and_domain(const char* myname, char *server, fstring dom3; fstring dom5; - rpc_smb_cli = &cli; + extern struct user_credentials *usr_creds; + struct user_credentials usr; + + usr_creds = &usr; + ZERO_STRUCT(usr); + pwd_set_nullpwd(&usr.pwd); if (!cli_connect_serverlist(&cli, server)) { @@ -478,7 +485,7 @@ BOOL lsa_query_secret(POLICY_HND *hnd, STRING2 *secret, memcpy(&enc_secret, &(r_q.info.value.enc_secret), sizeof(STRING2)); memcpy(last_update, &(r_q.info.last_update), sizeof(NTTIME)); valid_info = nt_decrypt_string2(secret, &enc_secret, - (char*)(cli->pwd.smb_nt_pwd)); + (char*)(cli->usr.pwd.smb_nt_pwd)); } } -- cgit