diff options
author | Volker Lendecke <vl@samba.org> | 2008-11-14 13:42:54 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-11-14 20:27:46 +0100 |
commit | 3c98d5bd987358b1cbeb81fa8db37b97492cf0cc (patch) | |
tree | 0058070438a145865d8b2cf80697bd3d2a1d999a /source3/auth/token_util.c | |
parent | f50ad767505cc8847f5f574767b664b57326e468 (diff) | |
download | samba-3c98d5bd987358b1cbeb81fa8db37b97492cf0cc.tar.gz |
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/token_util.c')
-rw-r--r-- | source3/auth/token_util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index 6c00aa0943c..28d6601b5f3 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; } |