X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=servexec.c;h=fa8b8ac033d4d6e65a179e1e893184469e2af571;hb=c7ad3b51358d0b7704e5670d973ad1a376caf4e1;hp=71412a7266f7fd5804b37992dfa1d94a0b389f7b;hpb=26444956110f28281bef77dfc28be75e25ae85a2;p=userv.git diff --git a/servexec.c b/servexec.c index 71412a7..fa8b8ac 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 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 @@ -57,34 +58,42 @@ 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 "; copyright (C)1996-1997 Ian Jackson.\n" + printf("uservd version " VERSION VEREXT "; copyright (C)1996-1997 Ian Jackson.\n" #ifdef DEBUG "DEBUGGING VERSION" #else "production version" #endif " - protocol magic number %08lx\n" + "maximums: fd %-10d general string %d\n" + " gids %-10d override length %d\n" + " args or variables %-10d error message %d\n" + " nested inclusion %-10d errno string reserve %d\n" "protocol checksum: ", - BASE_MAGIC); + BASE_MAGIC, + MAX_ALLOW_FD, MAX_GENERAL_STRING, + MAX_GIDS, MAX_OVERRIDE_LEN, + MAX_ARGSDEFVAR, MAX_ERRMSG_LEN, + MAX_INCLUDE_NEST, ERRMSG_RESERVE_ERRNO); for (i=0, p=protocolchecksumversion; i