lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Sep 2010 17:00:16 -0700
From:	David Sharp <dhsharp@...gle.com>
To:	rostedt@...dmis.org
Cc:	linux-kernel@...r.kernel.org, mrubin@...gle.com,
	David Sharp <dhsharp@...gle.com>
Subject: [PATCH] trace-cmd: Search $TRACE_CMD_PLUGIN_DIR for plugins.

Allows dynamic specification of the plugin directory so that plugins can be
used when the install prefix cannot be predicted, such as when using a
pre-compiled version of trace-cmd with Autotest.

Signed-off-by: David Sharp <dhsharp@...gle.com>
---
 trace-util.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/trace-util.c b/trace-util.c
index 33dbdf0..9e0ceca 100644
--- a/trace-util.c
+++ b/trace-util.c
@@ -771,6 +771,7 @@ void trace_util_load_plugins(struct pevent *pevent, const char *suffix,
 {
 	char *home;
 	char *path;
+        char *envdir;
 
 	if (tracecmd_disable_plugins)
 		return;
@@ -782,7 +783,12 @@ void trace_util_load_plugins(struct pevent *pevent, const char *suffix,
 					    load_plugin, data);
 #endif
 
-	/* Now let the home directory override the system defaults */
+	/* Next let the environment-set plugin directory override the system defaults */
+	envdir = getenv("TRACE_CMD_PLUGIN_DIR");
+	if (envdir)
+		trace_util_load_plugins_dir(pevent, suffix, envdir, load_plugin, data);
+
+	/* Now let the home directory override the environment or system defaults */
 	home = getenv("HOME");
 
 	if (!home)
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