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)
committerKarolin Seeger <kseeger@samba.org>
Thu, 19 Sep 2013 08:20:19 +0000 (10:20 +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
(cherry picked from commit 17a9a0f37bbb730d09b3a57b00665d44aac18ea6)

source3/client/client.c

index 0d1f5b44fa5805687637ea821891f8fbdf775f2d..0e05c8908b723533453ffb4e73e7a19643f8824d 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);