diff options
author | Jeremy Allison <jra@samba.org> | 2006-02-11 05:36:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:04 -0500 |
commit | 85160e654e5a1fc4fcb0d6cecc5187cc3b62f6d7 (patch) | |
tree | 228a61bb8acaa6055fb3c2c377173afab0b330d1 /source3/rpc_server | |
parent | 785c78b79517c8b4c776abebcd4edc90141df3a2 (diff) | |
download | samba-85160e654e5a1fc4fcb0d6cecc5187cc3b62f6d7.tar.gz samba-85160e654e5a1fc4fcb0d6cecc5187cc3b62f6d7.tar.bz2 samba-85160e654e5a1fc4fcb0d6cecc5187cc3b62f6d7.zip |
r13458: Add parsing functions - but stub internals for lookupnames3 and 4.
Jeremy.
(This used to be commit f1a362580ae37730dc8393a79f832aed5d0ea4be)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa.c | 66 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 17 |
2 files changed, 82 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c index e20b4e18b4..286266f30d 100644 --- a/source3/rpc_server/srv_lsa.c +++ b/source3/rpc_server/srv_lsa.c @@ -1007,6 +1007,68 @@ static BOOL api_lsa_lookup_names2(pipes_struct *p) return True; } +/*************************************************************************** + api_lsa_lookup_names3 + ***************************************************************************/ + +static BOOL api_lsa_lookup_names3(pipes_struct *p) +{ + LSA_Q_LOOKUP_NAMES3 q_u; + LSA_R_LOOKUP_NAMES3 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_names3("", &q_u, data, 0)) { + DEBUG(0,("api_lsa_lookup_names3: failed to unmarshall LSA_Q_LOOKUP_NAMES3.\n")); + return False; + } + + r_u.status = _lsa_lookup_names3(p, &q_u, &r_u); + + /* store the response in the SMB stream */ + if(!lsa_io_r_lookup_names3("", &r_u, rdata, 0)) { + DEBUG(0,("api_lsa_lookup_names3: Failed to marshall LSA_R_LOOKUP_NAMES3.\n")); + return False; + } + + return True; +} + +/*************************************************************************** + api_lsa_lookup_names4 + ***************************************************************************/ + +static BOOL api_lsa_lookup_names4(pipes_struct *p) +{ + LSA_Q_LOOKUP_NAMES4 q_u; + LSA_R_LOOKUP_NAMES4 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_names4("", &q_u, data, 0)) { + DEBUG(0,("api_lsa_lookup_names4: failed to unmarshall LSA_Q_LOOKUP_NAMES4.\n")); + return False; + } + + r_u.status = _lsa_lookup_names4(p, &q_u, &r_u); + + /* store the response in the SMB stream */ + if(!lsa_io_r_lookup_names4("", &r_u, rdata, 0)) { + DEBUG(0,("api_lsa_lookup_names4: Failed to marshall LSA_R_LOOKUP_NAMES4.\n")); + return False; + } + + return True; +} + #if 0 /* AD DC work in ongoing in Samba 4 */ /*************************************************************************** @@ -1078,7 +1140,9 @@ static struct api_struct api_lsa_cmds[] = { "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 } + { "LSA_LOOKUPNAMES3" , LSA_LOOKUPNAMES3 , api_lsa_lookup_names3 }, + { "LSA_LOOKUPSIDS3" , LSA_LOOKUPSIDS3 , api_lsa_lookup_sids3 }, + { "LSA_LOOKUPNAMES4" , LSA_LOOKUPNAMES4 , api_lsa_lookup_names4 } #if 0 /* AD DC work in ongoing in Samba 4 */ /* be careful of the adding of new RPC's. See commentrs below about ADS DC capabilities */ diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 200cdb8d9e..038ec06715 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -1026,6 +1026,23 @@ done: return r_u->status; } +/*************************************************************************** +lsa_reply_lookup_names3 - stub for now. + ***************************************************************************/ + +NTSTATUS _lsa_lookup_names3(pipes_struct *p, LSA_Q_LOOKUP_NAMES3 *q_u, LSA_R_LOOKUP_NAMES3 *r_u) +{ + return NT_STATUS_ACCESS_DENIED; +} + +/*************************************************************************** +lsa_reply_lookup_names4 - stub for now. + ***************************************************************************/ + +NTSTATUS _lsa_lookup_names4(pipes_struct *p, LSA_Q_LOOKUP_NAMES4 *q_u, LSA_R_LOOKUP_NAMES4 *r_u) +{ + return NT_STATUS_ACCESS_DENIED; +} /*************************************************************************** _lsa_close. Also weird - needs to check if lsa handle is correct. JRA. |