diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-08-26 22:08:22 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-09-11 18:46:06 +1000 |
commit | d1bb21b0d531ef8f40400716b3e1f6314c7c1e8a (patch) | |
tree | 8e42569543c2a7a591d206794542290c64a7cebe /source3/lib | |
parent | 4bfc8d3b1a6f6deacb8845c5d81b4897cc292cfb (diff) | |
download | samba-d1bb21b0d531ef8f40400716b3e1f6314c7c1e8a.tar.gz samba-d1bb21b0d531ef8f40400716b3e1f6314c7c1e8a.tar.bz2 samba-d1bb21b0d531ef8f40400716b3e1f6314c7c1e8a.zip |
s3:auth Remove NT_USER_TOKEN
The all UPPER case typedef is no longer the preferred Samba style
and this makes it easier to see that this is the IDL-derivied structure
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/privileges_basic.c | 4 | ||||
-rw-r--r-- | source3/lib/sharesec.c | 2 | ||||
-rw-r--r-- | source3/lib/util_nttoken.c | 8 | ||||
-rw-r--r-- | source3/lib/util_seaccess.c | 6 | ||||
-rw-r--r-- | source3/lib/util_sid.c | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/source3/lib/privileges_basic.c b/source3/lib/privileges_basic.c index 4922435a95..c6705c5f55 100644 --- a/source3/lib/privileges_basic.c +++ b/source3/lib/privileges_basic.c @@ -281,7 +281,7 @@ const char* get_privilege_dispname( const char *name ) at a time here. *****************************************************************************/ -bool user_has_privileges(const NT_USER_TOKEN *token, const uint64_t *privilege) +bool user_has_privileges(const struct security_token *token, const uint64_t *privilege) { if ( !token ) return False; @@ -294,7 +294,7 @@ bool user_has_privileges(const NT_USER_TOKEN *token, const uint64_t *privilege) at a time here. *****************************************************************************/ -bool user_has_any_privilege(NT_USER_TOKEN *token, const uint64_t *privilege) +bool user_has_any_privilege(struct security_token *token, const uint64_t *privilege) { if ( !token ) return False; diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c index 1b137a66db..3c19e77fcc 100644 --- a/source3/lib/sharesec.c +++ b/source3/lib/sharesec.c @@ -407,7 +407,7 @@ bool delete_share_security(const char *servicename) Can this user access with share with the required permissions ? ********************************************************************/ -bool share_access_check(const NT_USER_TOKEN *token, const char *sharename, +bool share_access_check(const struct security_token *token, const char *sharename, uint32 desired_access) { uint32 granted; diff --git a/source3/lib/util_nttoken.c b/source3/lib/util_nttoken.c index 3be5634a06..8efebaf9eb 100644 --- a/source3/lib/util_nttoken.c +++ b/source3/lib/util_nttoken.c @@ -31,14 +31,14 @@ Duplicate a SID token. ****************************************************************************/ -NT_USER_TOKEN *dup_nt_token(TALLOC_CTX *mem_ctx, const NT_USER_TOKEN *ptoken) +struct security_token *dup_nt_token(TALLOC_CTX *mem_ctx, const struct security_token *ptoken) { - NT_USER_TOKEN *token; + struct security_token *token; if (!ptoken) return NULL; - token = TALLOC_ZERO_P(mem_ctx, NT_USER_TOKEN); + token = TALLOC_ZERO_P(mem_ctx, struct security_token); if (token == NULL) { DEBUG(0, ("talloc failed\n")); return NULL; @@ -120,7 +120,7 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx, Check if this struct security_ace has a SID in common with the token. ********************************************************************/ -bool token_sid_in_ace(const NT_USER_TOKEN *token, const struct security_ace *ace) +bool token_sid_in_ace(const struct security_token *token, const struct security_ace *ace) { size_t i; diff --git a/source3/lib/util_seaccess.c b/source3/lib/util_seaccess.c index b81db43d03..3bedec6865 100644 --- a/source3/lib/util_seaccess.c +++ b/source3/lib/util_seaccess.c @@ -22,7 +22,7 @@ #include "includes.h" -extern NT_USER_TOKEN anonymous_token; +extern struct security_token anonymous_token; /* Map generic access rights to object specific rights. This technique is used to give meaning to assigning read, write, execute and all access to @@ -106,7 +106,7 @@ void se_map_standard(uint32 *access_mask, const struct standard_mapping *mapping perform a SEC_FLAG_MAXIMUM_ALLOWED access check */ static uint32_t access_check_max_allowed(const struct security_descriptor *sd, - const NT_USER_TOKEN *token) + const struct security_token *token) { uint32_t denied = 0, granted = 0; unsigned i; @@ -154,7 +154,7 @@ static uint32_t access_check_max_allowed(const struct security_descriptor *sd, to by the access_granted pointer. */ NTSTATUS se_access_check(const struct security_descriptor *sd, - const NT_USER_TOKEN *token, + const struct security_token *token, uint32_t access_desired, uint32_t *access_granted) { diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 459636d5fc..0e5c204378 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -107,11 +107,11 @@ static struct dom_sid anon_sid_array[3] = { { 1, 1, {0,0,0,0,0,1}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}, { 1, 1, {0,0,0,0,0,5}, {2,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}, { 1, 1, {0,0,0,0,0,5}, {7,0,0,0,0,0,0,0,0,0,0,0,0,0,0}} }; -NT_USER_TOKEN anonymous_token = { 3, anon_sid_array, SE_NONE }; +struct security_token anonymous_token = { 3, anon_sid_array, SE_NONE }; static struct dom_sid system_sid_array[1] = { { 1, 1, {0,0,0,0,0,5}, {18,0,0,0,0,0,0,0,0,0,0,0,0,0,0}} }; -NT_USER_TOKEN system_token = { 1, system_sid_array, SE_ALL_PRIVS }; +struct security_token system_token = { 1, system_sid_array, SE_ALL_PRIVS }; /**************************************************************************** Lookup string names for SID types. @@ -153,7 +153,7 @@ const char *sid_type_lookup(uint32 sid_type) Create the SYSTEM token. ***************************************************************************/ -NT_USER_TOKEN *get_system_token(void) +struct security_token *get_system_token(void) { return &system_token; } @@ -668,7 +668,7 @@ bool is_null_sid(const struct dom_sid *sid) return sid_equal(sid, &null_sid); } -bool is_sid_in_token(const NT_USER_TOKEN *token, const struct dom_sid *sid) +bool is_sid_in_token(const struct security_token *token, const struct dom_sid *sid) { int i; |