diff options
author | Gerald Carter <jerry@samba.org> | 2007-02-22 20:52:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:09 -0500 |
commit | 2b52e35770270959d5029fa84932d436652c7193 (patch) | |
tree | 08d6d87798509ce14c5da93c9b9c357f00f2897f /source3/rpc_parse | |
parent | 1945571e3b899bee8a33122bece723ce87b7daed (diff) | |
download | samba-2b52e35770270959d5029fa84932d436652c7193.tar.gz samba-2b52e35770270959d5029fa84932d436652c7193.tar.xz samba-2b52e35770270959d5029fa84932d436652c7193.zip |
r21507: Fix some "cannot access LDAP when no root" bugs.
The two culprits were
* pdb_get_account_policy()
* pdb_get_group_sid()
(This used to be commit 6a69caf6907fad01b13aa4358ce5c62506f98495)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 5b276d98702..e0f5f7f294c 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -6331,8 +6331,10 @@ NTSTATUS init_sam_user_info21A(SAM_USER_INFO_21 *usr, struct samu *pw, DOM_SID * return NT_STATUS_UNSUCCESSFUL; } + become_root(); group_sid = pdb_get_group_sid(pw); - + unbecome_root(); + if (!sid_peek_check_rid(domain_sid, group_sid, &group_rid)) { fstring group_sid_string; fstring domain_sid_string; |