From f31e2718b73fe9d8857c26dd76f4d472e90580d0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 16 Aug 2009 16:46:00 +0000 Subject: [PATCH] * Print an error if the exec fails. svn path=/nixos/trunk/; revision=16732 --- modules/security/setuid-wrapper.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/security/setuid-wrapper.c b/modules/security/setuid-wrapper.c index 32965d40c11..007ffbc34fe 100644 --- a/modules/security/setuid-wrapper.c +++ b/modules/security/setuid-wrapper.c @@ -7,6 +7,8 @@ #include #include #include +#include +#include /* Make sure assertions are not compiled out. */ #undef NDEBUG @@ -71,6 +73,9 @@ int main(int argc, char * * argv) //printf("real = %s, len = %d\n", real, len); execve(real, argv, environ); + + fprintf(stderr, "%s: cannot run `%s': %s\n", + argv[0], real, strerror(errno)); exit(1); }