summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_lsa.c24
-rw-r--r--source3/rpc_server/srv_lsa_nt.c22
2 files changed, 9 insertions, 37 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c
index 60a3bd3671..c4ca22f401 100644
--- a/source3/rpc_server/srv_lsa.c
+++ b/source3/rpc_server/srv_lsa.c
@@ -413,29 +413,7 @@ static bool api_lsa_enum_acct_rights(pipes_struct *p)
static bool api_lsa_lookup_priv_value(pipes_struct *p)
{
- LSA_Q_LOOKUP_PRIV_VALUE q_u;
- LSA_R_LOOKUP_PRIV_VALUE 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_lookup_priv_value("", &q_u, data, 0)) {
- DEBUG(0,("api_lsa_lookup_priv_value: failed to unmarshall LSA_Q_LOOKUP_PRIV_VALUE .\n"));
- return False;
- }
-
- r_u.status = _lsa_lookup_priv_value(p, &q_u, &r_u);
-
- /* store the response in the SMB stream */
- if(!lsa_io_r_lookup_priv_value("", &r_u, rdata, 0)) {
- DEBUG(0,("api_lsa_lookup_priv_value: Failed to marshall LSA_R_LOOKUP_PRIV_VALUE.\n"));
- return False;
- }
-
- return True;
+ return proxy_lsa_call(p, NDR_LSA_LOOKUPPRIVVALUE);
}
/***************************************************************************
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index ef09b28dde..a8f6e15e23 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -2198,21 +2198,23 @@ NTSTATUS _lsa_enum_acct_rights(pipes_struct *p, LSA_Q_ENUM_ACCT_RIGHTS *q_u, LSA
/***************************************************************************
+ _lsa_LookupPrivValue
***************************************************************************/
-NTSTATUS _lsa_lookup_priv_value(pipes_struct *p, LSA_Q_LOOKUP_PRIV_VALUE *q_u, LSA_R_LOOKUP_PRIV_VALUE *r_u)
+NTSTATUS _lsa_LookupPrivValue(pipes_struct *p,
+ struct lsa_LookupPrivValue *r)
{
struct lsa_info *info = NULL;
- fstring name;
+ const char *name = NULL;
LUID_ATTR priv_luid;
SE_PRIV mask;
/* find the connection policy handle. */
- if (!find_policy_by_hnd(p, &q_u->pol, (void **)(void *)&info))
+ if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&info))
return NT_STATUS_INVALID_HANDLE;
- unistr2_to_ascii(name, &q_u->privname.unistring, sizeof(name));
+ name = r->in.name->string;
DEBUG(10,("_lsa_lookup_priv_value: name = %s\n", name));
@@ -2221,14 +2223,12 @@ NTSTATUS _lsa_lookup_priv_value(pipes_struct *p, LSA_Q_LOOKUP_PRIV_VALUE *q_u, L
priv_luid = get_privilege_luid( &mask );
- r_u->luid.low = priv_luid.luid.low;
- r_u->luid.high = priv_luid.luid.high;
-
+ r->out.luid->low = priv_luid.luid.low;
+ r->out.luid->high = priv_luid.luid.high;
return NT_STATUS_OK;
}
-
/*
* From here on the server routines are just dummy ones to make smbd link with
* librpc/gen_ndr/srv_lsa.c. These routines are actually never called, we are
@@ -2319,12 +2319,6 @@ NTSTATUS _lsa_QuerySecret(pipes_struct *p, struct lsa_QuerySecret *r)
return NT_STATUS_NOT_IMPLEMENTED;
}
-NTSTATUS _lsa_LookupPrivValue(pipes_struct *p, struct lsa_LookupPrivValue *r)
-{
- p->rng_fault_state = True;
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
NTSTATUS _lsa_LookupPrivName(pipes_struct *p, struct lsa_LookupPrivName *r)
{
p->rng_fault_state = True;