X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=servexec.c;h=ad877f42cc9cb7f2469d47a1b1a1cfab5efe522b;hp=168e07657ad427dd16021e5a58662d0af10cd9ef;hb=949af4df9625f3371e146f7c78f4f1a17a2bf6db;hpb=a4833eb88857a3027cc2d9ff602f8f2e076b9d6d diff --git a/servexec.c b/servexec.c index 168e076..ad877f4 100644 --- a/servexec.c +++ b/servexec.c @@ -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;