diff options
author | Tim Potter <tpot@samba.org> | 2000-12-13 12:39:55 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-12-13 12:39:55 +0000 |
commit | ed6f6ca043a5a5cc5af9b80894abab82d9ce8d71 (patch) | |
tree | 585f0f0be0be793e238560b3ff6b9ace093a714c /source3 | |
parent | 6de135b0b2a9face6d1f5c1300c1a1ff4b68e251 (diff) | |
download | samba-ed6f6ca043a5a5cc5af9b80894abab82d9ce8d71.tar.gz samba-ed6f6ca043a5a5cc5af9b80894abab82d9ce8d71.tar.bz2 samba-ed6f6ca043a5a5cc5af9b80894abab82d9ce8d71.zip |
Server side changes for dynamic names in lsa_lookup_names
(This used to be commit 5c5c3a8a08efe8c2f36a55b1383e9d3dd9eca4a5)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 15 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa.c | 15 |
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; } /*************************************************************************** |