]> granicus.if.org Git - sudo/commitdiff
Fix compilation with --disable-shared
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 24 Dec 2015 15:26:26 +0000 (08:26 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 24 Dec 2015 15:26:26 +0000 (08:26 -0700)
plugins/sudoers/group_plugin.c
plugins/sudoers/policy.c

index 4af7f14774d5342b87c12269f0504b9440bbe50e..a91ac3e86813040049a906f34bd40902e085d51f 100644 (file)
 #include "sudoers.h"
 #include "sudo_dso.h"
 
-const char *path_plugin_dir = _PATH_SUDO_PLUGIN_DIR;
-
 #if defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD)
 
 static void *group_handle;
 static struct sudoers_group_plugin *group_plugin;
+const char *path_plugin_dir = _PATH_SUDO_PLUGIN_DIR;
 
 /*
  * Load the specified plugin and run its init function.
index 7de51e69c8806c257b7104fbec54f8430be94fb0..8db08908bca92edb9690b58255844c4a89455c5b 100644 (file)
@@ -256,10 +256,12 @@ sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group)
            remhost = *cur + sizeof("remote_host=") - 1;
            continue;
        }
+#ifdef _PATH_SUDO_PLUGIN_DIR
        if (MATCHES(*cur, "plugin_dir=")) {
            path_plugin_dir = *cur + sizeof("plugin_dir=") - 1;
            continue;
        }
+#endif
     }
 
     for (cur = info->user_info; *cur != NULL; cur++) {