summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h15
-rw-r--r--source3/rpc_server/srv_lsa.c15
2 files changed, 10 insertions, 20 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1801164981..400517b9d7 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -651,21 +651,6 @@ struct in_addr wins_srv_ip( void );
void wins_srv_died( struct in_addr boothill_ip );
unsigned long wins_srv_count( void );
-/*The following definitions come from libsmb/cli_lsarpc.c */
-
-struct cli_state *cli_lsa_initialise(struct cli_state *cli, char *system_name,
- struct ntuser_creds *creds);
-void cli_lsa_shutdown(struct cli_state *cli);
-uint32 cli_lsa_open_policy(struct cli_state *cli, BOOL sec_qos,
- uint32 des_access, POLICY_HND *hnd);
-uint32 cli_lsa_close(struct cli_state *cli, POLICY_HND *hnd);
-uint32 cli_lsa_lookup_sids(struct cli_state *cli, POLICY_HND *hnd,
- int num_sids, DOM_SID *sids, char ***names,
- uint32 **types, int *num_names);
-uint32 cli_lsa_lookup_names(struct cli_state *cli, POLICY_HND *hnd,
- int num_names, char **names, DOM_SID **sids,
- uint32 **types, int *num_sids);
-
/*The following definitions come from libsmb/cliconnect.c */
BOOL cli_session_setup(struct cli_state *cli,
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c
index 38f4936209..5bc780860f 100644
--- a/source3/rpc_server/srv_lsa.c
+++ b/source3/rpc_server/srv_lsa.c
@@ -402,13 +402,17 @@ static BOOL lsa_reply_lookup_sids(prs_struct *rdata, DOM_SID2 *sid, int num_entr
lsa_reply_lookup_names
***************************************************************************/
-static BOOL lsa_reply_lookup_names(prs_struct *rdata,
- UNISTR2 names[MAX_LOOKUP_SIDS], int num_entries)
+static BOOL lsa_reply_lookup_names(prs_struct *rdata, UNISTR2 *names,
+ int num_entries)
{
LSA_R_LOOKUP_NAMES r_l;
DOM_R_REF ref;
DOM_RID2 rids[MAX_LOOKUP_SIDS];
uint32 mapped_count = 0;
+ TALLOC_CTX *mem_ctx = talloc_init();
+ BOOL result = True;
+
+ if (!mem_ctx) return False;
ZERO_STRUCT(r_l);
ZERO_STRUCT(ref);
@@ -419,12 +423,13 @@ static BOOL lsa_reply_lookup_names(prs_struct *rdata,
init_reply_lookup_names(&r_l, &ref, num_entries, rids, mapped_count);
/* store the response in the SMB stream */
- if(!lsa_io_r_lookup_names("", &r_l, rdata, 0)) {
+ if(!lsa_io_r_lookup_names(mem_ctx, "", &r_l, rdata, 0)) {
DEBUG(0,("lsa_reply_lookup_names: Failed to marshall LSA_R_LOOKUP_NAMES.\n"));
- return False;
+ result = False;
}
- return True;
+ talloc_destroy(mem_ctx);
+ return result;
}
/***************************************************************************