summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-01-17 15:23:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:55 -0500
commit46e5effea948931509283cb84b27007d34b521c8 (patch)
treed77527412d92fb2f5511c0373e0605b2f84c5c64 /source3/auth
parent5d47f8e5e59d0de7d7bac8a670f91423627b437e (diff)
downloadsamba-46e5effea948931509283cb84b27007d34b521c8.tar.gz
samba-46e5effea948931509283cb84b27007d34b521c8.tar.bz2
samba-46e5effea948931509283cb84b27007d34b521c8.zip
r4805: Last planned change to the privileges infrastructure:
* rewrote the tdb layout of privilege records in account_pol.tdb (allow for 128 bits instead of 32 bit flags) * migrated to using SE_PRIV structure instead of the PRIVILEGE_SET structure. The latter is now used for parsing routines mainly. Still need to incorporate some client support into 'net' so for setting privileges. And make use of the SeAddUserPrivilege right. (This used to be commit 41dc7f7573c6d637e19a01e7ed0e716ac0f1fb15)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index e4793c3df3..4a23ec8adc 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -494,10 +494,7 @@ void debug_nt_user_token(int dbg_class, int dbg_lev, NT_USER_TOKEN *token)
DEBUGADDC(dbg_class, dbg_lev, ("SID[%3lu]: %s\n", (unsigned long)i,
sid_to_string(sid_str, &token->user_sids[i])));
- DEBUGADDC(dbg_class, dbg_lev, ("Privileges: [%d]\n", token->privileges.count));
- for ( i=0; i<token->privileges.count; i++ ) {
- DEBUGADDC(dbg_class, dbg_lev, ("\t%s\n", luid_to_privilege_name(&token->privileges.set[i].luid) ));
- }
+ dump_se_priv( dbg_class, dbg_lev, &token->privileges );
}
/****************************************************************************
@@ -591,10 +588,7 @@ static NTSTATUS create_nt_user_token(const DOM_SID *user_sid, const DOM_SID *gro
/* add privileges assigned to this user */
- privilege_set_init( &ptoken->privileges );
-
get_privileges_for_sids( &ptoken->privileges, ptoken->user_sids, ptoken->num_sids );
-
debug_nt_user_token(DBGC_AUTH, 10, ptoken);
@@ -1426,8 +1420,6 @@ void delete_nt_token(NT_USER_TOKEN **pptoken)
NT_USER_TOKEN *ptoken = *pptoken;
SAFE_FREE( ptoken->user_sids );
- privilege_set_free( &ptoken->privileges );
-
ZERO_STRUCTP(ptoken);
}
SAFE_FREE(*pptoken);
@@ -1460,9 +1452,8 @@ NT_USER_TOKEN *dup_nt_token(NT_USER_TOKEN *ptoken)
/* copy the privileges; don't consider failure to be critical here */
- privilege_set_init( &token->privileges);
- if ( !dup_privilege_set( &token->privileges, &ptoken->privileges ) ) {
- DEBUG(0,("dup_nt_token: Failure to copy PRIVILEGE_SET!. Continuing with 0 privileges assigned.\n"));
+ if ( !se_priv_copy( &token->privileges, &ptoken->privileges ) ) {
+ DEBUG(0,("dup_nt_token: Failure to copy SE_PRIV!. Continuing with 0 privileges assigned.\n"));
}
return token;