mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r14432: Give in and grant BUILT\Administrators all privileges
(This used to be commit b617091060
)
This commit is contained in:
parent
d6eebce490
commit
f39c02e945
@ -288,12 +288,17 @@ BOOL init_account_policy(void)
|
||||
/* These exist by default on NT4 in [HKLM\SECURITY\Policy\Accounts] */
|
||||
|
||||
privilege_create_account( &global_sid_World );
|
||||
privilege_create_account( &global_sid_Builtin_Administrators );
|
||||
privilege_create_account( &global_sid_Builtin_Account_Operators );
|
||||
privilege_create_account( &global_sid_Builtin_Server_Operators );
|
||||
privilege_create_account( &global_sid_Builtin_Print_Operators );
|
||||
privilege_create_account( &global_sid_Builtin_Backup_Operators );
|
||||
|
||||
/* 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"));
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
@ -867,9 +867,27 @@ BOOL privilege_set_to_se_priv( SE_PRIV *mask, PRIVILEGE_SET *privset )
|
||||
/*******************************************************************
|
||||
*******************************************************************/
|
||||
|
||||
BOOL is_privileged_sid( DOM_SID *sid )
|
||||
BOOL is_privileged_sid( const DOM_SID *sid )
|
||||
{
|
||||
SE_PRIV mask;
|
||||
|
||||
return get_privileges( sid, &mask );
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*******************************************************************/
|
||||
|
||||
BOOL grant_all_privileges( const DOM_SID *sid )
|
||||
{
|
||||
int i;
|
||||
SE_PRIV mask;
|
||||
uint32 num_privs = count_all_privileges();
|
||||
|
||||
se_priv_copy( &mask, &se_priv_none );
|
||||
|
||||
for ( i=0; i<num_privs; i++ ) {
|
||||
se_priv_add(&mask, &privs[i].se_priv);
|
||||
}
|
||||
|
||||
return grant_privilege( sid, &mask );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user