From 9f0efa6611d010bf2fb88a2f6a583c4f32fd89ac Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Dec 2006 01:24:02 +0000 Subject: * Start of the setuid helper (the program that performs the operations that have to be done as root: running builders under different uids, changing ownership of build results, and deleting paths in the store with the wrong ownership). --- src/libstore/build.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libstore/build.cc') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index cc09a101f..0ecd8bb10 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -454,11 +454,12 @@ static void killUser(uid_t uid) if (kill(-1, SIGKILL) == 0) break; if (errno == ESRCH) break; /* no more processes */ if (errno != EINTR) - throw SysError(format("cannot kill processes for UID `%1%'") % uid); + throw SysError(format("cannot kill processes for uid `%1%'") % uid); } } catch (std::exception & e) { - std::cerr << format("killing build users: %1%\n") % e.what(); + std::cerr << format("killing processes beloging to uid `%1%': %1%\n") + % uid % e.what(); quickExit(1); } quickExit(0); @@ -466,7 +467,7 @@ static void killUser(uid_t uid) /* parent */ if (pid.wait(true) != 0) - throw Error(format("cannot kill processes for UID `%1%'") % uid); + throw Error(format("cannot kill processes for uid `%1%'") % uid); /* !!! We should really do some check to make sure that there are no processes left running under `uid', but there is no portable -- cgit v1.2.3