summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-06 19:19:29 +0100
committerGünther Deschner <gd@samba.org>2008-02-08 22:44:18 +0100
commit02abf612c8d7d6c9672df1f8ce02659737dc9254 (patch)
tree55e863b727d5d6c3704798d6f63a9324ed873fdb /source3/rpc_server
parent026dddcbcd630a0f919af0e79fab9f8cf5c81e6c (diff)
downloadsamba-02abf612c8d7d6c9672df1f8ce02659737dc9254.tar.gz
samba-02abf612c8d7d6c9672df1f8ce02659737dc9254.tar.bz2
samba-02abf612c8d7d6c9672df1f8ce02659737dc9254.zip
Use pidl for _lsa_OpenAccount().
Guenther (This used to be commit e1968880a88ad2a56c5fef7d416646dcb96965ef)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_lsa.c24
-rw-r--r--source3/rpc_server/srv_lsa_nt.c19
2 files changed, 8 insertions, 35 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c
index 5811d8535b..739508869e 100644
--- a/source3/rpc_server/srv_lsa.c
+++ b/source3/rpc_server/srv_lsa.c
@@ -316,29 +316,7 @@ static bool api_lsa_create_account(pipes_struct *p)
static bool api_lsa_open_account(pipes_struct *p)
{
- LSA_Q_OPENACCOUNT q_u;
- LSA_R_OPENACCOUNT r_u;
-
- prs_struct *data = &p->in_data.data;
- prs_struct *rdata = &p->out_data.rdata;
-
- ZERO_STRUCT(q_u);
- ZERO_STRUCT(r_u);
-
- if(!lsa_io_q_open_account("", &q_u, data, 0)) {
- DEBUG(0,("api_lsa_open_account: failed to unmarshall LSA_Q_OPENACCOUNT.\n"));
- return False;
- }
-
- r_u.status = _lsa_open_account(p, &q_u, &r_u);
-
- /* store the response in the SMB stream */
- if(!lsa_io_r_open_account("", &r_u, rdata, 0)) {
- DEBUG(0,("api_lsa_open_account: Failed to marshall LSA_R_OPENACCOUNT.\n"));
- return False;
- }
-
- return True;
+ return proxy_lsa_call(p, NDR_LSA_OPENACCOUNT);
}
/***************************************************************************
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index c197f20bfe..7b4de95ed6 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -1655,16 +1655,17 @@ NTSTATUS _lsa_CreateAccount(pipes_struct *p,
/***************************************************************************
- Lsa Open Account
+ _lsa_OpenAccount
***************************************************************************/
-NTSTATUS _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENACCOUNT *r_u)
+NTSTATUS _lsa_OpenAccount(pipes_struct *p,
+ struct lsa_OpenAccount *r)
{
struct lsa_info *handle;
struct lsa_info *info;
/* find the connection policy handle. */
- if (!find_policy_by_hnd(p, &q_u->pol, (void **)(void *)&handle))
+ if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&handle))
return NT_STATUS_INVALID_HANDLE;
/* check if the user have enough rights */
@@ -1686,11 +1687,11 @@ NTSTATUS _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENAC
return NT_STATUS_NO_MEMORY;
ZERO_STRUCTP(info);
- info->sid = q_u->sid.sid;
- info->access = q_u->access;
+ info->sid = *r->in.sid;
+ info->access = r->in.access_mask;
/* get a (unique) handle. open a policy on it. */
- if (!create_policy_hnd(p, &r_u->pol, free_lsa_info, (void *)info))
+ if (!create_policy_hnd(p, *r->out.acct_handle, free_lsa_info, (void *)info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_OK;
@@ -2240,12 +2241,6 @@ NTSTATUS _lsa_LookupSids(pipes_struct *p, struct lsa_LookupSids *r)
return NT_STATUS_NOT_IMPLEMENTED;
}
-NTSTATUS _lsa_OpenAccount(pipes_struct *p, struct lsa_OpenAccount *r)
-{
- p->rng_fault_state = True;
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
NTSTATUS _lsa_EnumPrivsAccount(pipes_struct *p, struct lsa_EnumPrivsAccount *r)
{
p->rng_fault_state = True;