summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-15 18:24:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:08 -0500
commit87d23f263fdc370afcb2a1a45889514a57e2cedd (patch)
treed229284f920252ee292e06aed114105e43eca6bf /source3/rpc_server
parentfbe02a6021f339c14b278d1ac706702dcedd8aff (diff)
downloadsamba-87d23f263fdc370afcb2a1a45889514a57e2cedd.tar.gz
samba-87d23f263fdc370afcb2a1a45889514a57e2cedd.tar.bz2
samba-87d23f263fdc370afcb2a1a45889514a57e2cedd.zip
r13511: Fix bug in the samr dispinfo enumeration code.
Make sure to associate the DOMAIN dispinfo cache with a User/Group SAMR handle (not the SID of the user or group). Ensure that enumeration after deleting a user works. (This used to be commit 7967f89caa17ea93cb7e9d8695f1904ccb9a2864)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_samr_nt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 133178bd0d..bc73c9ef87 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -252,6 +252,17 @@ static DISP_INFO *get_samr_dispinfo_by_sid(DOM_SID *psid, const char *sid_str)
TALLOC_CTX *mem_ctx;
DISP_INFO *dpi;
+ /* There are two cases to consider here:
+ 1) The SID is a domain SID and we look for an equality match, or
+ 2) This is an account SID and so we return the DISP_INFO* for our
+ domain */
+
+ if ( psid && sid_check_is_in_our_domain( psid ) ) {
+ DEBUG(10,("get_samr_dispinfo_by_sid: Replacing %s with our domain SID\n",
+ sid_str));
+ psid = get_global_sam_sid();
+ }
+
for (dpi = disp_info_list; dpi; dpi = dpi->next) {
if (sid_equal(psid, &dpi->sid)) {
return dpi;