diff options
author | Volker Lendecke <vl@samba.org> | 2008-11-14 13:42:54 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-11-14 19:55:46 +0100 |
commit | b0031a6e86565857e602f8011e57e2114835581a (patch) | |
tree | cd845ebbd61468603eb7d5c02c23e8cb581e634c /source/auth | |
parent | 26b1fda4020b7f6629865ae1c62e9b464222e1a2 (diff) | |
download | samba-b0031a6e86565857e602f8011e57e2114835581a.tar.gz samba-b0031a6e86565857e602f8011e57e2114835581a.tar.xz samba-b0031a6e86565857e602f8011e57e2114835581a.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.
Diffstat (limited to 'source/auth')
-rw-r--r-- | source/auth/token_util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/auth/token_util.c b/source/auth/token_util.c index cd67c2a213d..bdf6124e0f2 100644 --- a/source/auth/token_util.c +++ b/source/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("root_nt_token"), token); + data_blob_string_const("root_nt_token"), &for_cache); return token; } |