summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-10-20 08:14:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:34 -0500
commit3da46073748c21a9202575883f3a57dacb2882ee (patch)
tree004550e48910afa2ce742fb7d2ac7213de3f840e /source3
parentf58f1468345b585ea00680a3a08c19644d147d53 (diff)
downloadsamba-3da46073748c21a9202575883f3a57dacb2882ee.tar.gz
samba-3da46073748c21a9202575883f3a57dacb2882ee.tar.bz2
samba-3da46073748c21a9202575883f3a57dacb2882ee.zip
r19424: Protect against username == NULL
Jeremy. (This used to be commit 78b14de27a2220dc4a26d21d108242220b4a1598)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index a6fae57bc3..7b97476a25 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -244,6 +244,9 @@ static char *get_user_and_realm(const char *username)
{
char *user_and_realm = NULL;
+ if (!username) {
+ return NULL;
+ }
if (strchr_m(username, '@')) {
user_and_realm = SMB_STRDUP(username);
} else {
@@ -257,6 +260,7 @@ static char *get_user_and_realm(const char *username)
/****************************************************************************
connect to \\server\ipc$ using KRB5
****************************************************************************/
+
NTSTATUS connect_to_ipc_krb5(struct cli_state **c,
struct in_addr *server_ip, const char *server_name)
{