found two bugs in lsalookup* - sid_name_use type is uint16 - by bouncing
authorLuke Leighton <lkcl@samba.org>
Wed, 8 Mar 2000 20:49:08 +0000 (20:49 +0000)
committerLuke Leighton <lkcl@samba.org>
Wed, 8 Mar 2000 20:49:08 +0000 (20:49 +0000)
off sun's cascade box.  HOORAY!

good suggestion, elrond.

source/include/proto.h
source/include/rpc_lsa.h
source/include/rpc_misc.h
source/include/rpc_parse_proto.h
source/include/winbindd_proto.h
source/rpc_parse/parse_lsa.c
source/rpc_parse/parse_misc.c

index e2bfc7159a246f4407d4ee95cebc02e9d6b80674..3b6c2dd4fd821a8480752d168c526120e4c7e308 100644 (file)
@@ -3233,7 +3233,7 @@ BOOL make_buf_string2(STRING2 *str, uint32 *ptr, const char *buf);
 BOOL smb_io_string2(char *desc,  STRING2 *str2, uint32 buffer, prs_struct *ps, int depth);
 BOOL make_unistr2(UNISTR2 *str, const char *buf, int len);
 BOOL smb_io_unistr2(char *desc,  UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth);
-BOOL make_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint8 type, uint32 idx);
+BOOL make_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint16 type, uint32 idx);
 BOOL smb_io_dom_rid2(char *desc,  DOM_RID2 *rid2, prs_struct *ps, int depth);
 BOOL make_dom_rid3(DOM_RID3 *rid3, uint32 rid, uint8 type);
 BOOL smb_io_dom_rid3(char *desc,  DOM_RID3 *rid3, prs_struct *ps, int depth);
