enum SID_NAME_USE
{
- SID_NAME_USER = 1,
+ SID_NAME_USE_NONE = 0,/* NOTUSED */
+ SID_NAME_USER = 1, /* user */
SID_NAME_DOM_GRP = 2, /* domain group */
- SID_NAME_WKN_GRP = 5 /* well-known group */
+ SID_NAME_DOMAIN = 3, /* domain: don't know what this is */
+ SID_NAME_ALIAS = 4, /* local group */
+ SID_NAME_WKN_GRP = 5, /* well-known group */
+ SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */
+ SID_NAME_INVALID = 7, /* invalid account */
+ SID_NAME_UNKNOWN = 8 /* oops. */
};
/* ntlsa pipe */
#define LSA_ENUMTRUSTDOM 0x0d
#define LSA_LOOKUPNAMES 0x0e
#define LSA_LOOKUPSIDS 0x0f
-#define LSA_OPENPOLICY 0x2c
+#define LSA_OPENPOLICY 0x06
+#define LSA_OPENPOLICY2 0x2c
#define LSA_OPENSECRET 0x1C
/* XXXX these are here to get a compile! */
#define LSA_LOOKUPRIDS 0xFD
-#define LSA_MAX_GROUPS 32
-#define LSA_MAX_SIDS 32
+#define LSA_MAX_GROUPS 96
+#define LSA_MAX_SIDS 128
/* DOM_QUERY - info class 3 and 5 LSA Query response */
typedef struct dom_query_info
typedef DOM_QUERY DOM_QUERY_3;
typedef DOM_QUERY DOM_QUERY_5;
+/* level 2 is auditing settings */
+typedef struct dom_query_2
+{
+ uint32 auditing_enabled;
+ uint32 count1; /* usualy 7, at least on nt4sp4 */
+ uint32 count2; /* the same */
+ uint32 *auditsettings;
+} DOM_QUERY_2;
+
+/* level 6 is server role information */
+typedef struct dom_query_6
+{
+ uint16 server_role; /* 2=backup, 3=primary */
+} DOM_QUERY_6;
+
typedef struct seq_qos_info
{
uint32 len; /* 12 */
/* LSA_Q_OPEN_POL - LSA Query Open Policy */
typedef struct lsa_q_open_pol_info
{
- uint32 ptr; /* undocumented buffer pointer */
- UNISTR2 uni_server_name; /* server name, starting with two '\'s */
- LSA_OBJ_ATTR attr ; /* object attributes */
+ uint32 ptr; /* undocumented buffer pointer */
+ uint16 system_name; /* 0x5c - system name */
+ LSA_OBJ_ATTR attr ; /* object attributes */
uint32 des_access; /* desired access attributes */
} LSA_R_OPEN_POL;
+/* LSA_Q_OPEN_POL2 - LSA Query Open Policy */
+typedef struct lsa_q_open_pol2_info
+{
+ uint32 ptr; /* undocumented buffer pointer */
+ UNISTR2 uni_server_name; /* server name, starting with two '\'s */
+ LSA_OBJ_ATTR attr ; /* object attributes */
+
+ uint32 des_access; /* desired access attributes */
+
+} LSA_Q_OPEN_POL2;
+
+/* LSA_R_OPEN_POL2 - response to LSA Open Policy */
+typedef struct lsa_r_open_pol2_info
+{
+ POLICY_HND pol; /* policy handle */
+ uint32 status; /* return code */
+
+} LSA_R_OPEN_POL2;
+
+/* LSA_Q_QUERY_SEC_OBJ - LSA query security */
+typedef struct lsa_query_sec_obj_info
+{
+ POLICY_HND pol; /* policy handle */
+ uint32 sec_info;
+
+} LSA_Q_QUERY_SEC_OBJ;
+
+/* LSA_R_QUERY_SEC_OBJ - probably an open */
+typedef struct r_lsa_query_sec_obj_info
+{
+ uint32 ptr;
+ SEC_DESC_BUF *buf;
+
+ uint32 status; /* return status */
+
+} LSA_R_QUERY_SEC_OBJ;
+
/* LSA_Q_QUERY_INFO - LSA query info policy */
typedef struct lsa_query_info
{
} LSA_Q_QUERY_INFO;
+/* LSA_INFO_UNION */
+typedef union lsa_info_union
+{
+ DOM_QUERY_2 id2;
+ DOM_QUERY_3 id3;
+ DOM_QUERY_5 id5;
+ DOM_QUERY_6 id6;
+} LSA_INFO_UNION;
+
/* LSA_R_QUERY_INFO - response to LSA query info policy */
typedef struct lsa_r_query_info
{
uint32 undoc_buffer; /* undocumented buffer pointer */
uint16 info_class; /* info class (same as info class in request) */
-
- union
- {
- DOM_QUERY_3 id3;
- DOM_QUERY_5 id5;
-
- } dom;
+
+ LSA_INFO_UNION dom;
uint32 status; /* return code */
uint32 ptr_enum_domains; /* buffer pointer to num domains */
/* this lot is only added if ptr_enum_domains is non-NULL */
- uint32 num_domains2; /* number of domains */
- UNIHDR2 hdr_domain_name;
- UNISTR2 uni_domain_name;
- DOM_SID2 other_domain_sid;
+ uint32 num_domains2; /* number of domains */
+ UNIHDR2 *hdr_domain_name;
+ UNISTR2 *uni_domain_name;
+ DOM_SID2 *domain_sid;
- uint32 status; /* return code */
+ uint32 status; /* return code */
} LSA_R_ENUM_TRUST_DOM;
} LSA_R_CLOSE;
-#define MAX_REF_DOMAINS 10
+#define MAX_REF_DOMAINS 32
/* DOM_TRUST_HDR */
typedef struct dom_trust_hdr
/* DOM_R_REF */
typedef struct dom_ref_info
{
- uint32 undoc_buffer; /* undocumented buffer pointer. */
- uint32 num_ref_doms_1; /* num referenced domains */
- uint32 undoc_buffer2; /* undocumented domain name buffer pointer. */
- uint32 max_entries; /* 32 - max number of entries */
- uint32 num_ref_doms_2; /* num referenced domains */
+ uint32 num_ref_doms_1; /* num referenced domains */
+ uint32 ptr_ref_dom; /* pointer to referenced domains */
+ uint32 max_entries; /* 32 - max number of entries */
+ uint32 num_ref_doms_2; /* num referenced domains */
- DOM_TRUST_HDR hdr_ref_dom[MAX_REF_DOMAINS]; /* referenced domains */
- DOM_TRUST_INFO ref_dom [MAX_REF_DOMAINS]; /* referenced domains */
+ DOM_TRUST_HDR hdr_ref_dom[MAX_REF_DOMAINS]; /* referenced domains */
+ DOM_TRUST_INFO ref_dom [MAX_REF_DOMAINS]; /* referenced domains */
} DOM_R_REF;
/* 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 */
uint32 ptr_trans_names;
uint32 num_entries2;
- LSA_TRANS_NAME name [MAX_LOOKUP_SIDS]; /* translated names */
- UNISTR2 uni_name[MAX_LOOKUP_SIDS];
+ LSA_TRANS_NAME *name; /* translated names */
+ UNISTR2 *uni_name;
} LSA_TRANS_NAME_ENUM;
uint32 ptr_sid_enum;
uint32 num_entries2;
- uint32 ptr_sid[MAX_LOOKUP_SIDS]; /* domain SID pointers to be looked up. */
- DOM_SID2 sid [MAX_LOOKUP_SIDS]; /* domain SIDs to be looked up. */
+ uint32 *ptr_sid; /* domain SID pointers to be looked up. */
+ DOM_SID2 *sid; /* domain SIDs to be looked up. */
} LSA_SID_ENUM;
/* LSA_R_LOOKUP_SIDS - response to LSA Lookup SIDs */
typedef struct lsa_r_lookup_sids
{
+ uint32 ptr_dom_ref;
DOM_R_REF *dom_ref; /* domain reference info */
+
LSA_TRANS_NAME_ENUM *names;
uint32 mapped_count;
} LSA_R_LOOKUP_SIDS;
-/* DOM_NAME - XXXX not sure about this structure */
-typedef struct dom_name_info
+/* LSA_Q_LOOKUP_NAMES - LSA Lookup NAMEs */
+typedef struct lsa_q_lookup_names
{
- uint32 uni_str_len;
- UNISTR str;
-
-} DOM_NAME;
+ POLICY_HND pol; /* policy handle */
+ uint32 num_entries;
+ uint32 num_entries2;
+ UNIHDR *hdr_name; /* name buffer pointers */
+ UNISTR2 *uni_name; /* names to be looked up */
+ uint32 num_trans_entries;
+ uint32 ptr_trans_sids; /* undocumented domain SID buffer pointer */
+ uint32 lookup_level;
+ uint32 mapped_count;
-#define UNKNOWN_LEN 1
+} LSA_Q_LOOKUP_NAMES;
-/* LSA_Q_LOOKUP_RIDS - LSA Lookup RIDs */
-typedef struct lsa_q_lookup_rids
-{
- POLICY_HND pol; /* policy handle */
- uint32 num_entries;
- uint32 num_entries2;
- uint32 buffer_dom_sid; /* undocumented domain SID buffer pointer */
- uint32 buffer_dom_name; /* undocumented domain name buffer pointer */
- DOM_NAME lookup_name[MAX_LOOKUP_SIDS]; /* names to be looked up */
- uint8 undoc[UNKNOWN_LEN]; /* completely undocumented bytes of unknown length */
-
-} LSA_Q_LOOKUP_RIDS;
-
-/* LSA_R_LOOKUP_RIDS - response to LSA Lookup RIDs by name */
-typedef struct lsa_r_lookup_rids
+/* LSA_R_LOOKUP_NAMES - response to LSA Lookup NAMEs by name */
+typedef struct lsa_r_lookup_names
{
- DOM_R_REF dom_ref; /* domain reference info */
+ uint32 ptr_dom_ref;
+ DOM_R_REF *dom_ref; /* domain reference info */
- uint32 num_entries;
- uint32 undoc_buffer; /* undocumented buffer pointer */
+ uint32 num_entries;
+ uint32 ptr_entries;
+ uint32 num_entries2;
+ DOM_RID2 *dom_rid; /* domain RIDs being looked up */
- uint32 num_entries2;
- DOM_RID2 dom_rid[MAX_LOOKUP_SIDS]; /* domain RIDs being looked up */
+ uint32 mapped_count;
- uint32 num_entries3;
+ uint32 status; /* return code */
- uint32 status; /* return code */
+} LSA_R_LOOKUP_NAMES;
-} LSA_R_LOOKUP_RIDS;
+/* This is probably a policy handle but at the moment we
+ never read it - so use a dummy struct. */
+typedef struct lsa_q_open_secret
+{
+ uint32 dummy;
+} LSA_Q_OPEN_SECRET;
-#endif /* _RPC_LSA_H */
+/* We always return "not found" at present - so just marshal the minimum. */
+typedef struct lsa_r_open_secret
+{
+ uint32 dummy1;
+ uint32 dummy2;
+ uint32 dummy3;
+ uint32 dummy4;
+ uint32 status;
+} LSA_R_OPEN_SECRET;
+
+#endif /* _RPC_LSA_H */