innfeed ignoring -c in latest snapshot

Russ Allbery rra at stanford.edu
Sun Dec 5 00:36:59 UTC 1999


Russ Allbery <rra at Stanford.EDU> writes:

> Whoops, my fault.  Serious bug in startinnfeed; it's stripping out all
> the command-line arguments.  Fix into the tree shortly.

I believe this will do it:

RCS file: /dist1/cvs/isc/inn/inn/innfeed/startinnfeed.c,v
retrieving revision 1.12
diff -u -r1.12 startinnfeed.c
--- startinnfeed.c      1999/11/20 21:34:51     1.12
+++ startinnfeed.c      1999/12/05 00:33:27
@@ -65,14 +65,15 @@
 
 
 int
-main(void)
+main(int argc, char *argv[])
 {
     struct passwd *     pwd;
     struct group *      grp;
     uid_t               news_uid;
     gid_t               news_gid;
     struct rlimit       rl;
-    char *              innfeed_argv[2];
+    char **             innfeed_argv;
+    int                 i;
 
     openlog("innfeed", L_OPENLOG_FLAGS | LOG_PID, LOG_INN_PROG);
 
@@ -138,8 +139,11 @@
     }
 
     /* Build the argument vector for innfeed. */
+    innfeed_argv = NEW(char *, argc + 1);
     innfeed_argv[0] = concat(innconf->pathbin, "/innfeed", (char *) 0);
-    innfeed_argv[1] = NULL;
+    for (i = 1; i <= argc; i++)
+        innfeed_argv[i] = argv[i];
+    innfeed_argv[argc] = NULL;
 
     /* Set debugging malloc options. */
 #ifdef USE_DMALLOC

-- 
Russ Allbery (rra at stanford.edu)         <URL:http://www.eyrie.org/~eagle/>


More information about the inn-workers mailing list