diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-24 22:45:09 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-24 22:45:09 +0000 |
commit | 2803a72751cf511aa0b5e6745e1b169faa66f68a (patch) | |
tree | e93ae3fb9694c457c004600b2a0e58ec051d4bad /source3/rpc_client/cli_lsarpc.c | |
parent | f8b82a7b9507e11595bc924def179dc1d7d79a54 (diff) | |
download | samba-2803a72751cf511aa0b5e6745e1b169faa66f68a.tar.gz samba-2803a72751cf511aa0b5e6745e1b169faa66f68a.tar.bz2 samba-2803a72751cf511aa0b5e6745e1b169faa66f68a.zip |
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)
Diffstat (limited to 'source3/rpc_client/cli_lsarpc.c')
-rw-r--r-- | source3/rpc_client/cli_lsarpc.c | 19 |
1 files changed, 13 insertions, 6 deletions
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)); } } |