diff options
author | Luke Leighton <lkcl@samba.org> | 1998-10-16 20:07:02 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-10-16 20:07:02 +0000 |
commit | d4a82ea26d5b9501f210a5c441b1ac09c256a187 (patch) | |
tree | 7fffdba6ceef48bcba1d41957f3c6a8c4a2c0d8f /source3/rpcclient | |
parent | 967dcab94580a0c1bf9ee6335abc0d64001154b4 (diff) | |
download | samba-d4a82ea26d5b9501f210a5c441b1ac09c256a187.tar.gz samba-d4a82ea26d5b9501f210a5c441b1ac09c256a187.tar.bz2 samba-d4a82ea26d5b9501f210a5c441b1ac09c256a187.zip |
rpc client mods (ntlmssp flags)
(This used to be commit 16256f86bf451535c7955b8f51a9b88fc33a8e4d)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_lsarpc.c | 4 | ||||
-rw-r--r-- | source3/rpcclient/cmd_netlogon.c | 2 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 40 | ||||
-rw-r--r-- | source3/rpcclient/cmd_srvsvc.c | 10 | ||||
-rw-r--r-- | source3/rpcclient/cmd_wkssvc.c | 2 |
5 files changed, 34 insertions, 24 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index d1c2711aed..6dc50c5c22 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -62,7 +62,7 @@ void cmd_lsa_query_info(struct client_info *info) DEBUG(5, ("cmd_lsa_query_info: smb_cli->fd:%d\n", smb_cli->fd)); /* open LSARPC session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC) : False; /* lookup domain controller; receive a policy handle */ res = res ? do_lsa_open_policy(smb_cli, @@ -171,7 +171,7 @@ void cmd_lsa_lookup_sids(struct client_info *info) sids[0] = &sid; /* open LSARPC session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_LSARPC) : False; /* lookup domain controller; receive a policy handle */ res = res ? do_lsa_open_policy(smb_cli, diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 1be24fe130..d5ca2b2b1d 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -87,7 +87,7 @@ void cmd_netlogon_login_test(struct client_info *info) info->mach_acct, new_mach_pwd) : False; #endif /* open NETLOGON session. negotiate credentials */ - res = res ? cli_nt_session_open(smb_cli, PIPE_NETLOGON, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_NETLOGON) : False; res = res ? cli_nt_setup_creds(smb_cli, trust_passwd) : False; diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 3760b3f22d..5c69c4676c 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -48,14 +48,14 @@ void cmd_sam_ntchange_pwd(struct client_info *info) fstring sid; char *new_passwd; BOOL res = True; - char nt_newpass[516]; - char nt_hshhash[16]; - char nt_newhash[16]; - char nt_oldhash[16]; - char lm_newpass[516]; - char lm_newhash[16]; - char lm_hshhash[16]; - char lm_oldhash[16]; + uchar nt_newpass[516]; + uchar nt_hshhash[16]; + uchar nt_newhash[16]; + uchar nt_oldhash[16]; + uchar lm_newpass[516]; + uchar lm_newhash[16]; + uchar lm_hshhash[16]; + uchar lm_oldhash[16]; fstrcpy(sid , info->dom.level5_sid); fstrcpy(domain, info->dom.level5_dom); @@ -79,8 +79,19 @@ void cmd_sam_ntchange_pwd(struct client_info *info) E_old_pw_hash(lm_newhash, lm_oldhash, lm_hshhash); E_old_pw_hash(lm_newhash, nt_oldhash, nt_hshhash); + cli_nt_set_ntlmssp_flgs(smb_cli, + NTLMSSP_NEGOTIATE_UNICODE | + NTLMSSP_NEGOTIATE_OEM | + NTLMSSP_NEGOTIATE_SIGN | + NTLMSSP_NEGOTIATE_SEAL | + NTLMSSP_NEGOTIATE_LM_KEY | + NTLMSSP_NEGOTIATE_NTLM | + NTLMSSP_NEGOTIATE_ALWAYS_SIGN | + NTLMSSP_NEGOTIATE_00001000 | + NTLMSSP_NEGOTIATE_00002000); + /* open SAMR session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR, True) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False; /* establish a connection. */ res = res ? do_samr_unknown_38(smb_cli, srv_name) : False; @@ -90,7 +101,6 @@ void cmd_sam_ntchange_pwd(struct client_info *info) srv_name, smb_cli->user_name, nt_newpass, nt_hshhash, lm_newpass, lm_hshhash) : False; - /* close the session */ cli_nt_session_close(smb_cli); @@ -132,7 +142,7 @@ void cmd_sam_test(struct client_info *info) fprintf(out_hnd, "SAM Encryption Test\n"); /* open SAMR session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR, True) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False; /* establish a connection. */ res = res ? do_samr_unknown_38(smb_cli, srv_name) : False; @@ -231,7 +241,7 @@ void cmd_sam_enum_users(struct client_info *info) #endif /* open SAMR session. negotiate credentials */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False; /* establish a connection. */ res = res ? do_samr_connect(smb_cli, @@ -373,7 +383,7 @@ void cmd_sam_query_user(struct client_info *info) info->myhostname, srv_name, domain, sid); /* open SAMR session. negotiate credentials */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False; /* establish a connection. */ res = res ? do_samr_connect(smb_cli, @@ -461,7 +471,7 @@ void cmd_sam_query_groups(struct client_info *info) info->myhostname, srv_name, domain, sid); /* open SAMR session. negotiate credentials */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False; /* establish a connection. */ res = res ? do_samr_connect(smb_cli, @@ -550,7 +560,7 @@ void cmd_sam_enum_aliases(struct client_info *info) info->myhostname, srv_name, domain, sid); /* open SAMR session. negotiate credentials */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SAMR) : False; /* establish a connection. */ res = res ? do_samr_connect(smb_cli, diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c index 4d4fb791a9..65d49984bf 100644 --- a/source3/rpcclient/cmd_srvsvc.c +++ b/source3/rpcclient/cmd_srvsvc.c @@ -67,7 +67,7 @@ void cmd_srv_query_info(struct client_info *info) DEBUG(5, ("cmd_srv_query_info: smb_cli->fd:%d\n", smb_cli->fd)); /* open LSARPC session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC) : False; /* send info level: receive requested info. hopefully. */ res = res ? do_srv_net_srv_get_info(smb_cli, @@ -125,7 +125,7 @@ void cmd_srv_enum_conn(struct client_info *info) DEBUG(5, ("cmd_srv_enum_conn: smb_cli->fd:%d\n", smb_cli->fd)); /* open srvsvc session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC) : False; hnd.ptr_hnd = 1; hnd.handle = 0; @@ -185,7 +185,7 @@ void cmd_srv_enum_shares(struct client_info *info) DEBUG(5, ("cmd_srv_enum_shares: smb_cli->fd:%d\n", smb_cli->fd)); /* open srvsvc session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC) : False; hnd.ptr_hnd = 0; hnd.handle = 0; @@ -245,7 +245,7 @@ void cmd_srv_enum_sess(struct client_info *info) DEBUG(5, ("cmd_srv_enum_sess: smb_cli->fd:%d\n", smb_cli->fd)); /* open srvsvc session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC) : False; hnd.ptr_hnd = 1; hnd.handle = 0; @@ -297,7 +297,7 @@ void cmd_srv_enum_files(struct client_info *info) DEBUG(5, ("cmd_srv_enum_files: smb_cli->fd:%d\n", smb_cli->fd)); /* open srvsvc session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_SRVSVC) : False; hnd.ptr_hnd = 1; hnd.handle = 0; diff --git a/source3/rpcclient/cmd_wkssvc.c b/source3/rpcclient/cmd_wkssvc.c index 350aa29657..0093fbf7c8 100644 --- a/source3/rpcclient/cmd_wkssvc.c +++ b/source3/rpcclient/cmd_wkssvc.c @@ -67,7 +67,7 @@ void cmd_wks_query_info(struct client_info *info) DEBUG(5, ("cmd_wks_query_info: smb_cli->fd:%d\n", smb_cli->fd)); /* open LSARPC session. */ - res = res ? cli_nt_session_open(smb_cli, PIPE_WKSSVC, False) : False; + res = res ? cli_nt_session_open(smb_cli, PIPE_WKSSVC) : False; /* send info level: receive requested info. hopefully. */ res = res ? do_wks_query_info(smb_cli, |