From a0fc7f8e96d3818a963ad41aa5043d2a5bbcb9e5 Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Thu, 5 Nov 2009 14:52:56 -0500 Subject: PR 9973: Sign uprobes.ko when it is created and load it using insert_module. Create home directory manually for stap-server. --- runtime/staprun/staprun.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'runtime/staprun/staprun.c') diff --git a/runtime/staprun/staprun.c b/runtime/staprun/staprun.c index c5651d9a..1cedc9f0 100644 --- a/runtime/staprun/staprun.c +++ b/runtime/staprun/staprun.c @@ -129,14 +129,12 @@ static int enable_uprobes(void) if (run_as(0, 0, 0, argv[0], argv) == 0) return 0; + /* This module may be signed, so use insert_module to load it. */ snprintf (runtimeko, sizeof(runtimeko), "%s/uprobes/uprobes.ko", (getenv("SYSTEMTAP_RUNTIME") ?: PKGDATADIR "/runtime")); dbug(2, "Inserting uprobes module from SystemTap runtime %s.\n", runtimeko); - i = 0; - argv[i++] = "/sbin/insmod"; - argv[i++] = runtimeko; - argv[i] = NULL; - if (run_as(0, 0, 0, argv[0], argv) == 0) + argv[0] = NULL; + if (insert_module(runtimeko, NULL, argv) == 0) return 0; return 1; /* failure */ -- cgit