summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_util.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-12-10 16:42:44 +0000
committerGerald Carter <jerry@samba.org>2003-12-10 16:42:44 +0000
commitb90d6b16e4175526c5112b9541d7d509d5a64edf (patch)
tree4cdda7f2b196f853a09a7cee65c99477e35e8fd3 /source3/rpc_server/srv_util.c
parentcaf641f2d2aa8edecd3f4d0a9b234e614b43f7e6 (diff)
downloadsamba-b90d6b16e4175526c5112b9541d7d509d5a64edf.tar.gz
samba-b90d6b16e4175526c5112b9541d7d509d5a64edf.tar.bz2
samba-b90d6b16e4175526c5112b9541d7d509d5a64edf.zip
more group lookup access fixes on the neverending bug 281
(This used to be commit 975ac6f5aa4d8d709733757e4e003f3c551fc9ba)
Diffstat (limited to 'source3/rpc_server/srv_util.c')
-rw-r--r--source3/rpc_server/srv_util.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c
index c2395e6fae..504e6a83c0 100644
--- a/source3/rpc_server/srv_util.c
+++ b/source3/rpc_server/srv_util.c
@@ -147,8 +147,6 @@ NTSTATUS get_alias_user_groups(TALLOC_CTX *ctx, DOM_SID *sid, int *numgroups, ui
return NT_STATUS_UNSUCCESSFUL;
}
- become_root();
-
for (i=0;i<num_groups;i++) {
if (!get_group_from_gid(groups[i], &map)) {
@@ -197,9 +195,8 @@ NTSTATUS get_alias_user_groups(TALLOC_CTX *ctx, DOM_SID *sid, int *numgroups, ui
break;
}
- unbecome_root();
-
- if(num_groups) free(groups);
+ if(num_groups)
+ free(groups);
/* now check for the user's gid (the primary group rid) */
for (i=0; i<cur_rid && grid!=rids[i]; i++)
@@ -213,15 +210,12 @@ NTSTATUS get_alias_user_groups(TALLOC_CTX *ctx, DOM_SID *sid, int *numgroups, ui
DEBUG(10,("get_alias_user_groups: looking for gid %d of user %s\n", (int)gid, user_name));
- become_root();
-
if(!get_group_from_gid(gid, &map)) {
- DEBUG(0,("get_alias_user_groups: gid of user %s doesn't exist. Check your /etc/passwd and /etc/group files\n", user_name));
+ DEBUG(0,("get_alias_user_groups: gid of user %s doesn't exist. Check your "
+ "/etc/passwd and /etc/group files\n", user_name));
goto done;
}
- unbecome_root();
-
/* the primary group isn't an alias */
if (map.sid_name_use!=SID_NAME_ALIAS) {
DEBUG(10,("get_alias_user_groups: not returing %s, not an ALIAS group.\n", map.nt_name));