diff options
author | Gerald Carter <jerry@samba.org> | 2006-07-24 12:05:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:19 -0500 |
commit | 8cc35cc8da75f1e831f0b84fc667ec0c9bff6b4b (patch) | |
tree | 4c68a87b8a7dc6e3300612fcbe6ae1ef911ffde5 /source3 | |
parent | fe348fdb28624428269bffeb1ff796ec3857ff66 (diff) | |
download | samba-8cc35cc8da75f1e831f0b84fc667ec0c9bff6b4b.tar.gz samba-8cc35cc8da75f1e831f0b84fc667ec0c9bff6b4b.tar.bz2 samba-8cc35cc8da75f1e831f0b84fc667ec0c9bff6b4b.zip |
r17217: Fix a couple of "smbldap_open(): Cannot open when not root" bugs
when viewing or modifying local group membership.
(This used to be commit 41e30a9666e1fb736cd2ba8a5ad9285fcde50d47)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 3a70c93a1c..bb5e7dbce4 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -3771,7 +3771,9 @@ NTSTATUS _samr_query_aliasmem(pipes_struct *p, SAMR_Q_QUERY_ALIASMEM *q_u, SAMR_ DEBUG(10, ("sid is %s\n", sid_string_static(&alias_sid))); + become_root(); status = pdb_enum_aliasmem(&alias_sid, &sids, &num_sids); + unbecome_root(); if (!NT_STATUS_IS_OK(status)) { return status; @@ -4602,7 +4604,11 @@ NTSTATUS _samr_set_aliasinfo(pipes_struct *p, SAMR_Q_SET_ALIASINFO *q_u, SAMR_R_ /* get the current group information */ - if ( !pdb_get_aliasinfo( &group_sid, &info ) ) { + become_root(); + ret = pdb_get_aliasinfo( &group_sid, &info ); + unbecome_root(); + + if ( !ret ) { return NT_STATUS_NO_SUCH_ALIAS; } |