chiark / gitweb /
Moved xmalloc etc. into both.c
[userv.git] / servexec.c
index 168e07657ad427dd16021e5a58662d0af10cd9ef..ad877f42cc9cb7f2469d47a1b1a1cfab5efe522b 100644 (file)
@@ -35,6 +35,7 @@
 #include "common.h"
 #include "daemon.h"
 #include "lib.h"
+#include "both.h"
 #include "version.h"
 
 static void NONRETURNING serv_syscallfail(const char *msg) {
@@ -137,6 +138,15 @@ void bisexec_execute(const char *const *argv) {
   serv_checkstdoutexit();
 }
 
+void bisexec_shutdown(const char *const *argv) {
+  /* This is only reached if the serviceuser_uid test in
+   * process.c:servicerequest() fails (we have to handle the
+   * shutdown request there, unfortunately).
+   */
+  fputs("uservd: builtin service shutdown: permission denied\n",stderr);
+  _exit(-1);
+}
+
 static void serv_resetsignal(int signo) {
   struct sigaction sig;