summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-04-01 15:15:13 +0000
committerGerald Carter <jerry@samba.org>2004-04-01 15:15:13 +0000
commit2197bd26ac1809ca0cee42036c594a97dabe681e (patch)
treef3d2081ea86d27c3391475174a9844e33ed6bb5c
parent56e7c149babcf41e5c510104a8e0cdca56f227f0 (diff)
downloadsamba-2197bd26ac1809ca0cee42036c594a97dabe681e.tar.gz
samba-2197bd26ac1809ca0cee42036c594a97dabe681e.tar.bz2
samba-2197bd26ac1809ca0cee42036c594a97dabe681e.zip
BUG 1023: surround get_group_from_gid() with become_unbecome_root() block
(This used to be commit 1aeeb432c75eeb67e9e1323932b37d34da416d37)
-rw-r--r--source3/rpc_server/srv_util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c
index 504e6a83c0..5bb8db4e06 100644
--- a/source3/rpc_server/srv_util.c
+++ b/source3/rpc_server/srv_util.c
@@ -149,7 +149,11 @@ NTSTATUS get_alias_user_groups(TALLOC_CTX *ctx, DOM_SID *sid, int *numgroups, ui
for (i=0;i<num_groups;i++) {
- if (!get_group_from_gid(groups[i], &map)) {
+ become_root();
+ ret = get_group_from_gid(groups[i], &map);
+ unbecome_root();
+
+ if ( !ret ) {
DEBUG(10,("get_alias_user_groups: gid %d. not found\n", (int)groups[i]));
continue;
}