summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-06-19 19:07:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:18:48 -0500
commite7fc37cf0f4bd2c0f25865fb07d1bff27b239130 (patch)
tree05321a37f1ad2b6082ee1f84beeb1fbe589fe519 /source3/passdb
parent5c822ecc495bbac95704378c6e09885255076cbe (diff)
downloadsamba-e7fc37cf0f4bd2c0f25865fb07d1bff27b239130.tar.gz
samba-e7fc37cf0f4bd2c0f25865fb07d1bff27b239130.tar.bz2
samba-e7fc37cf0f4bd2c0f25865fb07d1bff27b239130.zip
r16360: Fix Klocwork ID 136 520 521 522 523 542 574 575 576 607
in net_rpc.c: 715 716 732 734 735 736 737 738 739 749 in net_rpc_audit.c: 754 755 756 in net_rpc_join.c: 757 in net_rpc_registry: 766 767 in net_rpc_samsync.c: 771 773 in net_sam.c: 797 798 Volker (This used to be commit 3df0bf7d6050fd7c9ace72487d4f74d92e30a584)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/login_cache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/passdb/login_cache.c b/source3/passdb/login_cache.c
index fba5990d81..9a19dcf437 100644
--- a/source3/passdb/login_cache.c
+++ b/source3/passdb/login_cache.c
@@ -72,6 +72,10 @@ LOGIN_CACHE * login_cache_read(struct samu *sampass)
if (!login_cache_init())
return NULL;
+ if (pdb_get_nt_username(sampass) == NULL) {
+ return NULL;
+ }
+
keybuf.dptr = SMB_STRDUP(pdb_get_nt_username(sampass));
if (!keybuf.dptr || !strlen(keybuf.dptr)) {
SAFE_FREE(keybuf.dptr);
@@ -117,6 +121,10 @@ BOOL login_cache_write(const struct samu *sampass, LOGIN_CACHE entry)
if (!login_cache_init())
return False;
+ if (pdb_get_nt_username(sampass) == NULL) {
+ return False;
+ }
+
keybuf.dptr = SMB_STRDUP(pdb_get_nt_username(sampass));
if (!keybuf.dptr || !strlen(keybuf.dptr)) {
SAFE_FREE(keybuf.dptr);
@@ -163,6 +171,10 @@ BOOL login_cache_delentry(const struct samu *sampass)
if (!login_cache_init())
return False;
+ if (pdb_get_nt_username(sampass) == NULL) {
+ return False;
+ }
+
keybuf.dptr = SMB_STRDUP(pdb_get_nt_username(sampass));
if (!keybuf.dptr || !strlen(keybuf.dptr)) {
SAFE_FREE(keybuf.dptr);