summaryrefslogtreecommitdiff
path: root/src/daemontools-extras/s6-setuidgid.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2022-12-23 22:53:07 +0000
committerLaurent Bercot <ska@appnovation.com>2022-12-23 22:53:07 +0000
commit2c61fb1d1ce85fe400a8668e85fc0da42813a45a (patch)
tree68e0e63c747a08c3f3c38c7088a0e16c343afdb3 /src/daemontools-extras/s6-setuidgid.c
parent977d6ca915355954ae6215b0aa577c24fc257efe (diff)
downloads6-2c61fb1d1ce85fe400a8668e85fc0da42813a45a.tar.xz
Refactor libs6auto, add s6-instance-maker (untested)
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/daemontools-extras/s6-setuidgid.c')
-rw-r--r--src/daemontools-extras/s6-setuidgid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/daemontools-extras/s6-setuidgid.c b/src/daemontools-extras/s6-setuidgid.c
index 26256b8..a1afc66 100644
--- a/src/daemontools-extras/s6-setuidgid.c
+++ b/src/daemontools-extras/s6-setuidgid.c
@@ -10,7 +10,7 @@
#define USAGE "s6-setuidgid username prog..."
#define dieusage() strerr_dieusage(100, USAGE)
-int main (int argc, char *const *argv)
+int main (int argc, char const *const *argv)
{
char const *newargv[argc + 7] ;
char *colon ;
@@ -18,6 +18,7 @@ int main (int argc, char *const *argv)
PROG = "s6-setuidgid" ;
if (argc < 3) dieusage() ;
argv++ ;
+ if (!argv[0][0]) xexec(argv+1) ;
colon = strchr(argv[0], ':') ;
if (colon)
{