Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: patricide / matricide

by athomason (Curate)
on Mar 10, 2001 at 04:34 UTC ( #63413=note: print w/replies, xml ) Need Help??

in reply to patricide / matricide

Try the builtin getppid.

I just looked at what you're doing more closely, and I'm a bit curious about how you intend to guarantee that your kill call actually gets executed. A crafty user (if there are any trying to subvert your desires), could potentially interrupt or kill your script before it gets to the end, leaving them with an open shell. If your script is such that they'll never get the opportunity to do something like that, then you'll be fine. But just in case, you may want to toss in some signal handlers (e.g. SIGINT, SIGKILL, etc) that kills the shell as well.

Replies are listed 'Best First'.
Re: Re: patricide / matricide
by dshahin (Pilgrim) on Mar 10, 2001 at 04:46 UTC
    I am supposed to trust my users to some degree.
    I know, I know....
    I just want to make sure they don't accidentally escape to a shell with a ctrl-d or exit
      SECURITY RULE NUMBER ONE : Trust nobody !

      You should never trust a user nor any data and barely a program if you want to have a minimal security...

      "Trying to be a SMART lamer" (thanx to Merlyn ;-)
        yes, I understand. but in this particular instance, I have been given orders to trust the user to some degree.

        I'm only interested in catching honest mistakes....

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://63413]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2021-10-22 06:21 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (85 votes). Check out past polls.