summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-08-19 04:17:21 +0000
committerGerald Carter <jerry@samba.org>2003-08-19 04:17:21 +0000
commit49e66508f271c5d548a045a1297652ed5b03494c (patch)
tree7f49ea2a09bcc1777d83171377ead9c173c8fb0e /source3/rpc_server
parent6d6401a67a9985c8c51175db520114dc2ef421ce (diff)
downloadsamba-49e66508f271c5d548a045a1297652ed5b03494c.tar.gz
samba-49e66508f271c5d548a045a1297652ed5b03494c.tar.bz2
samba-49e66508f271c5d548a045a1297652ed5b03494c.zip
Fix BUG #314: api_netUserGetGRoups() was failing prematurely
(also fixed the call to return the real groups and not a mocked up list) Fixed simple compiler warning in srv_lsa_ds.c (This used to be commit 6b0e38e01a44d87b844d973318accc456abef857)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_lsa_ds.c2
-rw-r--r--source3/rpc_server/srv_util.c11
2 files changed, 11 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_lsa_ds.c b/source3/rpc_server/srv_lsa_ds.c
index 5996935b22..21e18f52fc 100644
--- a/source3/rpc_server/srv_lsa_ds.c
+++ b/source3/rpc_server/srv_lsa_ds.c
@@ -58,7 +58,7 @@ static BOOL api_dsrole_get_primary_dominfo(pipes_struct *p)
static BOOL api_dsrole_stub( pipes_struct *p )
{
- DEBUG(0,("api_dsrole_stub: Hmmm....didn't know this RPC existsed?!??!\n"));
+ DEBUG(0,("api_dsrole_stub: Hmmm....didn't know this RPC existed...\n"));
return False;
}
diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c
index 03e53118a8..632d381503 100644
--- a/source3/rpc_server/srv_util.c
+++ b/source3/rpc_server/srv_util.c
@@ -307,8 +307,17 @@ BOOL get_domain_user_groups(TALLOC_CTX *ctx, int *numgroups, DOM_GID **pgids, SA
*/
gids = (DOM_GID *)talloc(ctx, sizeof(DOM_GID) * num_entries);
- /* for each group, check if the user is a member of*/
+ /* for each group, check if the user is a member of. Only include groups
+ from this domain */
+
for(i=0; i<num_entries; i++) {
+
+ if ( !sid_check_is_in_our_domain(&map[i].sid) ) {
+ DEBUG(10,("get_domain_user_groups: skipping check of %s since it is not in our domain\n",
+ map[i].nt_name));
+ continue;
+ }
+
if ((grp=getgrgid(map[i].gid)) == NULL) {
/* very weird !!! */
DEBUG(5,("get_domain_user_groups: gid %d doesn't exist anymore !\n", (int)map[i].gid));