490251
From 56fb8aec557bb5b7264df2713b85b282e1c81f84 Mon Sep 17 00:00:00 2001
490251
From: Andreas Schneider <asn@samba.org>
490251
Date: Thu, 9 May 2019 16:18:51 +0200
490251
Subject: [PATCH] s3:smbspool: Fix regression printing with Kerberos
490251
 credentials
490251
490251
This is a regression which has been introduced with Samba 4.8.
490251
490251
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939
490251
490251
Signed-off-by: Andreas Schneider <asn@samba.org>
490251
Reviewed-by: Guenther Deschner <gd@samba.org>
490251
(cherry picked from commit fd4b1f4f16aee3e3c9a2cb449655edfed171963a)
490251
---
490251
 source3/client/smbspool.c | 2 +-
490251
 1 file changed, 1 insertion(+), 1 deletion(-)
490251
490251
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
490251
index 8be1009c0a8..ecaaf3c3f22 100644
490251
--- a/source3/client/smbspool.c
490251
+++ b/source3/client/smbspool.c
490251
@@ -660,7 +660,7 @@ smb_connect(const char *workgroup,	/* I - Workgroup */
490251
 	 * behavior with 3.0.14a
490251
 	 */
490251
 
490251
-	if (username != NULL && username[0] != '\0') {
490251
+	if (username == NULL || username[0] == '\0') {
490251
 		if (kerberos_ccache_is_valid()) {
490251
 			goto kerberos_auth;
490251
 		}
490251
-- 
490251
2.21.0
490251