summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/pipentlsa.c22
-rw-r--r--source3/smbparse.c2
2 files changed, 16 insertions, 8 deletions
diff --git a/source3/pipentlsa.c b/source3/pipentlsa.c
index 030e00e87a..d27b7b2b76 100644
--- a/source3/pipentlsa.c
+++ b/source3/pipentlsa.c
@@ -40,8 +40,8 @@ static int lsa_reply_open_policy(char *q, char *base)
LSA_R_OPEN_POL r_o;
/* set up the LSA QUERY INFO response */
- /* bzero(&(r_o.pol.data), POL_HND_SIZE); */
- for (i = 0; i < POL_HND_SIZE; i++)
+ bzero(&(r_o.pol.data), POL_HND_SIZE);
+ for (i = 4; i < POL_HND_SIZE; i++)
{
r_o.pol.data[i] = i;
}
@@ -337,6 +337,8 @@ BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data,
SIVAL(q, 0, 4); /* entries read */
SIVAL(q, 0, 8); /* trust information */
+ q += 12;
+
endrpcreply(data, *rdata, q-*rdata, 0x8000001a, rdata_len);
break;
@@ -344,17 +346,19 @@ BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data,
case LSA_CLOSE:
{
- char *q = *rdata + 0x18;
+ char *q;
DEBUG(3,("LSA_CLOSE\n"));
initrpcreply(data, *rdata);
- SIVAL(q, 0, 0);
- SIVAL(q, 0, 4);
- SIVAL(q, 0, 8);
- SIVAL(q, 0, 12);
- SIVAL(q, 0, 16);
+ q = *rdata + 0x18;
+
+ SIVAL(q, 0, 0); q += 4;
+ SIVAL(q, 0, 0); q += 4;
+ SIVAL(q, 0, 0); q += 4;
+ SIVAL(q, 0, 0); q += 4;
+ SIVAL(q, 0, 0); q += 4;
endrpcreply(data, *rdata, q-*rdata, 0, rdata_len);
@@ -374,6 +378,8 @@ BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data,
SIVAL(q, 0, 12);
SIVAL(q, 0, 16);
+ q += 20;
+
endrpcreply(data, *rdata, q-*rdata, 0xc000034, rdata_len);
break;
diff --git a/source3/smbparse.c b/source3/smbparse.c
index 855d46420a..64a0e640cb 100644
--- a/source3/smbparse.c
+++ b/source3/smbparse.c
@@ -71,6 +71,8 @@ char* smb_io_dom_sid(BOOL io, DOM_SID *sid, char *q, char *base, int align, int
DEBUG(5,("%s%04x smb_io_dom_sid\n", tab_depth(depth), PTR_DIFF(q, base)));
depth++;
+ q = align_offset(q, base, align);
+
DBG_RW_IVAL("num_auths ", depth, base, io, q, sid->num_auths); q += 4;
DBG_RW_CVAL("sid_no ", depth, base, io, q, sid->sid_no); q++;
DBG_RW_CVAL("num_auths ", depth, base, io, q, sid->num_auths); q++;