]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
heimdal: Exclude more of plugin.c if HAVE_DLOPEN (which Samba unsets) is not set
authorAndrew Bartlett <abartlet@samba.org>
Wed, 27 May 2020 10:18:31 +0000 (22:18 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 7 Aug 2020 03:23:43 +0000 (03:23 +0000)
This allows us to avoid warnings and errors due to unsued variables
and functions.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source4/heimdal/lib/krb5/plugin.c

index 230bd637abc9ab933e89b144113e7e0f15f9c644..0203d04451d28f97a0cc7d87c83eefc2cff0edb7 100644 (file)
@@ -61,6 +61,8 @@ struct plugin {
 
 static HEIMDAL_MUTEX plugin_mutex = HEIMDAL_MUTEX_INITIALIZER;
 static struct plugin *registered = NULL;
+
+#ifdef HAVE_DLOPEN
 static int plugins_needs_scan = 1;
 
 static const char *sysplugin_dirs[] =  {
@@ -71,6 +73,8 @@ static const char *sysplugin_dirs[] =  {
     NULL
 };
 
+#endif /* HAVE_DLOPEN */
+
 /*
  *
  */
@@ -179,6 +183,8 @@ krb5_plugin_register(krb5_context context,
     return 0;
 }
 
+#ifdef HAVE_DLOPEN
+
 static int
 is_valid_plugin_filename(const char * n)
 {
@@ -230,8 +236,6 @@ load_plugins(krb5_context context)
        return 0;
     plugins_needs_scan = 0;
 
-#ifdef HAVE_DLOPEN
-
     dirs = krb5_config_get_strings(context, NULL, "libdefaults",
                                   "plugin_dir", NULL);
     if (dirs == NULL)
@@ -297,10 +301,19 @@ load_plugins(krb5_context context)
     }
     if (dirs != rk_UNCONST(sysplugin_dirs))
        krb5_config_free_strings(dirs);
-#endif /* HAVE_DLOPEN */
     return 0;
 }
 
+#else /* HAVE_DLOPEN */
+
+static krb5_error_code
+load_plugins(krb5_context context)
+{
+    return 0;
+}
+
+#endif /* HAVE_DLOPEN */
+
 static krb5_error_code
 add_symbol(krb5_context context, struct krb5_plugin **list, void *symbol)
 {