diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-17 13:43:01 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-17 13:43:01 +0000 |
commit | f3c37f925ee06bbc76a89035b28dae0cf8c38088 (patch) | |
tree | 9536d7dd562090b0b58431cf5d4096ebca687d48 /source3 | |
parent | f657f37b3a346dfe7e31bd2cb3e3c32551bceadf (diff) | |
download | samba-f3c37f925ee06bbc76a89035b28dae0cf8c38088.tar.gz samba-f3c37f925ee06bbc76a89035b28dae0cf8c38088.tar.bz2 samba-f3c37f925ee06bbc76a89035b28dae0cf8c38088.zip |
smbparse.c smb.h :
uni_max_len and uni_str_len are the other way round, in UNIHDR.
util.c :
increased the show_msg() data size from 256 bytes to 512 bytes:
the LSA SAM Logon response can be about 500 bytes long.
pipenetlog.c :
forgot to set the authoritative field to 1.
(This used to be commit 71c6678cd7ffe30a5da27766cf99147e1921feae)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/smb.h | 2 | ||||
-rw-r--r-- | source3/lib/util.c | 6 | ||||
-rw-r--r-- | source3/pipenetlog.c | 1 | ||||
-rw-r--r-- | source3/pipeutil.c | 10 | ||||
-rw-r--r-- | source3/smbparse.c | 8 |
5 files changed, 21 insertions, 6 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index e4c2823a19..80b2f28f4a 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -772,7 +772,7 @@ typedef struct lsa_q_user_info UNIHDR hdr_logon_dom; /* logon domain unicode string header */ uint32 buffer_dom_id; /* undocumented logon domain id pointer */ - char padding[40]; /* unused padding bytes? */ + char padding[40]; /* unused padding bytes. expansion room */ uint32 num_other_sids; /* 0 - num_sids */ uint32 buffer_other_sids; /* NULL - undocumented pointer to SIDs. */ diff --git a/source3/lib/util.c b/source3/lib/util.c index 0a8540b48b..a82713a0d8 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1182,9 +1182,9 @@ void show_msg(char *buf) DEBUG(5,("smb_bcc=%d\n",bcc)); if (DEBUGLEVEL < 10) return; - for (i = 0; i < MIN(bcc, 256); i += 16) + for (i = 0; i < MIN(bcc, 512); i += 16) { - for (j = 0; j < 16 && i+j < MIN(bcc,256); j++) + for (j = 0; j < 16 && i+j < MIN(bcc,512); j++) { DEBUG(10,("%2X ",CVAL(smb_buf(buf),i+j))); @@ -1193,7 +1193,7 @@ void show_msg(char *buf) } DEBUG(10,(" ")); - for (j = 0; j < 16 && i+j < MIN(bcc,256); j++) + for (j = 0; j < 16 && i+j < MIN(bcc,512); j++) { unsigned char c = CVAL(smb_buf(buf),i+j); if (c < 32 || c > 128) c = '.'; diff --git a/source3/pipenetlog.c b/source3/pipenetlog.c index 54769270af..14b2063951 100644 --- a/source3/pipenetlog.c +++ b/source3/pipenetlog.c @@ -242,6 +242,7 @@ static int lsa_reply_sam_logon(LSA_Q_SAM_LOGON *q_s, char *q, char *base, r_s.user = user_info; r_s.buffer_user = user_info != NULL ? 1 : 0; r_s.status = user_info != NULL ? 0 : (0xC000000|NT_STATUS_NO_SUCH_USER); + r_s.auth_resp = 1; /* authoritative response */ /* store the response in the SMB stream */ q = lsa_io_r_sam_logon(False, &r_s, q, base, 4, 0); diff --git a/source3/pipeutil.c b/source3/pipeutil.c index f55a8d2181..de58d56a98 100644 --- a/source3/pipeutil.c +++ b/source3/pipeutil.c @@ -106,6 +106,16 @@ void make_dom_sid(DOM_SID *sid, char *domsid) int identauth; char *p; + if (sid == NULL) return; + + if (domsid == NULL) + { + DEBUG(4,("netlogon domain SID: none\n")); + sid->sid_no = 0; + sid->num_auths = 0; + return; + } + DEBUG(4,("netlogon domain SID: %s\n", domsid)); /* assume, but should check, that domsid starts "S-" */ diff --git a/source3/smbparse.c b/source3/smbparse.c index e5f455a408..de6ee7b90e 100644 --- a/source3/smbparse.c +++ b/source3/smbparse.c @@ -104,10 +104,14 @@ char* smb_io_unihdr(BOOL io, UNIHDR *hdr, char *q, char *base, int align, int de q = align_offset(q, base, align); - DBG_RW_SVAL("uni_max_len", depth, base, io, q, hdr->uni_max_len); q += 4; - DBG_RW_SVAL("uni_str_len", depth, base, io, q, hdr->uni_str_len); q += 4; + DBG_RW_SVAL("uni_str_len", depth, base, io, q, hdr->uni_str_len); q += 2; + DBG_RW_SVAL("uni_max_len", depth, base, io, q, hdr->uni_max_len); q += 2; DBG_RW_IVAL("undoc ", depth, base, io, q, hdr->undoc ); q += 4; + /* oops! XXXX maybe issue a warning that this is happening... */ + if (hdr->uni_max_len > MAX_UNISTRLEN) hdr->uni_max_len = MAX_UNISTRLEN; + if (hdr->uni_str_len > MAX_UNISTRLEN) hdr->uni_str_len = MAX_UNISTRLEN; + return q; } |