develooper Front page | perl.beginners | Postings from March 2002

RE: changing $0 on solaris?

Thread Previous | Thread Next
From:
behdad_forghani
Date:
March 28, 2002 08:29
Subject:
RE: changing $0 on solaris?
Message ID:
F154596C1E60644AAD153939E775F9030186E2DF@axcs02.cos.agilent.com
Hello,

I believe that changing $0 is a security breach on some systems. The only
UNIX virus/worm that I have seen, set the argv[0] to a null string and the
process would not show in the "ps" output list. UNIX ps displays the value
of argv[0], and if this string is changed the program can fake being a
different process.

Cheers,
Behdad

> -----Original Message-----
> From: Ross Simpson [mailto:mqsimpson@aol.com]
> Sent: Wednesday, March 27, 2002 6:04 PM
> To: Perl Beginners
> Subject: changing $0 on solaris?
> 
> 
> I'm trying to change the value of $0 in a perl script (so 
> that it shows as
> something I define in ps).
> Directly modifying $0 works in linux, but on solaris it has no effect.
> 
> Is there another way to do this, or does solaris not allow it?
> 
> thanks
> Ross
> 
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About