diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-14 19:31:07 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-14 19:31:07 +0000 |
commit | 5ca38bab498b45ce7b3e6b5b0316120224335cdb (patch) | |
tree | 60ad897e99ea1ef179e2b631b27a7ec772f5a9d8 /source3 | |
parent | d4605d5b951aa83ccbd7d45541524a8b79e92298 (diff) | |
download | samba-5ca38bab498b45ce7b3e6b5b0316120224335cdb.tar.gz samba-5ca38bab498b45ce7b3e6b5b0316120224335cdb.tar.xz samba-5ca38bab498b45ce7b3e6b5b0316120224335cdb.zip |
pipentlsa.c :
lsa close odd bug.
smbparse.c :
smb_io_dom_sid() _does_ need 4-byte alignment before it.
(This used to be commit 93879ac8a533ad8cc175275cf1fc9a8f152f4b5a)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/pipentlsa.c | 22 | ||||
-rw-r--r-- | source3/smbparse.c | 2 |
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++; |