[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-inetutils] inetd patch: server args passed incorrectly
From: |
Dan Muresan |
Subject: |
[bug-inetutils] inetd patch: server args passed incorrectly |
Date: |
Fri, 7 Nov 2003 19:16:45 +0200 (EET) |
Hi,
inetd from inetutils-1.4.2 does not pass server arguments correctly to the
servers it invokes. This is due to the way the argv array passed to
execv(2) is constructed: argv [0] is supposed to contain the program name,
but is in fact ignored.
This prevents servers that require command line arguments (e.g. rlogin -o)
from running correctly when invoked from inetd.
Trivial one-line fix below.
Cheers,
Dan Muresan
--- inetd/inetd.c.orig 2003-11-07 18:59:15.000000000 +0200
+++ inetd/inetd.c 2003-11-07 19:00:43.000000000 +0200
@@ -1109,6 +1109,7 @@
} else
sep->se_bi = NULL;
argc = 0;
+ sep->se_argv [argc++] = newstr (sep->se_server);
for (arg = skip (&cp, fconfig); cp; arg = skip (&cp, fconfig))
if (argc < MAXARGV)
sep->se_argv[argc++] = newstr (arg);
- [bug-inetutils] inetd patch: server args passed incorrectly,
Dan Muresan <=