]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for KDC...
authorJeremy Allison <jra@samba.org>
Mon, 20 Jul 2020 23:56:14 +0000 (16:56 -0700)
committerIsaac Boukris <iboukris@sn-devel-184>
Tue, 4 Aug 2020 08:51:41 +0000 (08:51 +0000)
No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
source3/libsmb/namequery.c

index c964d90fc4ba091a64d06504963081335126e4c7..ea6aec5290afabbbf131ad6e2cda1d021a687b5c 100644 (file)
@@ -2692,12 +2692,13 @@ NTSTATUS internal_resolve_name(const char *name,
                         * This will result in a SRV record lookup */
                        status = resolve_ads(name, KDC_NAME_TYPE, sitename,
                                             return_iplist, return_count);
-                       if (NT_STATUS_IS_OK(status)) {
-                               /* Ensure we don't namecache
-                                * this with the KDC port. */
-                               name_type = KDC_NAME_TYPE;
-                               goto done;
+                       if (!NT_STATUS_IS_OK(status)) {
+                               continue;
                        }
+                       /* Ensure we don't namecache
+                        * this with the KDC port. */
+                       name_type = KDC_NAME_TYPE;
+                       goto done;
                } else if(strequal( tok, "ads")) {
                        /* deal with 0x1c and 0x1b names here.
                         * This will result in a SRV record lookup */