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.
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. */
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)));
}
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 = '.';
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);
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-" */
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;
}