summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-11-14 13:42:54 +0100
committerVolker Lendecke <vl@samba.org>2008-11-14 20:27:46 +0100
commit3c98d5bd987358b1cbeb81fa8db37b97492cf0cc (patch)
tree0058070438a145865d8b2cf80697bd3d2a1d999a /source3/auth
parentf50ad767505cc8847f5f574767b664b57326e468 (diff)
downloadsamba-3c98d5bd987358b1cbeb81fa8db37b97492cf0cc.tar.gz
samba-3c98d5bd987358b1cbeb81fa8db37b97492cf0cc.tar.bz2
samba-3c98d5bd987358b1cbeb81fa8db37b97492cf0cc.zip
Make memcache_add_talloc NULL out the source pointer
This is an orthogonality measure to make clear this pointer now belongs to the cache. (cherry picked from commit e6080c6e87d6fe3995b121a772bf3f6343fa666f)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/token_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index 6c00aa0943..28d6601b5f 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -77,7 +77,7 @@ bool nt_token_check_domain_rid( NT_USER_TOKEN *token, uint32 rid )
NT_USER_TOKEN *get_root_nt_token( void )
{
- struct nt_user_token *token = NULL;
+ struct nt_user_token *token, *for_cache;
DOM_SID u_sid, g_sid;
struct passwd *pw;
void *cache_data;
@@ -107,9 +107,11 @@ NT_USER_TOKEN *get_root_nt_token( void )
token->privileges = se_disk_operators;
+ for_cache = token;
+
memcache_add_talloc(
NULL, SINGLETON_CACHE_TALLOC,
- data_blob_string_const_null("root_nt_token"), token);
+ data_blob_string_const_null("root_nt_token"), &for_cache);
return token;
}