aboutsummaryrefslogtreecommitdiff
path: root/src/inetd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inetd.c')
-rw-r--r--src/inetd.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/inetd.c b/src/inetd.c
index 270425d..f6c8276 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -68,7 +68,8 @@ inetd_conf_file (const char *file)
char *address;
char *service;
size_t len;
-
+ struct inetd_builtin *builtin;
+
if (line_no)
wordsplit_free (&ws);
@@ -182,7 +183,21 @@ inetd_conf_file (const char *file)
group = ws.ws_wordv[IFLD_USER] + len + 1;
}
user = ws.ws_wordv[IFLD_USER];
-
+
+ /* Is it a built-in? */
+ if (strcmp (ws.ws_wordv[IFLD_SERVER_PATH], "internal") == 0)
+ {
+ builtin = inetd_builtin_lookup (service, socket_type);
+ if (!builtin)
+ {
+ logmsg (LOG_ERR, "%s:%lu: %s",
+ file, line_no, _("unknown built-in"));
+ continue;
+ }
+ }
+ else
+ builtin = NULL;
+
/* Create the component */
if (address)
{
@@ -195,12 +210,18 @@ inetd_conf_file (const char *file)
}
else
comp = component_create (service);
-
+
comp->mode = pies_comp_inetd;
comp->socket_type = socket_type;
comp->socket_url = url;
comp->max_rate = max_rate;
- comp->flags = flags;
+ if (builtin)
+ {
+ comp->builtin = builtin;
+ comp->flags = builtin->flags;
+ }
+ else
+ comp->flags = flags;
comp->privs.user = xstrdup (user); /* FIXME: memory leak */
if (group)
{

Return to:

Send suggestions and report system problems to the System administrator.