s3: libsmb : Bug 10150 - Not all OEM servers support the ALTNAME info level.
authorJeremy Allison <jra@samba.org>
Tue, 17 Sep 2013 18:24:05 +0000 (11:24 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 17 Sep 2013 21:40:08 +0000 (23:40 +0200)
Just ignore and print error message and an altname of "" if the
server returns NT_STATUS_NOT_SUPPORTED.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 17 23:40:08 CEST 2013 on sn-devel-104

source3/client/client.c

index bdf6c506471d476ec46ad6370a29e0a78cfd6acd..a348644d17750f8099e7cc635064d7b27ac5f413 100644 (file)
@@ -1709,7 +1709,15 @@ static int do_allinfo(const char *name)
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("%s getting alt name for %s\n", nt_errstr(status),
                         name);
-               return false;
+               /*
+                * Ignore not supported, it does not hurt if we can't list
+                * alternate names.
+                */
+               if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
+                       altname[0] = '\0';
+               } else {
+                       return false;
+               }
        }
        d_printf("altname: %s\n", altname);