-I$(top_srcdir)/include \
-I$(top_builddir)/src \
-DGSIGNOND_PLUGINLOADERS_DIR='"$(pluginloadersdir)"' \
- -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \
$(GSIGNOND_CFLAGS)
libgsignond_plugins_la_LIBADD = \
GSignondPipeStream *stream = NULL;
gboolean ret = FALSE;
const gchar *bin_path = GSIGNOND_PLUGINLOADERS_DIR;
- const gchar *plugin_path = GSIGNOND_GPLUGINS_DIR;
# ifdef ENABLE_DEBUG
const gchar *env_val = g_getenv("SSO_BIN_DIR");
if (env_val)
bin_path = env_val;
- env_val = g_getenv("SSO_GPLUGINS_DIR");
- if (env_val)
- plugin_path = env_val;
# endif
/* This guarantees that writes to a pipe will never cause
signal(SIGPIPE, SIG_IGN);
/* Spawn child process */
- argv = g_malloc0 ((3 + 1) * sizeof (gchar *));
+ argv = g_malloc0 ((2 + 1) * sizeof (gchar *));
argv[0] = g_build_filename (bin_path, GSIGNOND_PLUGIND_NAME, NULL);
- argv[1] = g_module_build_path (plugin_path, plugin_type);
- argv[2] = g_strdup(plugin_type);
+ argv[1] = g_strdup(plugin_type);
ret = g_spawn_async_with_pipes (NULL, argv, NULL,
G_SPAWN_DO_NOT_REAP_CHILD, NULL,
NULL, &cpid, &cin_fd, &cout_fd, NULL, &error);
-I$(top_builddir) \
-I$(top_srcdir)/include/ \
-I$(top_srcdir)/src/ \
+ -DGSIGNOND_GPLUGINS_DIR='"$(gpluginsdir)"' \
$(GSIGNOND_CFLAGS) \
$(NULL)
/* Load plugin */
daemon->priv->plugin = gsignond_load_plugin_with_filename (
- (gchar *)plugin_type, (gchar *)filename);
+ (gchar *)plugin_type, (gchar*)filename);
if (!daemon->priv->plugin) {
DBG ("failed to load plugin");
g_object_unref (daemon);
g_type_init ();
#endif
- opt_context = g_option_context_new ("<plugin_path> <plugin_name>");
+ opt_context = g_option_context_new ("<plugin_name>");
g_option_context_set_summary (opt_context, "gSSO helper plugin daemon");
g_option_context_add_main_entries (opt_context, opt_entries, NULL);
g_option_context_set_ignore_unknown_options (opt_context, TRUE);
WARN ("Error in arguments parsing: %s", error->message);
g_error_free (error);
}
- if (!plugin_args || !plugin_args[0] || !plugin_args[1]) {
- WARN ("plugin path or plugin type missing");
+ if (!plugin_args || !plugin_args[0] ) {
+ WARN ("plugin type missing");
if (plugin_args) g_strfreev(plugin_args);
return -1;
}
- _daemon = gsignond_plugin_daemon_new (plugin_args[0], plugin_args[1], in_fd,
+ const gchar *plugin_path = GSIGNOND_GPLUGINS_DIR;
+# ifdef ENABLE_DEBUG
+ const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR");
+ if (env_val)
+ plugin_path = env_val;
+#endif
+ gchar* filename = g_module_build_path (plugin_path, plugin_args[0]);
+
+ _daemon = gsignond_plugin_daemon_new (filename, plugin_args[0], in_fd,
out_fd);
g_strfreev(plugin_args);
if (_daemon == NULL) {