diff options
author | Jeremy Allison <jra@samba.org> | 2006-02-11 04:25:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:04 -0500 |
commit | 785c78b79517c8b4c776abebcd4edc90141df3a2 (patch) | |
tree | a5b109ce37d9d8439c01613bad9de39dfd5e0ea3 /source3/rpc_server/srv_lsa.c | |
parent | e22d38bddef441eaaa5b0b0c5dbc92225e20f912 (diff) | |
download | samba-785c78b79517c8b4c776abebcd4edc90141df3a2.tar.gz samba-785c78b79517c8b4c776abebcd4edc90141df3a2.tar.bz2 samba-785c78b79517c8b4c776abebcd4edc90141df3a2.zip |
r13456: Add lsa_lookup_names2.
Jeremy.
(This used to be commit b57406c89feaf550f6c2d29ef0ed73a935908add)
Diffstat (limited to 'source3/rpc_server/srv_lsa.c')
-rw-r--r-- | source3/rpc_server/srv_lsa.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c index 0818ba3eac..e20b4e18b4 100644 --- a/source3/rpc_server/srv_lsa.c +++ b/source3/rpc_server/srv_lsa.c @@ -976,6 +976,37 @@ static BOOL api_lsa_lookup_sids3(pipes_struct *p) return True; } +/*************************************************************************** + api_lsa_lookup_names2 + ***************************************************************************/ + +static BOOL api_lsa_lookup_names2(pipes_struct *p) +{ + LSA_Q_LOOKUP_NAMES2 q_u; + LSA_R_LOOKUP_NAMES2 r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + /* grab the info class and policy handle */ + if(!lsa_io_q_lookup_names2("", &q_u, data, 0)) { + DEBUG(0,("api_lsa_lookup_names2: failed to unmarshall LSA_Q_LOOKUP_NAMES2.\n")); + return False; + } + + r_u.status = _lsa_lookup_names2(p, &q_u, &r_u); + + /* store the response in the SMB stream */ + if(!lsa_io_r_lookup_names2("", &r_u, rdata, 0)) { + DEBUG(0,("api_lsa_lookup_names2: Failed to marshall LSA_R_LOOKUP_NAMES2.\n")); + return False; + } + + return True; +} + #if 0 /* AD DC work in ongoing in Samba 4 */ /*************************************************************************** @@ -1046,6 +1077,7 @@ static struct api_struct api_lsa_cmds[] = { "LSA_SETSECRET" , LSA_SETSECRET , api_lsa_set_secret }, { "LSA_DELETEOBJECT" , LSA_DELETEOBJECT , api_lsa_delete_object }, { "LSA_LOOKUPSIDS2" , LSA_LOOKUPSIDS2 , api_lsa_lookup_sids2 }, + { "LSA_LOOKUPNAMES2" , LSA_LOOKUPNAMES2 , api_lsa_lookup_names2 }, { "LSA_LOOKUPSIDS3" , LSA_LOOKUPSIDS3 , api_lsa_lookup_sids3 } #if 0 /* AD DC work in ongoing in Samba 4 */ /* be careful of the adding of new RPC's. See commentrs below about |