summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-05-16 19:45:26 +0000
committerJeremy Allison <jra@samba.org>2000-05-16 19:45:26 +0000
commit91b736d2586d1dcfeb3a5ea915608411e5de440f (patch)
treeb0365868b6fa1616679368fb80ad23684f222ecc /source3/include
parent8114e7f188dfce33b9508e0774f78c3e518aaa55 (diff)
downloadsamba-91b736d2586d1dcfeb3a5ea915608411e5de440f.tar.gz
samba-91b736d2586d1dcfeb3a5ea915608411e5de440f.tar.bz2
samba-91b736d2586d1dcfeb3a5ea915608411e5de440f.zip
Synced up srv_samr with HP changes. Added error checking to original code
- what a concept :-). All this code will be replaced with TNG stuff anyway, so not a big deal.... Jeremy. (This used to be commit b090cff4b5fcdef01fc553e6359627bb2285d68e)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h16
-rw-r--r--source3/include/rpc_samr_old.h91
2 files changed, 91 insertions, 16 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index ccfa056ee5..cf3929f68d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2291,9 +2291,8 @@ void init_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO *q_e,
POLICY_HND *pol,
uint16 switch_level);
BOOL samr_io_q_query_aliasinfo(char *desc, SAMR_Q_QUERY_ALIASINFO *q_e, prs_struct *ps, int depth);
-void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO *r_u,
- uint16 switch_value, char *acct_desc,
- uint32 status);
+void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO *r_u, uint32 switch_level,
+ char* alias, char* alias_desc);
BOOL samr_io_r_query_aliasinfo(char *desc, SAMR_R_QUERY_ALIASINFO *r_u, prs_struct *ps, int depth);
BOOL samr_io_q_lookup_ids(char *desc, SAMR_Q_LOOKUP_IDS *q_u, prs_struct *ps, int depth);
void init_samr_r_lookup_ids(SAMR_R_LOOKUP_IDS *r_u,
@@ -2398,6 +2397,17 @@ void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER *q_u,
BOOL samr_io_q_chgpasswd_user(char *desc, SAMR_Q_CHGPASSWD_USER *q_u, prs_struct *ps, int depth);
void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER *r_u, uint32 status);
BOOL samr_io_r_chgpasswd_user(char *desc, SAMR_R_CHGPASSWD_USER *r_u, prs_struct *ps, int depth);
+BOOL samr_io_q_lookup_domain(char* desc, SAMR_Q_LOOKUP_DOMAIN* q_u, prs_struct *ps, int depth);
+BOOL init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN * r_u,
+ DOM_SID *dom_sid, uint32 status);
+BOOL samr_io_r_lookup_domain(char *desc, SAMR_R_LOOKUP_DOMAIN * r_u,
+ prs_struct *ps, int depth);
+BOOL samr_io_q_enum_domains(char *desc, SAMR_Q_ENUM_DOMAINS * q_e,
+ prs_struct *ps, int depth);
+BOOL init_samr_r_enum_domains(SAMR_R_ENUM_DOMAINS * r_u,
+ uint32 next_idx, fstring* domains, uint32 num_sam_entries);
+BOOL samr_io_r_enum_domains(char *desc, SAMR_R_ENUM_DOMAINS * r_u,
+ prs_struct *ps, int depth);
#endif
/*The following definitions come from rpc_parse/parse_sec.c */
diff --git a/source3/include/rpc_samr_old.h b/source3/include/rpc_samr_old.h
index 26dd2bf447..29c1672425 100644
--- a/source3/include/rpc_samr_old.h
+++ b/source3/include/rpc_samr_old.h
@@ -78,6 +78,8 @@ SamrTestPrivateFunctionsUser
********************************************************************/
#define SAMR_CLOSE_HND 0x01
+#define SAMR_LOOKUP_DOMAIN 0x05
+#define SAMR_ENUM_DOMAINS 0x06
#define SAMR_OPEN_DOMAIN 0x07
#define SAMR_QUERY_DOMAIN_INFO 0x08
#define SAMR_LOOKUP_IDS 0x10
@@ -404,7 +406,7 @@ typedef struct r_samr_query_domain_info
} SAMR_R_QUERY_DOMAIN_INFO;
-
+
/****************************************************************************
SAMR_Q_OPEN_DOMAIN - unknown_0 values seen associated with SIDs:
@@ -431,7 +433,7 @@ typedef struct r_samr_open_domain_info
} SAMR_R_OPEN_DOMAIN;
-#define MAX_SAM_ENTRIES 250
+#define MAX_SAM_ENTRIES 600
typedef struct samr_entry_info
{
@@ -565,6 +567,59 @@ typedef struct r_samr_enum_dom_aliases_info
} SAMR_R_ENUM_DOM_ALIASES;
+/***************************************************************************
+ SAMR_Q_LOOKUP_DOMAIN - obtain SID for a local domain
+ ***************************************************************************/
+typedef struct q_samr_lookup_domain_info
+{
+ POLICY_HND connect_pol;
+
+ UNIHDR hdr_domain;
+ UNISTR2 uni_domain;
+
+} SAMR_Q_LOOKUP_DOMAIN;
+
+/* SAMR_R_LOOKUP_DOMAIN */
+typedef struct r_samr_lookup_domain_info
+{
+ uint32 ptr_sid;
+ DOM_SID2 dom_sid;
+
+ uint32 status;
+
+} SAMR_R_LOOKUP_DOMAIN;
+
+/**********************************************************************
+ SAMR_Q_ENUM_DOMAINS - SAM rids and names
+ **********************************************************************/
+typedef struct q_samr_enum_domains_info
+{
+ POLICY_HND pol; /* policy handle */
+
+ uint32 start_idx; /* enumeration handle */
+ uint32 max_size; /* 0x0000 ffff */
+
+} SAMR_Q_ENUM_DOMAINS;
+
+/* SAMR_R_ENUM_DOMAINS - SAM rids and Domain names */
+typedef struct r_samr_enum_domains_info
+{
+ uint32 next_idx; /* next starting index required for enum */
+ uint32 ptr_entries1;
+
+ uint32 num_entries2;
+ uint32 ptr_entries2;
+
+ uint32 num_entries3;
+
+ SAM_ENTRY *sam;
+ UNISTR2 *uni_dom_name;
+
+ uint32 num_entries4;
+
+ uint32 status;
+
+} SAMR_R_ENUM_DOMAINS;
/* SAMR_Q_QUERY_DISPINFO - SAM rids, names and descriptions */
@@ -573,9 +628,8 @@ typedef struct q_samr_query_disp_info
POLICY_HND pol; /* policy handle */
uint16 switch_level; /* 0x0001 and 0x0002 seen */
- uint16 unknown_0; /* 0x0000 and 0x2000 seen */
uint32 start_idx; /* presumably the start enumeration index */
- uint32 unknown_1; /* 0x0000 07d0, 0x0000 0400 and 0x0000 0200 seen */
+ uint32 max_entries; /* 0x0000 07d0, 0x0000 0400 and 0x0000 0200 seen */
uint32 max_size; /* 0x0000 7fff, 0x0000 7ffe and 0x0000 3fff seen*/
@@ -679,10 +733,19 @@ typedef struct q_samr_enum_alias_info
{
POLICY_HND pol; /* policy handle */
- uint16 switch_level; /* 0x0003 seen */
+ uint16 switch_level; /* 0x0003 seen (0x0001 seen from NT5) */
} SAMR_Q_QUERY_ALIASINFO;
+typedef struct samr_alias_info1
+{
+ uint32 switch_value_1;
+ UNIHDR hdr_alias_name;
+ UNISTR2 uni_alias_name;
+ UNIHDR hdr_alias_desc;
+ UNISTR2 uni_alias_desc;
+} ALIAS_INFO1;
+
typedef struct samr_alias_info3
{
UNIHDR hdr_acct_desc;
@@ -693,17 +756,18 @@ typedef struct samr_alias_info3
/* SAMR_R_QUERY_ALIASINFO - SAM rids, names and descriptions */
typedef struct r_samr_query_aliasinfo_info
{
- uint32 ptr;
- uint16 switch_value; /* 0x0003 */
- /* uint8[2] padding */
+ uint32 ptr;
+ uint16 switch_value; /* 0x0003 */
+ /* uint8[2] padding */
- union
- {
- ALIAS_INFO3 info3;
+ union
+ {
+ ALIAS_INFO1 info1;
+ ALIAS_INFO3 info3;
- } alias;
+ } alias;
- uint32 status;
+ uint32 status;
} SAMR_R_QUERY_ALIASINFO;
@@ -1016,6 +1080,7 @@ typedef struct r_samr_unknown_38
uint16 unk_0;
uint16 unk_1;
uint16 unk_2;
+ uint16 unk_3;
uint32 status; /* return status */
} SAMR_R_UNKNOWN_38;