[BusyBox 0000576]: inetd does not set argv[0]

bugs at busybox.net bugs at busybox.net
Mon Dec 5 18:12:10 UTC 2005


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=576 
====================================================================== 
Reported By:                farnerup
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   576
Category:                   Networking Support
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             12-02-2005 07:55 PST
Last Modified:              12-05-2005 10:11 PST
====================================================================== 
Summary:                    inetd does not set argv[0]
Description: 
When inetd (1.01) calls a service handler it doesn't set argv[0], which
obviously makes e.g. busybox telnetd fail to work. Attaching a patch.
====================================================================== 

---------------------------------------------------------------------- 
 vodz - 12-05-05 08:19  
---------------------------------------------------------------------- 
No. Its special for wrappers and documented:

     The server program arguments should be just as arguments normally
are,
     starting with argv[0], which is the name of the program.

See manuals for BSD inetd(8)
 
Please close this bugreport. 

---------------------------------------------------------------------- 
 farnerup - 12-05-05 08:37  
---------------------------------------------------------------------- 
Well, yes, they should be, but the point is they aren't.
argv[0] is NULL. 

---------------------------------------------------------------------- 
 vodz - 12-05-05 10:07  
---------------------------------------------------------------------- 
>  Well, yes, they should be, but the point is they aren't. argv[0] is
NULL.

A trivail test from busybox tree:
$ echo "
2121  stream  tcp     nowait  `id -un`    `pwd`/busybox  ls
" > inetd_test.conf

$ ./busybox inetd inetd_test.conf

$ telnet localhost 2121
bin
etc
...

Its work. 

---------------------------------------------------------------------- 
 vodz - 12-05-05 10:11  
---------------------------------------------------------------------- 
>  Well, yes, they should be, but the point is they aren't. argv[0] is
NULL.

A trivail test from busybox tree:
$ echo "
2121  stream  tcp     nowait  `id -un`    `pwd`/busybox  ls
" > inetd_test.conf

$ ./busybox inetd inetd_test.conf

$ telnet localhost 2121
bin
etc
...

Its work. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-02-05 07:55  farnerup       New Issue                                    
12-02-05 07:56  farnerup       Status                   new => assigned     
12-02-05 07:56  farnerup       Assigned To               => BusyBox         
12-02-05 07:56  farnerup       File Added: inetd-argv0.patch                    
12-05-05 08:19  vodz           Note Added: 0000722                          
12-05-05 08:37  farnerup       Note Added: 0000723                          
12-05-05 10:08  vodz           Note Added: 0000725                          
12-05-05 10:11  vodz           Note Added: 0000726                          
======================================================================




More information about the busybox-cvs mailing list