summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-11-25 19:57:04 +0000
committerLuke Leighton <lkcl@samba.org>1998-11-25 19:57:04 +0000
commit59d4087160ba41aac724722dc29c4b6e4e3b69b0 (patch)
tree33f6d26853fdb2fbb2c7e249bef81e49bab96316 /source3/include
parent73106d9baeb325d1d89d0242d0045695a71acf4d (diff)
downloadsamba-59d4087160ba41aac724722dc29c4b6e4e3b69b0.tar.gz
samba-59d4087160ba41aac724722dc29c4b6e4e3b69b0.tar.bz2
samba-59d4087160ba41aac724722dc29c4b6e4e3b69b0.zip
LsaLookupNames client call (first used as lookupnames command in rpcclient).
(This used to be commit 68342a29a892e515cf2b22d759476d61944bcd59)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h17
-rw-r--r--source3/include/rpc_lsa.h43
-rw-r--r--source3/include/rpc_misc.h21
3 files changed, 43 insertions, 38 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 33c734a210..6fbc2d3192 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1252,11 +1252,11 @@ BOOL pm_process( char *FileName,
/*The following definitions come from passdb/ldap.c */
-struct passdb_ops *ldap_initialize_password_db(void);
+struct passdb_ops *ldap_initialise_password_db(void);
/*The following definitions come from passdb/nispass.c */
-struct passdb_ops *nisplus_initialize_password_db(void);
+struct passdb_ops *nisplus_initialise_password_db(void);
/*The following definitions come from passdb/pass_check.c */
@@ -1412,6 +1412,12 @@ BOOL cli_nt_logoff(struct cli_state *cli, NET_ID_INFO_CTR *ctr);
BOOL do_lsa_open_policy(struct cli_state *cli,
char *server_name, POLICY_HND *hnd,
BOOL sec_qos);
+BOOL do_lsa_lookup_names(struct cli_state *cli,
+ POLICY_HND *hnd,
+ int num_names,
+ char **names,
+ DOM_SID **sids,
+ int *num_sids);
BOOL do_lsa_lookup_sids(struct cli_state *cli,
POLICY_HND *hnd,
int num_sids,
@@ -1591,8 +1597,10 @@ void make_q_lookup_sids(LSA_Q_LOOKUP_SIDS *q_l, POLICY_HND *hnd,
uint16 level);
void lsa_io_q_lookup_sids(char *desc, LSA_Q_LOOKUP_SIDS *q_s, prs_struct *ps, int depth);
void lsa_io_r_lookup_sids(char *desc, LSA_R_LOOKUP_SIDS *r_s, prs_struct *ps, int depth);
-void lsa_io_q_lookup_rids(char *desc, LSA_Q_LOOKUP_RIDS *q_r, prs_struct *ps, int depth);
-void lsa_io_r_lookup_rids(char *desc, LSA_R_LOOKUP_RIDS *r_r, prs_struct *ps, int depth);
+void make_q_lookup_names(LSA_Q_LOOKUP_NAMES *q_l, POLICY_HND *hnd,
+ int num_names, char **names);
+void lsa_io_q_lookup_names(char *desc, LSA_Q_LOOKUP_NAMES *q_r, prs_struct *ps, int depth);
+void lsa_io_r_lookup_names(char *desc, LSA_R_LOOKUP_NAMES *r_r, prs_struct *ps, int depth);
void make_lsa_q_close(LSA_Q_CLOSE *q_c, POLICY_HND *hnd);
void lsa_io_q_close(char *desc, LSA_Q_CLOSE *q_c, prs_struct *ps, int depth);
void lsa_io_r_close(char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth);
@@ -2283,6 +2291,7 @@ BOOL api_wkssvc_rpc(pipes_struct *p, prs_struct *data);
/*The following definitions come from rpcclient/cmd_lsarpc.c */
void cmd_lsa_query_info(struct client_info *info);
+void cmd_lsa_lookup_names(struct client_info *info);
void cmd_lsa_lookup_sids(struct client_info *info);
/*The following definitions come from rpcclient/cmd_netlogon.c */
diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h
index b8aaa562f0..1df18a7674 100644
--- a/source3/include/rpc_lsa.h
+++ b/source3/include/rpc_lsa.h
@@ -48,9 +48,6 @@ enum SID_NAME_USE
#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
@@ -290,37 +287,37 @@ typedef struct lsa_r_lookup_sids
} LSA_R_LOOKUP_SIDS;
-#define UNKNOWN_LEN 1
-
-/* LSA_Q_LOOKUP_RIDS - LSA Lookup RIDs */
-typedef struct lsa_q_lookup_rids
+/* LSA_Q_LOOKUP_NAMES - LSA Lookup NAMEs */
+typedef struct lsa_q_lookup_names
{
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 */
- UNISTR3 lookup_name[MAX_LOOKUP_SIDS]; /* names to be looked up */
- uint8 undoc[UNKNOWN_LEN]; /* completely undocumented bytes of unknown length */
+ UNIHDR hdr_name[MAX_LOOKUP_SIDS]; /* name buffer pointers */
+ UNISTR2 uni_name[MAX_LOOKUP_SIDS]; /* names to be looked up */
-} LSA_Q_LOOKUP_RIDS;
+ uint32 num_trans_entries;
+ uint32 ptr_trans_sids; /* undocumented domain SID buffer pointer */
+ uint32 lookup_level;
+ uint32 mapped_count;
-/* LSA_R_LOOKUP_RIDS - response to LSA Lookup RIDs by name */
-typedef struct lsa_r_lookup_rids
-{
- DOM_R_REF dom_ref; /* domain reference info */
+} LSA_Q_LOOKUP_NAMES;
- uint32 num_entries;
- uint32 undoc_buffer; /* undocumented buffer pointer */
+/* 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 num_entries2;
- DOM_RID2 dom_rid[MAX_LOOKUP_SIDS]; /* domain RIDs being looked up */
+ uint32 num_entries;
+ uint32 undoc_buffer; /* undocumented buffer pointer */
+ uint32 num_entries2;
+ DOM_RID2 *dom_rid; /* domain RIDs being looked up */
- uint32 num_entries3;
+ uint32 mapped_count;
- uint32 status; /* return code */
+ uint32 status; /* return code */
-} LSA_R_LOOKUP_RIDS;
+} LSA_R_LOOKUP_NAMES;
#endif /* _RPC_LSA_H */
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index aa1f100dfb..786aad32d2 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -188,29 +188,28 @@ typedef struct unistr3_info
/* DOM_RID2 - domain RID structure for ntlsa pipe */
typedef struct domrid2_info
{
- uint32 type; /* value is 5 */
- uint32 undoc; /* value is non-zero */
- uint32 rid;
- uint32 rid_idx; /* don't know what this is */
+ uint8 type; /* value is SID_NAME_USE enum */
+ uint32 rid;
+ uint32 rid_idx; /* referenced domain index */
} DOM_RID2;
/* DOM_RID3 - domain RID structure for samr pipe */
typedef struct domrid3_info
{
- uint32 rid; /* domain-relative (to a SID) id */
- uint32 type1; /* value is 0x1 */
- uint32 ptr_type; /* undocumented pointer */
- uint32 type2; /* value is 0x1 */
+ uint32 rid; /* domain-relative (to a SID) id */
+ uint32 type1; /* value is 0x1 */
+ uint32 ptr_type; /* undocumented pointer */
+ uint32 type2; /* value is 0x1 */
} DOM_RID3;
/* DOM_RID4 - rid + user attributes */
typedef struct domrid4_info
{
- uint32 unknown;
- uint16 attr;
- uint32 rid; /* user RID */
+ uint32 unknown;
+ uint16 attr;
+ uint32 rid; /* user RID */
} DOM_RID4;