diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-02-10 09:16:05 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-02-10 09:16:05 +0000 |
commit | ec7a1994b0b937f95379a32bb135e816d407d843 (patch) | |
tree | 30af0a81755286192b014e5d137b4fbf45a9ecf8 /source3/smbd/statcache.c | |
parent | 868d169a4084c24924a419adc46a54f721aa2efd (diff) | |
download | samba-ec7a1994b0b937f95379a32bb135e816d407d843.tar.gz samba-ec7a1994b0b937f95379a32bb135e816d407d843.tar.bz2 samba-ec7a1994b0b937f95379a32bb135e816d407d843.zip |
Some cleanups:
- Don't use pstrcpy into an allocated string - use safe_strcpy() directly
instead.
- Keep a copy of the 'server_info' attached to the vuid. In future use this
for things like the session key, homedir and full name instead of current
copies.
- Try to avoid memory leak/segfault on Realloc failure
- clear up #endif comments
Andrew Bartlett
(This used to be commit 162477bb086827950b6cb71afa9bef62c2753c2e)
Diffstat (limited to 'source3/smbd/statcache.c')
-rw-r--r-- | source3/smbd/statcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c index 93782b9bb0..f4b613428a 100644 --- a/source3/smbd/statcache.c +++ b/source3/smbd/statcache.c @@ -122,8 +122,8 @@ void stat_cache_add( char *full_orig_name, char *orig_translated_path) DEBUG(0,("stat_cache_add: Out of memory !\n")); return; } - pstrcpy(scp->names, orig_name); - pstrcpy(scp->names+namelen+1, translated_path); + safe_strcpy(scp->names, orig_name, namelen); + safe_strcpy(scp->names+namelen+1, translated_path, namelen); scp->name_len = namelen; hash_insert(&stat_cache, (char *)scp, orig_name); } |