The branch, master has been updated
       via  eee63b7 s3-auth Rename NT_USER_TOKEN privileges -> privilege_mask
      from  8c15cf5 s3-auth Rename NT_USER_TOKEN user_sids -> sids

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit eee63b7e75e6fe3e244285698211da46052e7c18
Author: Andrew Bartlett <[email protected]>
Date:   Tue Aug 31 11:18:11 2010 +1000

    s3-auth Rename NT_USER_TOKEN privileges -> privilege_mask
    
    This is closer to the struct security_token from security.idl
    
    Andrew Bartlett

-----------------------------------------------------------------------

Summary of changes:
 source3/auth/token_util.c         |    6 +++---
 source3/include/smb.h             |    2 +-
 source3/lib/privileges_basic.c    |    4 ++--
 source3/lib/util_nttoken.c        |    8 ++++----
 source3/libgpo/gpo_reg.c          |    2 +-
 source3/registry/reg_util_token.c |    2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index 87022fb..feb930f 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -112,7 +112,7 @@ NT_USER_TOKEN *get_root_nt_token( void )
        token = create_local_nt_token(talloc_autofree_context(), &u_sid, False,
                                      1, &global_sid_Builtin_Administrators);
 
-       token->privileges = se_disk_operators;
+       token->privilege_mask = se_disk_operators;
 
        for_cache = token;
 
@@ -642,7 +642,7 @@ static NTSTATUS finalize_local_nt_token(struct 
nt_user_token *result,
 
        /* Add privileges based on current user sids */
 
-       get_privileges_for_sids(&result->privileges, result->sids,
+       get_privileges_for_sids(&result->privilege_mask, result->sids,
                                result->num_sids);
 
        return NT_STATUS_OK;
@@ -671,7 +671,7 @@ void debug_nt_user_token(int dbg_class, int dbg_lev, 
NT_USER_TOKEN *token)
                          ("SID[%3lu]: %s\n", (unsigned long)i,
                           sid_string_dbg(&token->sids[i])));
 
-       dump_se_priv( dbg_class, dbg_lev, &token->privileges );
+       dump_se_priv( dbg_class, dbg_lev, &token->privilege_mask );
 }
 
 /****************************************************************************
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 011851a..129be1c 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -234,7 +234,7 @@ extern const struct dom_sid global_sid_Unix_Groups;
 typedef struct nt_user_token {
        size_t num_sids;
        struct dom_sid *sids;
-       SE_PRIV privileges;
+       SE_PRIV privilege_mask;
 } NT_USER_TOKEN;
 
 typedef struct unix_user_token {
diff --git a/source3/lib/privileges_basic.c b/source3/lib/privileges_basic.c
index c970478..f608069 100644
--- a/source3/lib/privileges_basic.c
+++ b/source3/lib/privileges_basic.c
@@ -345,7 +345,7 @@ bool user_has_privileges(const NT_USER_TOKEN *token, const 
SE_PRIV *privilege)
        if ( !token )
                return False;
 
-       return is_privilege_assigned( &token->privileges, privilege );
+       return is_privilege_assigned( &token->privilege_mask, privilege );
 }
 
 /****************************************************************************
@@ -358,7 +358,7 @@ bool user_has_any_privilege(NT_USER_TOKEN *token, const 
SE_PRIV *privilege)
        if ( !token )
                return False;
 
-       return is_any_privilege_assigned( &token->privileges, privilege );
+       return is_any_privilege_assigned( &token->privilege_mask, privilege );
 }
 
 /*******************************************************************
diff --git a/source3/lib/util_nttoken.c b/source3/lib/util_nttoken.c
index 60ce8e7..737e5eb 100644
--- a/source3/lib/util_nttoken.c
+++ b/source3/lib/util_nttoken.c
@@ -58,8 +58,8 @@ NT_USER_TOKEN *dup_nt_token(TALLOC_CTX *mem_ctx, const 
NT_USER_TOKEN *ptoken)
        
        /* copy the privileges; don't consider failure to be critical here */
        
-       if ( !se_priv_copy( &token->privileges, &ptoken->privileges ) ) {
-               DEBUG(0,("dup_nt_token: Failure to copy SE_PRIV!.  "
+       if ( !se_priv_copy( &token->privilege_mask, &ptoken->privilege_mask ) ) 
{
+               DEBUG(0,("dup_nt_token: Failure to copy privilages!.  "
                         "Continuing with 0 privileges assigned.\n"));
        }
 
@@ -108,8 +108,8 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
                }
        }
 
-       se_priv_add(&token->privileges, &token_1->privileges);
-       se_priv_add(&token->privileges, &token_2->privileges);
+       se_priv_add(&token->privilege_mask, &token_1->privilege_mask);
+       se_priv_add(&token->privilege_mask, &token_2->privilege_mask);
 
        *token_out = token;
 
diff --git a/source3/libgpo/gpo_reg.c b/source3/libgpo/gpo_reg.c
index 10c4160..9821dd2 100644
--- a/source3/libgpo/gpo_reg.c
+++ b/source3/libgpo/gpo_reg.c
@@ -37,7 +37,7 @@ struct nt_user_token *registry_create_system_token(TALLOC_CTX 
*mem_ctx)
                return NULL;
        }
 
-       token->privileges = se_priv_all;
+       token->privilege_mask = se_priv_all;
 
        if (!NT_STATUS_IS_OK(add_sid_to_array(token, &global_sid_System,
                         &token->sids, &token->num_sids))) {
diff --git a/source3/registry/reg_util_token.c 
b/source3/registry/reg_util_token.c
index 995b0d8..f8cd5c5 100644
--- a/source3/registry/reg_util_token.c
+++ b/source3/registry/reg_util_token.c
@@ -43,7 +43,7 @@ NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx,
                status = NT_STATUS_NO_MEMORY;
                goto done;
        }
-       token->privileges = se_disk_operators;
+       token->privilege_mask = se_disk_operators;
        status = add_sid_to_array(token, &global_sid_Builtin_Administrators,
                                  &token->sids, &token->num_sids);
        if (!NT_STATUS_IS_OK(status)) {


-- 
Samba Shared Repository

Reply via email to