On Tue, 2 Sep 2003 15:26:36 -0500 (CDT)
Jon Nelson <[EMAIL PROTECTED]> wrote:

> preline ought to do some argument checking, for if given no arguments,
> it simply segfaults, rather than displaying a usage message.
> 
> Which brings me to another point -- I feel that it's a bug for
> user-runnable programs to not /at least/ have -h, -? and --help.

I applied the following patch to the sources for the official
Debian packages of courier:

--- courier-0.42.0-vanilla/courier/module.local/preline.c       Wed Dec 29 02:49:24 
1999
+++ courier-0.42.0/courier/module.local/preline.c       Sat Apr  5 01:13:48 2003
@@ -31,6 +31,12 @@
 int    c;
 char *cmd;
 
+       if (argc == 1)
+        {
+               fprintf(stderr, "%s: commandline parameter 'program' needed\n", 
argv[0]);
+               exit (1);
+        }
+ 
        if (pipe(pipefd) < 0)
        {
                perror("pipe");

Ciao
        Racke


-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to