summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-04-09 15:54:17 +0000
committerVolker Lendecke <vlendec@samba.org>2003-04-09 15:54:17 +0000
commit7238bf5f40e16360439e028fa7607a5a28e02965 (patch)
tree1816898133cbf06270a5a01afa61ae0dcacf7821 /source3/rpc_parse
parentf0121aa901a99374df7ac8f43dbd50efdc3e79dd (diff)
downloadsamba-7238bf5f40e16360439e028fa7607a5a28e02965.tar.gz
samba-7238bf5f40e16360439e028fa7607a5a28e02965.tar.bz2
samba-7238bf5f40e16360439e028fa7607a5a28e02965.zip
This is the netlogon schannel client code. Try a
rpcclient -S pdc -U% -c "samlogon user password" and it should work with the schannel. Needs testing against platforms different from NT4SP6. Volker (This used to be commit eaef0d8aeff1aa5a067679be3f17e08d7434e1e8)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_rpc.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 700ce8cfd6..656082e05a 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -1129,6 +1129,18 @@ BOOL smb_io_rpc_auth_ntlmssp_chk(const char *desc, RPC_AUTH_NTLMSSP_CHK *chk, pr
}
/*******************************************************************
+creates an RPC_AUTH_NETSEC_NEG structure.
+********************************************************************/
+void init_rpc_auth_netsec_neg(RPC_AUTH_NETSEC_NEG *neg,
+ const char *domain, const char *myname)
+{
+ neg->unknown1 = 0;
+ neg->unknown2 = 0x13;
+ fstrcpy(neg->domain, domain);
+ fstrcpy(neg->myname, myname);
+}
+
+/*******************************************************************
Reads or writes an RPC_AUTH_NETSEC_NEG structure.
********************************************************************/
@@ -1148,11 +1160,11 @@ BOOL smb_io_rpc_auth_netsec_neg(const char *desc, RPC_AUTH_NETSEC_NEG *neg,
return False;
if(!prs_uint32("unknown2", ps, depth, &neg->unknown2))
return False;
- if(!prs_string("domain ", ps, depth, neg->domain,
- strlen(&ps->data_p[ps->data_offset]), sizeof(neg->domain)))
- return False;
if(!prs_string("myname ", ps, depth, neg->myname,
- strlen(&ps->data_p[ps->data_offset]), sizeof(neg->myname)))
+ strlen(neg->myname), sizeof(neg->myname)))
+ return False;
+ if(!prs_string("domain ", ps, depth, neg->domain,
+ strlen(neg->domain), sizeof(neg->domain)))
return False;
return True;