aboutsummaryrefslogtreecommitdiff
path: root/src/inetd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inetd.c')
-rw-r--r--src/inetd.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/inetd.c b/src/inetd.c
index 012266a..1d7798d 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -1,8 +1,8 @@
/* This file is part of GNU Pies.
- Copyright (C) 2009, 2010 Sergey Poznyakoff
+ Copyright (C) 2009, 2010, 2011 Sergey Poznyakoff
GNU Pies is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
@@ -25,17 +25,17 @@
#define IFLD_USER 4 /* user */
#define IFLD_SERVER_PATH 5 /* server program path */
#define IFLD_SERVER_ARGS 6 /* server program arguments */
#define IFLD_MIN_COUNT 6 /* Minimum number of fields in entry */
-/* FIXME: Duplicated in grex-lex.l */
+/* FIXME: Copied from grecs/src/tree.c */
static void
-listel_dispose(const void *el)
+listel_dispose(void *el)
{
- free((void*)el);
+ free(el);
}
#define TCPMUX_PREFIX_STR "tcpmux/"
#define TCPMUX_PREFIX_LEN (sizeof(TCPMUX_PREFIX_STR)-1)
static int
@@ -278,19 +278,15 @@ inetd_conf_file (const char *file)
if (ISCF_TCPMUX (comp->flags))
comp->tcpmux = mktag (address, "tcpmux");
comp->service = xstrdup (service);
comp->privs.user = xstrdup (user); /* FIXME: memory leak */
if (group)
{
- comp->privs.groups =
- gl_list_create_empty (&gl_linked_list_implementation,
- NULL,
- NULL,
- listel_dispose,
- true);
- gl_list_add_last (comp->privs.groups, xstrdup (group));
+ comp->privs.groups = grecs_list_create ();
+ comp->privs.groups->free_entry = listel_dispose;
+ grecs_list_append (comp->privs.groups, xstrdup (group));
}
comp->program = xstrdup (ws.ws_wordv[IFLD_SERVER_PATH]);
if (ws.ws_wordc > IFLD_MIN_COUNT)
{

Return to:

Send suggestions and report system problems to the System administrator.