diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-21 16:11:13 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-21 16:11:13 +0100 |
commit | 10e7f9f02d3b952c924e7c98ce01d27cc6baac84 (patch) | |
tree | cdc3655b8ebf084031aa84c4967333d176994315 /source4/winbind/wb_sid2uid.c | |
parent | 426e7fef1f080f22a10e89cebae58a40db8bc77f (diff) | |
parent | 141f4b8f838f750b979eeef11743244008bfa339 (diff) | |
download | samba-10e7f9f02d3b952c924e7c98ce01d27cc6baac84.tar.gz samba-10e7f9f02d3b952c924e7c98ce01d27cc6baac84.tar.bz2 samba-10e7f9f02d3b952c924e7c98ce01d27cc6baac84.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-trivial
(This used to be commit 52a8d06f00ab3900e2186e047902dbcbe3138a01)
Diffstat (limited to 'source4/winbind/wb_sid2uid.c')
-rw-r--r-- | source4/winbind/wb_sid2uid.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/winbind/wb_sid2uid.c b/source4/winbind/wb_sid2uid.c index 449596ef38..0de45fdea9 100644 --- a/source4/winbind/wb_sid2uid.c +++ b/source4/winbind/wb_sid2uid.c @@ -3,7 +3,7 @@ Map a SID to a uid - Copyright (C) Kai Blin 2007 + Copyright (C) Kai Blin 2007-2008 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ #include "smbd/service_task.h" #include "winbind/wb_helper.h" #include "libcli/security/proto.h" +#include "winbind/idmap.h" struct sid2uid_state { struct composite_context *ctx; @@ -50,11 +51,13 @@ struct composite_context *wb_sid2uid_send(TALLOC_CTX *mem_ctx, result->private_data = state; state->service = service; - /*FIXME: This is a stub so far. */ - state->ctx->status = dom_sid_split_rid(result, sid, NULL, &state->uid); - if(!composite_is_ok(state->ctx)) return result; - - DEBUG(5, ("Rid is %d\n", state->uid)); + state->ctx->status = idmap_sid_to_uid(service->idmap_ctx, state, sid, + &state->uid); + if (NT_STATUS_EQUAL(state->ctx->status, NT_STATUS_RETRY)) { + state->ctx->status = idmap_sid_to_uid(service->idmap_ctx, state, + sid, &state->uid); + } + if (!composite_is_ok(state->ctx)) return result; composite_done(state->ctx); return result; |