diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-15 19:16:38 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-15 19:16:38 +0000 |
commit | d83845241381fb6ff86890d1d43c3d3bf6522a2b (patch) | |
tree | bedfdef95d642a5df1ce1449d04c8985789cd319 /source3/pipenetlog.c | |
parent | 5619b53921aca62fea163399fd0ca1915e50cc11 (diff) | |
download | samba-d83845241381fb6ff86890d1d43c3d3bf6522a2b.tar.gz samba-d83845241381fb6ff86890d1d43c3d3bf6522a2b.tar.bz2 samba-d83845241381fb6ff86890d1d43c3d3bf6522a2b.zip |
smb.h smbparse.c pipenetlog.c :
whoops, the SAM Logon structure was wrong. updated this, and
cifsntdomain.txt. more debug info in pipenetlog.c. the crash
is somewhere around deal_with_credentials().
byteorder.h :
put in uint8, uint16 and uint32 typecasts around debug info, because
sign extending was resulting in ffffffe8 being displayed instead of e8.
credentials.c :
some debugging info, because i'm tracking a coredump. without gdb.
nothing like making things difficult.
reply.c :
whoops, missed this (important) bit from paul's code, which tells
the NT workstation that the MACHINE$ entry doesn't already exist,
and we're going to create a default entry with a password "machine"
right now.
proto.h:
the usual.
(This used to be commit ed606bc7d4e6fb1091e527ea70a3e950d50a1db4)
Diffstat (limited to 'source3/pipenetlog.c')
-rw-r--r-- | source3/pipenetlog.c | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/source3/pipenetlog.c b/source3/pipenetlog.c index 6d406ee7d2..d221b8e644 100644 --- a/source3/pipenetlog.c +++ b/source3/pipenetlog.c @@ -86,11 +86,15 @@ static int lsa_reply_auth_2(LSA_Q_AUTH_2 *q_a, char *q, char *base, return PTR_DIFF(q, base); } -static void make_lsa_r_srv_pwset(LSA_R_SRV_PWSET *r_a, +static void make_lsa_r_srv_pwset(LSA_R_SRV_PWSET *r_s, DOM_CRED *srv_cred, int status) { - memcpy(&(r_a->srv_cred), srv_cred, sizeof(r_a->srv_cred)); - r_a->status = status; + DEBUG(5,("make_lsa_r_srv_pwset: %d\n", __LINE__)); + + memcpy(&(r_s->srv_cred), srv_cred, sizeof(r_s->srv_cred)); + r_s->status = status; + + DEBUG(5,("make_lsa_r_srv_pwset: %d\n", __LINE__)); } static int lsa_reply_srv_pwset(LSA_Q_SRV_PWSET *q_s, char *q, char *base, @@ -98,12 +102,16 @@ static int lsa_reply_srv_pwset(LSA_Q_SRV_PWSET *q_s, char *q, char *base, { LSA_R_SRV_PWSET r_s; + DEBUG(5,("lsa_srv_pwset: %d\n", __LINE__)); + /* set up the LSA Server Password Set response */ make_lsa_r_srv_pwset(&r_s, srv_cred, status); /* store the response in the SMB stream */ q = lsa_io_r_srv_pwset(False, &r_s, q, base, 4, 0); + DEBUG(5,("lsa_srv_pwset: %d\n", __LINE__)); + /* return length of SMB data stored */ return PTR_DIFF(q, base); } @@ -395,14 +403,24 @@ static BOOL deal_with_credentials(user_struct *vuser, /* increment client time by one second */ new_clnt_time.time = clnt_cred->timestamp.time + 1; + DEBUG(5,("deal_with_credentials: new_clnt_time=%lx\n", new_clnt_time.time)); + /* create server credentials for inclusion in the reply */ cred_create(vuser->dc.sess_key, &(vuser->dc.clnt_cred), new_clnt_time, &(srv_cred->challenge)); + + DEBUG(5,("deal_with_credentials: %d\n", __LINE__)); + + DEBUG(5,("deal_with_credentials: clnt_cred[0]=%lx\n", + vuser->dc.clnt_cred.data[0])); + + new_cred = IVAL(vuser->dc.clnt_cred.data, 0); + new_cred += new_clnt_time.time; - /* update the client and server credentials, for use next time... */ - new_cred = IVAL(vuser->dc.clnt_cred.data, 0) + new_clnt_time.time; - SIVAL(vuser->dc.clnt_cred.data, new_cred, 0); - SIVAL(vuser->dc.srv_cred.data , new_cred, 0); + DEBUG(5,("deal_with_credentials: new_cred[0]=%lx\n", new_cred)); + + SIVAL(vuser->dc.clnt_cred.data, 0, new_cred); + SIVAL(vuser->dc.srv_cred .data, 0, new_cred); return True; } @@ -421,6 +439,8 @@ static void api_lsa_srv_pwset( user_struct *vuser, /* checks and updates credentials. creates reply credentials */ deal_with_credentials(vuser, &(q_a.clnt_id.cred), &srv_cred); + DEBUG(5,("api_lsa_srv_pwset: %d\n", __LINE__)); + /* construct reply. always indicate failure. nt keeps going... */ *rdata_len = lsa_reply_srv_pwset(&q_a, *rdata + 0x18, *rdata, &srv_cred, @@ -487,7 +507,7 @@ static void api_lsa_sam_logon( user_struct *vuser, pstrcpy(dom_sid , lp_domainsid ()); pstrcpy(my_workgroup, lp_workgroup ()); - pstrcpy(username, unistr2(q_l.sam_id.client.login.uni_acct_name.buffer)); + pstrcpy(username, unistr2(q_l.sam_id.auth.id1.uni_user_name.buffer)); pstrcpy(my_name , myname ); strupper(my_name); |