X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=servexec.c;h=7b1bcc015be6ca93d8868857f769539b72d5d63f;hp=41c6d37fae884cc885c8fefe600dbe28635a42f1;hb=4923f5a1c9b32a801a66a4ac458b401207b7d7ac;hpb=f7dd4f74d0a6b3399fe694f80911657aec351ffd diff --git a/servexec.c b/servexec.c index 41c6d37..7b1bcc0 100644 --- a/servexec.c +++ b/servexec.c @@ -2,7 +2,7 @@ * userv - execserv.c * daemon code which executes actual service (ie child process) * - * Copyright (C)1996-1997 Ian Jackson + * Copyright (C)1996-1997,1999-2001,2003 Ian Jackson * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -34,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) { @@ -57,11 +59,19 @@ void bisexec_parameter(const char *const *argv) { serv_checkstdoutexit(); } +void bisexec_help(const char *const *argv) { + const char *const *pp; + + fputs("recognised builtin services:\n",stdout); + for (pp= builtinservicehelpstrings; *pp; pp++) printf(" %s\n",*pp); + serv_checkstdoutexit(); +} + void bisexec_version(const char *const *argv) { const unsigned char *p; int i; - printf("uservd version " VERSION VEREXT "; copyright (C)1996-1997 Ian Jackson.\n" + printf("uservd version " VERSION VEREXT "; copyright (C)1996-2000 Ian Jackson.\n" #ifdef DEBUG "DEBUGGING VERSION" #else @@ -76,8 +86,8 @@ void bisexec_version(const char *const *argv) { BASE_MAGIC, MAX_ALLOW_FD, MAX_GENERAL_STRING, MAX_GIDS, MAX_OVERRIDE_LEN, - MAX_ARGSDEFVAR, ERRMSG_RESERVE_ERRNO, - MAX_INCLUDE_NEST, MAX_ERRMSG_LEN); + MAX_ARGSDEFVAR, MAX_ERRMSG_LEN, + MAX_INCLUDE_NEST, ERRMSG_RESERVE_ERRNO); for (i=0, p=protocolchecksumversion; i= 0) + fdarray[fdarray[fd].realfd].holdfd= fd; } for (fd=0; fd