s3: Fix a segfault with debug level 3 on Solaris
authorVolker Lendecke <vl@samba.org>
Thu, 12 Apr 2012 10:15:50 +0000 (12:15 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 7 May 2012 13:02:30 +0000 (15:02 +0200)
printf can not deal with NULL strings

Fix bug #8861 (smbd crashes on high debug level with anonymous logins).

source3/smbd/password.c

index ddc7ad1966518b11c61b824c89358ce179b43d56..f032a56e6cbf7c67f052a4e63714f972508e13c5 100644 (file)
@@ -294,7 +294,8 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
 
        DEBUG(3, ("register_existing_vuid: User name: %s\t"
                  "Real name: %s\n", vuser->session_info->unix_name,
-                 vuser->session_info->info3->base.full_name.string));
+                 vuser->session_info->info3->base.full_name.string ?
+                 vuser->session_info->info3->base.full_name.string : ""));
 
        if (!vuser->session_info->security_token) {
                DEBUG(1, ("register_existing_vuid: session_info does not "