diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-11-24 21:19:56 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-11-24 21:19:56 +0200 |
commit | 534098c3d35f36ab9d333fb0ee800c7ffaf0dcbd (patch) | |
tree | 5e8ed3f413000e73f8ff00286e1615f2408e9c37 /src/pies.h | |
parent | a7779d56bb758157e122a420a56f2d7b4475e554 (diff) | |
download | pies-534098c3d35f36ab9d333fb0ee800c7ffaf0dcbd.tar.gz pies-534098c3d35f36ab9d333fb0ee800c7ffaf0dcbd.tar.bz2 |
Implement inetd builtin services.
* src/inetd-bi.c: New file.
* src/Makefile.am (pies_SOURCES): Add inetd-bi.c.
* src/pies.h (struct component): New member `builtin'.
(qotdfile): New extern.
(inetd_builtin): New struct.
(inetd_builtin_lookup): New proto.
* src/progman.c (prog_start): Handle internal
services.
* src/inetd.c (inetd_conf_file): Handle internal
services.
* src/pies.c (qotdfile): New global.
(pies_keywords): New keyword "qotd-file".
Diffstat (limited to 'src/pies.h')
-rw-r--r-- | src/pies.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -158,6 +158,7 @@ struct component size_t max_rate; /* Maximum number of invocations per minute (inetd) */ int socket_type; /* Socket type */ + struct inetd_builtin *builtin; /* Builtin function (inetd) */ char *rmfile; /* Try to remove this file before starting */ struct pies_privs privs; /* UID/GIDS+groups to run under */ mode_t umask; /* Umask to install before starting */ @@ -188,6 +189,7 @@ extern char *mailer_command_line; extern int mailer_argc; extern char **mailer_argv; extern size_t default_max_rate; +extern char *qotdfile; void register_prog (struct component *comp); size_t progman_running_count (void); @@ -333,3 +335,17 @@ void pies_epriv_setup (struct pies_privs *); /* inetd.c */ int inetd_parse_conf (const char *file); + +/* inetd-bi.c */ +struct inetd_builtin +{ + const char *service; + int socktype; + int single_process; + int flags; + void (*fun) (int); +}; + +struct inetd_builtin *inetd_builtin_lookup (const char *service, int socktype); + + |