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?



>  | 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