r24752: Make sure to return properly when the locator is called from within winbindd.
authorGünther Deschner <gd@samba.org>
Tue, 28 Aug 2007 16:39:03 +0000 (16:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:30:18 +0000 (12:30 -0500)
Guenther

source/libads/smb_krb5_locator.c

index 91ea24b30f4bdd84e1d16a64808a758e91fc8ed5..33f2a414d0ad0a45a017cc04101d40bb4139bb58 100644 (file)
@@ -340,16 +340,12 @@ krb5_error_code smb_krb5_locator_lookup(void *private_data,
                                "failed to query winbindd\n",
                                (unsigned int)getpid());
 #endif
-
-#ifdef KRB5_PLUGIN_NO_HANDLE
-                       return KRB5_PLUGIN_NO_HANDLE;
-#else
-                       return KRB5_KDC_UNREACH; /* Heimdal */
-#endif
+                       goto failed;
                }
        } else {
                /* FIXME: here comes code for locator being called from within
                 * winbind */
+                goto failed;
        }
 #ifdef DEBUG_KRB5
        fprintf(stderr, "[%5u]: smb_krb5_locator_lookup: "
@@ -367,6 +363,13 @@ krb5_error_code smb_krb5_locator_lookup(void *private_data,
        SAFE_FREE(kdc_name);
 
        return ret;
+
+ failed:
+#ifdef KRB5_PLUGIN_NO_HANDLE
+       return KRB5_PLUGIN_NO_HANDLE;
+#else
+       return KRB5_KDC_UNREACH; /* Heimdal */
+#endif
 }
 
 #ifdef HEIMDAL_KRB5_LOCATE_PLUGIN_H