NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/38327: uu{en,de}code - any reason to use non-portable [sg]etprogname?



The following reply was made to PR bin/38327; it has been noted by GNATS.

From: Aleksey Cheusov <cheusov%tut.by@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: bin/38327: uu{en,de}code - any reason to use non-portable 
[sg]etprogname?
Date: Sat, 29 Mar 2008 17:53:55 +0200

 >  | I had nothing agaist err() or getprogname() in NetBSD's libc.  I just
 >  | didn't see any reason to use getprogname() and setprogname() in
 >  | exactly two .c files: uuencode.c and uudecode.c. I've already
 >  | answered: if an independance of executable name is your goal, feel
 >  | free to close this PR. If somebody call 'uuencode' a 'foobar'...
 >  
 >  Yes, we like all programs to not hard-code their program name, so that
 >  they behave consistently.
 
 Ok.
 
 Not a discussion :) Just a note.
 Using setprogname(argv [0]) may be dangerous for SUID programs.
 Invalid argv [0] may be passed through execv(2).
 
 -- 
 Best regards, Aleksey Cheusov.
 


Home | Main Index | Thread Index | Old Index