summaryrefslogtreecommitdiff
path: root/source4/rpc_server/lsa
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-14 05:32:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:25 -0500
commit02f7d260a22814945ea536fc81906f99899eb60b (patch)
tree941fd9a206bb943b64a3788a89fd7571f1f5a4dd /source4/rpc_server/lsa
parent9927ffd600fcccb918a0ff9ff56c79faf099ad3e (diff)
downloadsamba-02f7d260a22814945ea536fc81906f99899eb60b.tar.gz
samba-02f7d260a22814945ea536fc81906f99899eb60b.tar.bz2
samba-02f7d260a22814945ea536fc81906f99899eb60b.zip
r4195: added IDL, test suite and server side code for lsa_LookupPrivValue
(This used to be commit 7bddd4740332017bb5f4bddcc9ba0234d05378bd)
Diffstat (limited to 'source4/rpc_server/lsa')
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 8ebbca5186..71978caeb4 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -122,8 +122,8 @@ static NTSTATUS lsa_EnumPrivs(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
return NT_STATUS_NO_MEMORY;
}
e = &r->out.privs->privs[r->out.privs->count];
- e->luid_low = i;
- e->luid_high = 0;
+ e->luid.low = i;
+ e->luid.high = 0;
e->name.string = privname;
r->out.privs->count++;
i++;
@@ -821,18 +821,36 @@ static NTSTATUS lsa_QuerySecret(struct dcesrv_call_state *dce_call, TALLOC_CTX *
/*
lsa_LookupPrivValue
*/
-static NTSTATUS lsa_LookupPrivValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct lsa_LookupPrivValue *r)
+static NTSTATUS lsa_LookupPrivValue(struct dcesrv_call_state *dce_call,
+ TALLOC_CTX *mem_ctx,
+ struct lsa_LookupPrivValue *r)
{
- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+ struct dcesrv_handle *h;
+ struct lsa_policy_state *state;
+ int id;
+
+ DCESRV_PULL_HANDLE(h, r->in.handle, LSA_HANDLE_POLICY);
+
+ state = h->data;
+
+ id = sec_privilege_id(r->in.name->string);
+ if (id == -1) {
+ return NT_STATUS_NO_SUCH_PRIVILEGE;
+ }
+
+ r->out.luid->low = id;
+ r->out.luid->high = 0;
+
+ return NT_STATUS_OK;
}
/*
lsa_LookupPrivName
*/
-static NTSTATUS lsa_LookupPrivName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct lsa_LookupPrivName *r)
+static NTSTATUS lsa_LookupPrivName(struct dcesrv_call_state *dce_call,
+ TALLOC_CTX *mem_ctx,
+ struct lsa_LookupPrivName *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}