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

Re: Changing argv[0] under Linux.


Jakob Oestergaard <jakob _at_ unthought.net> writes:

|> Can anyone point out a problem in the above? I'd be happy to see it shot
|> down, mainly because it's ugly - and I hate programs that mess with
|> argv[0].

argv[0] is not required to point to the actual file name of the
executable, and in fact, most of the time it won't.

Btw, don't use it for setuid programs, it's a huge security hole you can
drive a truck through.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab _at_ suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N$B|r(Bnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


$B$3$N>pJs$,$"$J$?$NC5$7$F$$$?$b$N$+$I$&$+A*Br$7$F$/$@$5$$!#(B
yes/$B$^$5$K$3$l$@!*(B   no/$B0c$&$J$!(B   part/$B0lIt8+$D$+$C$?(B   try/$B$3$l$G;n$7$F$_$k(B

$B$"$J$?$,C5$7$F$$$?>pJs$O$I$N$h$&$J$3$H$+!"$4<+M3$K5-F~2<$5$$!#FC$K!V$^$5$K$3$l$@!*!W$H8@$&>l9g$O5-F~$r$*4j$$$7$^$9!#(B
$BNc(B:$B!VJ#?t$N%^%7%s$+$i(BCATV$B7PM3$G(Bipmasquerade$B$rMxMQ$7$F(BWeb$B$r;2>H$7$?$$>l9g$N@_Dj$K$D$$$F!W(B
Follow-Ups: References: