summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-08 11:25:56 +0200
committerGünther Deschner <gd@samba.org>2009-05-12 00:27:24 +0200
commit0dc1b239eb48ac81797720a8ff23c810321ad5c3 (patch)
tree9281a47232922579d3c29614063dae9fbdfe3707
parent4beb4395eb032a290bf0d29e0d50e4d823e5f20c (diff)
downloadsamba-0dc1b239eb48ac81797720a8ff23c810321ad5c3.tar.gz
samba-0dc1b239eb48ac81797720a8ff23c810321ad5c3.tar.bz2
samba-0dc1b239eb48ac81797720a8ff23c810321ad5c3.zip
s3-samr: implement _samr_RidToSid().
Guenther
-rw-r--r--source3/rpc_server/srv_samr_nt.c40
1 files changed, 30 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 97ce5f9238..e0c785d841 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -6299,6 +6299,36 @@ NTSTATUS _samr_GetDisplayEnumerationIndex2(pipes_struct *p,
}
/****************************************************************
+ _samr_RidToSid
+****************************************************************/
+
+NTSTATUS _samr_RidToSid(pipes_struct *p,
+ struct samr_RidToSid *r)
+{
+ struct samr_domain_info *dinfo;
+ NTSTATUS status;
+ struct dom_sid sid;
+
+ dinfo = policy_handle_find(p, r->in.domain_handle,
+ 0, NULL,
+ struct samr_domain_info, &status);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (!sid_compose(&sid, &dinfo->sid, r->in.rid)) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ *r->out.sid = sid_dup_talloc(p->mem_ctx, &sid);
+ if (!*r->out.sid) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ return NT_STATUS_OK;
+}
+
+/****************************************************************
****************************************************************/
NTSTATUS _samr_Shutdown(pipes_struct *p,
@@ -6379,16 +6409,6 @@ NTSTATUS _samr_GetBootKeyInformation(pipes_struct *p,
/****************************************************************
****************************************************************/
-NTSTATUS _samr_RidToSid(pipes_struct *p,
- struct samr_RidToSid *r)
-{
- p->rng_fault_state = true;
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-/****************************************************************
-****************************************************************/
-
NTSTATUS _samr_SetDsrmPassword(pipes_struct *p,
struct samr_SetDsrmPassword *r)
{