Changing argv of the python process

Dave Cinege dcinege at psychosis.com
Sun Aug 19 19:27:48 EDT 2001


Markus Schaber wrote:
> 
> > Right.  That is EXACTLY why he wants to alter argv.

At this moment I have no need to alter argv for anything.
I just found it odd python by default limited your control of 
modifing the true argv and listed common reason's why it's a desirable
option to be able to do so.

> But there's always a moment where another user can gather the unaltered
> argv.

Yes, for a millisecond, and that someone must have access to the process
tree, and must be able to run a user process in a race condition
to attempt to grab such info, probably with no idea when execution will
commence, making the servers load average of *10* quite obvious to even
the dumbest admin. 

Generally, this means that user must have unlimited shell access, and
generally only trusted users should be allowed such access to a server
in the first place.

And after all of this high speed parsing roulette, odds are they'll
likely miss grabing the fucking thing anyway...

So, thank you and the others for continuing the offtopic answer
to my question... (Which should have been, "No it's not built in, and no
their's no 3rd party modules to do it.")


While you all were mentally masturbating over the security
consequences of *not limiting a programmer* from modifing argv,
I went and wrote a patch to sys to allow argv modification.
I will be posting it to the list when I get a chance to make a proper
diff and document it.




More information about the Python-list mailing list