From 2b52e35770270959d5029fa84932d436652c7193 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 22 Feb 2007 20:52:27 +0000 Subject: 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) --- source3/rpc_parse/parse_samr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/rpc_parse') diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 5b276d9870..e0f5f7f294 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; -- cgit