s3:libsmb: change the connect banner to "Server=[%s] Protocol=[%s]"
authorStefan Metzmacher <metze@samba.org>
Mon, 19 Jun 2017 19:54:33 +0000 (21:54 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Feb 2019 11:47:34 +0000 (12:47 +0100)
source3/libsmb/clidfs.c

index d0b0e9465df58474c7e6fb532a2567e5473e07db..2e9107866cbe953e97a9e2bdba368b50efea2646 100644 (file)
@@ -262,13 +262,16 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
        }
 
        if ( show_sessetup ) {
-               if (*c->server_domain) {
-                       DEBUG(0,("Domain=[%s] OS=[%s] Server=[%s]\n",
-                               c->server_domain,c->server_os,c->server_type));
-               } else if (*c->server_os || *c->server_type) {
-                       DEBUG(0,("OS=[%s] Server=[%s]\n",
-                                c->server_os,c->server_type));
-               }
+               const char *server_name = NULL;
+               enum protocol_types protocol;
+               const char *protocol_name = NULL;
+
+               server_name = smbXcli_conn_remote_name(c->conn);
+               protocol = smbXcli_conn_protocol(c->conn);
+               protocol_name = smb_protocol_types_string(protocol);
+
+               DEBUG(0,("Server=[%s] Protocol=[%s]\n",
+                        server_name, protocol_name));
        }
        DEBUG(4,(" session setup ok\n"));