Date: Thu, 20 Feb 2003 19:14:46 -0800 (PST) From: Alex Vasylenko <lxv@send-pr.sink.omut.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Matthias Andree <matthias.andree@web.de> Subject: ports/48512: bogofilter 0.10.3.1 fails if started w/ 'bogofilter -l' Message-ID: <200302210314.h1L3Ek5O008675@mix.omut.org>
next in thread | raw e-mail | index | archive | help
>Number: 48512 >Category: ports >Synopsis: bogofilter 0.10.3.1 fails if started w/ 'bogofilter -l' >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 20 19:20:04 PST 2003 >Closed-Date: >Last-Modified: >Originator: Alex Vasylenko >Release: FreeBSD 4.7-RELEASE-p3 i386 >Organization: >Environment: System: FreeBSD 4.7-RELEASE-p3 #2: Tue Jan 7 18:35:55 PST 2003 >Description: bogofilter 0.10.3.1 uses a GNU extension to getopt to support optional arguments (::). as the result a valid command line 'bogofilter -l' results in bogofilter failing to parse its arguments. >How-To-Repeat: bogofilter -l < /dev/null >Fix: a workaround: run 'bogofilter -l logtag' a patch: --- config.c.orig Mon Feb 17 20:54:11 2003 +++ config.c Thu Feb 20 19:10:24 2003 @@ -487,7 +487,7 @@ int process_args(int argc, char **argv) fpin = stdin; - while ((option = getopt(argc, argv, ":23d:eFhl::o:snSNvVpuc:CgrRx:fqtI:O:y:k:" G R F)) != EOF) + while ((option = getopt(argc, argv, ":23d:eFhlo:snSNvVpuc:CgrRx:fqtI:O:y:k:" G R F)) != EOF) { switch(option) { @@ -567,7 +567,12 @@ int process_args(int argc, char **argv) case 'l': logflag = true; if (optarg) + { + if (*optarg == '-') + optind --; + else logtag = optarg; + } break; #ifdef GRAHAM_AND_ROBINSON >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302210314.h1L3Ek5O008675>