Subject: bin/24192: inetd fragments command line args to daemons
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <rtr@netbsd.org>
List: netbsd-bugs
Date: 01/22/2004 18:19:08
>Number:         24192
>Category:       bin
>Synopsis:       inetd fragments command line args to daemons
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 22 06:24:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Tyler R. Retzlaff
>Release:        NetBSD 1.6ZG
>Organization:
>Environment:
System: NetBSD silence 1.6ZG NetBSD 1.6ZG (silence) #0: Thu Jan 1 04:01:12 EST 2004 rtr@silence:/x/obj/silence i386
Architecture: i386
Machine: i386
>Description:
Command line arguments which contain whitespace but are in between 
double quotes are broken when passed to daemons on startup.

# inetd.conf entry - results in usage() being spewed to log
www stream tcp nowait httpd /usr/pkg/libexec/bozohttpd bozohttpd -C ".py /usr/pkg/bin/python"

when bozo parses w/ getopt() the resultant optarg is '".py'

# command line - works properly
bozohttpd -b -C ".py /usr/pkg/bin/python"

when bozo parses w/ getopt() the resultant optarg is '.py /usr/pkg/bin/python'


>How-To-Repeat:
Try to use package www/bozohttpd from pkgsrc which has such an argument -C
>Fix:
None provided
>Release-Note:
>Audit-Trail:
>Unformatted: