s3:smbspool: Fix regression printing with Kerberos credentials
authorAndreas Schneider <asn@samba.org>
Thu, 9 May 2019 14:18:51 +0000 (16:18 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 9 May 2019 16:46:05 +0000 (16:46 +0000)
This is a regression which has been introduced with Samba 4.8.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu May  9 16:46:05 UTC 2019 on sn-devel-184

source3/client/smbspool.c

index 5efaa091913e45a9ee387df8d8eeadff1542de53..220716136779b9c3e63e3d6885d871589be82e3c 100644 (file)
@@ -664,7 +664,7 @@ smb_connect(const char *workgroup,  /* I - Workgroup */
         * behavior with 3.0.14a
         */
 
-       if (username != NULL && username[0] != '\0') {
+       if (username == NULL || username[0] == '\0') {
                if (kerberos_ccache_is_valid()) {
                        goto kerberos_auth;
                }