index 090e2254017c0264aeb4eef50d9d43f337f3107b..3d6ae0289afacddaf3fd63702cc1cb17cee642e5 100644 (file)
@@ -402,7 +402,7 @@ typedef struct dom_ref_info
 /* LSA_TRANS_NAME - translated name */
 typedef struct lsa_trans_name_info
 {
-       uint32 sid_name_use; /* value is 5 for a well-known group; 2 for a domain group; 1 for a user... */
+       uint16 sid_name_use; /* value is 5 for a well-known group; 2 for a domain group; 1 for a user... */
        UNIHDR hdr_name; 
        uint32 domain_idx; /* index into DOM_R_REF array of SIDs */
 
index 8077a0aadb8a6d238fcd4f4b373c24178f0e4eda..93ce1ed4f63cbfd710b93f8f68eed76dd83b8e27 100644 (file)
@@ -333,7 +333,7 @@ typedef struct unistr3_info
 /* DOM_RID2 - domain RID structure for ntlsa pipe */
 typedef struct domrid2_info
 {
-       uint8 type; /* value is SID_NAME_USE enum */
+       uint16 type; /* value is SID_NAME_USE enum */
        uint32 rid;
        uint32 rid_idx; /* referenced domain index */
 
index 5d00cd881403373f9f9df358406fbd428f201c6b..1aac58e4023f40e8061840aefe58a859792c944b 100644 (file)
@@ -67,7 +67,7 @@ BOOL eventlog_io_r_readeventlog(char *desc, EVENTLOG_R_READEVENTLOG *r_u, prs_st
 /*The following definitions come from  rpc_parse/parse_lsa.c  */
 
 BOOL make_lsa_trans_name(LSA_TRANS_NAME * trn, UNISTR2 * uni_name,
-                        uint32 sid_name_use, char *name, uint32 idx);
+                        uint16 sid_name_use, char *name, uint32 idx);
 int make_dom_ref_uni(DOM_R_REF * ref, const UNISTR2 * uni_domname,
                     const DOM_SID * dom_sid);
 int make_dom_ref(DOM_R_REF * ref, const char *domname,
@@ -208,7 +208,7 @@ BOOL make_buf_string2(STRING2 *str, uint32 *ptr, const char *buf);
 BOOL smb_io_string2(char *desc,  STRING2 *str2, uint32 buffer, prs_struct *ps, int depth);
 BOOL make_unistr2(UNISTR2 *str, const char *buf, int len);
 BOOL smb_io_unistr2(char *desc,  UNISTR2 *uni2, uint32 buffer, prs_struct *ps, int depth);
-BOOL make_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint8 type, uint32 idx);
+BOOL make_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint16 type, uint32 idx);
 BOOL smb_io_dom_rid2(char *desc,  DOM_RID2 *rid2, prs_struct *ps, int depth);
 BOOL make_dom_rid3(DOM_RID3 *rid3, uint32 rid, uint8 type);
 BOOL smb_io_dom_rid3(char *desc,  DOM_RID3 *rid3, prs_struct *ps, int depth);
index 9cf7665cabb79895ab36782119adf61bb9c3ae72..a79c8b2e59894ac026a11c63152bb4a3d7c76fdf 100644 (file)
@@ -1679,7 +1679,7 @@ BOOL create_user_creds( prs_struct *ps,
 /*The following definitions come from  rpc_parse/parse_lsa.c  */
 
 BOOL make_lsa_trans_name(LSA_TRANS_NAME * trn, UNISTR2 * uni_name,
-                        uint32 sid_name_use, char *name, uint32 idx);
+                        uint16 sid_name_use, char *name, uint32 idx);
 int make_dom_ref_uni(DOM_R_REF * ref, const UNISTR2 * uni_domname,
                     const DOM_SID * dom_sid);
 int make_dom_ref(DOM_R_REF * ref, const char *domname,
index f93b33fc1a754c2b8c6798cec954ab91a4bea7c1..d9cc608d0b4e09b0035cdbb25ff99ec8f336256f 100644 (file)
@@ -31,7 +31,7 @@ extern int DEBUGLEVEL;
 creates a LSA_TRANS_NAME structure.
 ********************************************************************/
 BOOL make_lsa_trans_name(LSA_TRANS_NAME * trn, UNISTR2 * uni_name,
-                        uint32 sid_name_use, char *name, uint32 idx)
+                        uint16 sid_name_use, char *name, uint32 idx)
 {
        int len_name = strlen(name);
 
@@ -57,9 +57,10 @@ static BOOL lsa_io_trans_name(char *desc, LSA_TRANS_NAME * trn,
 
        prs_align(ps);
 
-       prs_uint32("sid_name_use", ps, depth, &(trn->sid_name_use));
-       smb_io_unihdr("hdr_name", &(trn->hdr_name), ps, depth);
-       prs_uint32("domain_idx  ", ps, depth, &(trn->domain_idx));
+       prs_uint16("sid_name_use", ps, depth, &trn->sid_name_use);
+       prs_align(ps);
+       smb_io_unihdr("hdr_name", &trn->hdr_name, ps, depth);
+       prs_uint32("domain_idx  ", ps, depth, &trn->domain_idx);
 
        return True;
 }
index 4007147a9a08e8361a219d7bd52f084b2a391232..0966262120a505ae26fc5dde12dd79892a5e695e 100644 (file)
@@ -937,7 +937,7 @@ BOOL smb_io_unistr2(char *desc,  UNISTR2 *uni2, uint32 buffer, prs_struct *ps, i
 /*******************************************************************
 creates a DOM_RID2 structure.
 ********************************************************************/
-BOOL make_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint8 type, uint32 idx)
+BOOL make_dom_rid2(DOM_RID2 *rid2, uint32 rid, uint16 type, uint32 idx)
 {
        rid2->type    = type;
        rid2->rid     = rid;
@@ -958,7 +958,7 @@ BOOL smb_io_dom_rid2(char *desc,  DOM_RID2 *rid2, prs_struct *ps, int depth)
 
        prs_align(ps);
        
-       prs_uint8("type   ", ps, depth, &(rid2->type));
+       prs_uint16("type   ", ps, depth, &(rid2->type));
        prs_align(ps);
        prs_uint32("rid    ", ps, depth, &(rid2->rid     ));
        prs_uint32("rid_idx", ps, depth, &(rid2->rid_idx ));