Merge of Jerry's fix from 2.2.
authorJeremy Allison <jra@samba.org>
Mon, 10 Jun 2002 21:49:18 +0000 (21:49 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 10 Jun 2002 21:49:18 +0000 (21:49 +0000)
Jeremy.

source/include/rpc_samr.h
source/rpc_parse/parse_samr.c

index 191a3695fbf72be188fa050e40b2a09faf62beba..1bb7a87b351e1a0fd4166c97ca89389c44e6503d 100644 (file)
@@ -1693,9 +1693,16 @@ typedef struct q_samr_get_dom_pwinfo
 /* SAMR_R_GET_DOM_PWINFO */
 typedef struct r_samr_get_dom_pwinfo
 {
-       uint16 unk_0;
-       uint16 unk_1;
-       uint16 unk_2;
+       /*
+        * Previously this was 3 uint16's.  However, after some tests
+        * it appears that the data len for the signing needs to be 16.
+        * Not sure how 3 unit16's ever worked since the length always
+        * turned out to 12.  3 uint32's + NT_STATUS == 16 bytes.  Tested
+        * using NT and 2k.  --jerry
+        */
+       uint32 unk_0;
+       uint32 unk_1;
+       uint32 unk_2;
        NTSTATUS status;
 
 } SAMR_R_GET_DOM_PWINFO;
index 412dcd65015ee0c9d5995c61ee9080542f07be3b..8a741d768d5cb4c220dda908f86cb717142f1647 100644 (file)
@@ -6719,13 +6719,16 @@ BOOL samr_io_r_get_dom_pwinfo(char *desc, SAMR_R_GET_DOM_PWINFO * r_u,
        if(!prs_align(ps))
                return False;
 
-       if(!prs_uint16("unk_0", ps, depth, &r_u->unk_0))
-               return False;
-       if(!prs_uint16("unk_1", ps, depth, &r_u->unk_1))
+       /*
+        * We need 16 bytes here according to tests.  Don't know
+        * what they are, but the length is important for the singing
+       */
+
+       if(!prs_uint32("unk_0", ps, depth, &r_u->unk_0))
                return False;
-       if(!prs_uint16("unk_2", ps, depth, &r_u->unk_2))
+       if(!prs_uint32("unk_1", ps, depth, &r_u->unk_1))
                return False;
-       if(!prs_align(ps))
+       if(!prs_uint32("unk_2", ps, depth, &r_u->unk_2))
                return False;
 
        if(!prs_ntstatus("status", ps, depth, &r_u->status))