From 40ebd03de7f2de5f1fb9f702d9d026a3ff50a448 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Sat, 21 Jan 2006 02:45:27 +0000 Subject: Great patch from Sjoerd Simons : As most people probably know by now, various people don't really like that hal running as root. We'd much rather see only a small process running as root and the main hal process running unpriviledged. Which is exactly what this patch does :) How does it work? Just before drops it's root privs. a small program is startup which will remain running as root and does the real execution of the addons/probes/callouts on hals behalf. Communication between hald and hald-runner is done via a p2p dbus connection. Resulting in a process tree like this: hal /usr/sbin/hald root \_ /usr/lib/hal/hald-runner root \_ /usr/lib/hal/hald-addon-acpi root \_ /usr/lib/hal/hald-addon-storage root \_ /usr/lib/hal/hald-addon-storage The patch consists out of two parts. First the implementation of hald-runner, which is about 700 lines of code. And then a part transforming the hald code from the current spawning code in utils to an interface that can talk to the runner. Add Sjoerd Simons . Revise my own email address. Add hald-runner Add hald-runner add hald_runner.[ch] New and changed files with slight changes. See the descriptive text above and discussion at http://lists.freedesktop.org/archives/hal/2006-January/004327.html for details. Changed function hald_runner_start_runner() in hald/hald_runner.c to print out runner path and improve error handling when runner is not found. Also removed dbus_server_unref (server) in handle_connection() in same file. Remove --retain-privileges as this is no longer needed Remove --retain-privileges and use --with-runner pointing to ../hald-runner/hald-runner --- configure.in | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 507e64c6..49663d04 100644 --- a/configure.in +++ b/configure.in @@ -486,6 +486,7 @@ hald/linux2/probing/Makefile hald/linux2/addons/Makefile hald/solaris/Makefile hald/haldaemon +hald-runner/Makefile libhal/Makefile libhal-storage/Makefile tools/Makefile -- cgit v1.2.3