diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-01 22:25:38 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-01 22:25:38 +0000 |
commit | 7032daa88719697076c61fcee6f2140a80eb7128 (patch) | |
tree | adcd2d76f5bbebf91241c63169c9b2cb428167dd /source3/include | |
parent | de573ca8916bbe5d67bc1f38cf23c98f43ad0aaa (diff) | |
download | samba-7032daa88719697076c61fcee6f2140a80eb7128.tar.gz samba-7032daa88719697076c61fcee6f2140a80eb7128.tar.bz2 samba-7032daa88719697076c61fcee6f2140a80eb7128.zip |
added lsaenumdomains command.
attempting to get blood out of a stone^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H
querysecret to work, it keeps returning access denied.
(This used to be commit 953fe6ba9454fa4b8e69426527eca37b011f76ac)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/proto.h | 20 | ||||
-rw-r--r-- | source3/include/rpc_lsa.h | 18 |
2 files changed, 26 insertions, 12 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index c570b9a4af..cc7e392959 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1739,6 +1739,9 @@ BOOL cli_nt_logoff(struct cli_state *cli, uint16 fnum, NET_ID_INFO_CTR *ctr); BOOL lsa_open_policy(struct cli_state *cli, uint16 fnum, const char *server_name, POLICY_HND *hnd, BOOL sec_qos); +BOOL lsa_open_policy2(struct cli_state *cli, uint16 fnum, + const char *server_name, POLICY_HND *hnd, + BOOL sec_qos); BOOL lsa_open_secret(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd_pol, char *secret_name, uint32 des_access, POLICY_HND *hnd_secret); @@ -1762,6 +1765,10 @@ BOOL lsa_lookup_sids(struct cli_state *cli, uint16 fnum, BOOL lsa_query_info_pol(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd, uint16 info_class, fstring domain_name, DOM_SID *domain_sid); +BOOL lsa_enum_trust_dom(struct cli_state *cli, uint16 fnum, + POLICY_HND *hnd, uint32 *enum_ctx, + uint32 *num_doms, char ***names, + DOM_SID ***sids); BOOL lsa_close(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd); /*The following definitions come from rpc_client/cli_netlogon.c */ @@ -2124,7 +2131,7 @@ BOOL make_q_open_pol(LSA_Q_OPEN_POL *r_q, uint16 system_name, LSA_SEC_QOS *qos); BOOL lsa_io_q_open_pol(char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps, int depth); BOOL lsa_io_r_open_pol(char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps, int depth); -BOOL make_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, char *server_name, +BOOL make_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, const char *server_name, uint32 attributes, uint32 desired_access, LSA_SEC_QOS *qos); @@ -2141,11 +2148,15 @@ BOOL lsa_io_secret_info(char *desc, LSA_SECRET_INFO *info, prs_struct *ps, int d BOOL make_q_query_secret(LSA_Q_QUERY_SECRET *q_q, POLICY_HND *pol); BOOL lsa_io_q_query_secret(char *desc, LSA_Q_QUERY_SECRET *q_q, prs_struct *ps, int depth); BOOL lsa_io_r_query_secret(char *desc, LSA_R_QUERY_SECRET *r_q, prs_struct *ps, int depth); +BOOL make_q_enum_trust_dom(LSA_Q_ENUM_TRUST_DOM *q_e, + POLICY_HND *pol, + uint32 enum_context, uint32 preferred_len); BOOL lsa_io_q_enum_trust_dom(char *desc, LSA_Q_ENUM_TRUST_DOM *q_e, prs_struct *ps, int depth); BOOL make_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM *r_e, - uint32 enum_context, char *domain_name, DOM_SID *domain_sid, - uint32 status); -BOOL lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e, prs_struct *ps, int depth); + int32 enum_context, + char *domain_name, DOM_SID *domain_sid, + uint32 status); +BOOL lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e, prs_struct *ps, int depth); BOOL lsa_io_r_query(char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps, int depth); BOOL make_lsa_sid_enum(LSA_SID_ENUM *sen, uint32 num_entries, DOM_SID **sids); BOOL make_q_lookup_sids(LSA_Q_LOOKUP_SIDS *q_l, POLICY_HND *hnd, @@ -3226,6 +3237,7 @@ void cmd_eventlog(struct client_info *info); /*The following definitions come from rpcclient/cmd_lsarpc.c */ +void cmd_lsa_enum_trust_dom(struct client_info *info); 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); diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h index 02f8a63ab8..7c27df0238 100644 --- a/source3/include/rpc_lsa.h +++ b/source3/include/rpc_lsa.h @@ -94,7 +94,7 @@ typedef struct obj_attr_info typedef struct lsa_q_open_pol_info { uint32 ptr; /* undocumented buffer pointer */ - uint16 system_name; /* 0x5c - system name */ + uint16 system_name; /* system name BUG!!! (should be \\server!) */ LSA_OBJ_ATTR attr ; /* object attributes */ uint32 des_access; /* desired access attributes */ @@ -214,11 +214,13 @@ typedef struct lsa_r_query_secret_info typedef struct lsa_enum_trust_dom_info { POLICY_HND pol; /* policy handle */ - uint32 enum_context; /* enumeration context handle */ - uint32 preferred_len; /* preferred maximum length */ + uint32 enum_context; /* enumeration context handle */ + uint32 preferred_len; /* preferred maximum length */ } LSA_Q_ENUM_TRUST_DOM; +#define MAX_TRUSTED_DOMS 10 + /* LSA_R_ENUM_TRUST_DOM - response to LSA enumerate trusted domains */ typedef struct lsa_r_enum_trust_dom_info { @@ -227,12 +229,12 @@ typedef struct lsa_r_enum_trust_dom_info 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[MAX_TRUSTED_DOMS]; + UNISTR2 uni_domain_name[MAX_TRUSTED_DOMS]; + DOM_SID2 domain_sid[MAX_TRUSTED_DOMS]; - uint32 status; /* return code */ + uint32 status; /* return code */ } LSA_R_ENUM_TRUST_DOM; |