From 1a6ffd139176f7b19ed0a7acfb13354adae03062 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 6 Sep 2006 15:17:25 +0000 Subject: r18182: only grant privs to Administrators if privileges are enabled to avoid bopgus error messages (This used to be commit 7d5356fd5db6ece2504c9c140d1f454056be7164) --- source3/lib/account_pol.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source3/lib/account_pol.c b/source3/lib/account_pol.c index de5a37aea9..e6ef8dbbe4 100644 --- a/source3/lib/account_pol.c +++ b/source3/lib/account_pol.c @@ -303,8 +303,11 @@ BOOL init_account_policy(void) /* BUILTIN\Administrators get everything -- *always* */ - if ( !grant_all_privileges( &global_sid_Builtin_Administrators ) ) { - DEBUG(0,("init_account_policy: Failed to grant privileges to BUILTIN\\Administrators!\n")); + if ( lp_enable_privileges() ) { + if ( !grant_all_privileges( &global_sid_Builtin_Administrators ) ) { + DEBUG(1,("init_account_policy: Failed to grant privileges " + "to BUILTIN\\Administrators!\n")); + } } return True; -- cgit