Announcement

Collapse
No announcement yet.

loop with perl

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • loop with perl

    Hi I have a problem. How can You can stop a loops if somebody wants to kill your server or something with perl loop - I did group programmer I gave a rules for that group - to work with perl - but if you put binary - and exec it - it works. How to stop it on freebsd ?? any ideas . BTW I do not want to remove account of this user
    Last edited by cjet; May 16, 2005, 17:22.
    "There is no patch for human stupidity"

  • #2
    If I deciphered your retarded ass wording properly, what you're looking for is probably a ulimit on CPU time. Here, I even made a Google link for you:

    http://www.google.com/search?q=ulimit+cpu+time

    Now RTFM
    45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B0
    45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B1
    [ redacted ]

    Comment


    • #3
      Originally posted by cjet
      Hi I have a problem. How can You can stop a loops if somebody wants to kill your server or something with perl loop - I did group programmer I gave a rules for that group - to work with perl - but if you put binary - and exec it - it works. How to stop it on freebsd ?? any ideas . BTW I do not want to remove account of this user
      I too had trouble understanding your question. I am guessing English was not your first language-- I see your your location is Poland. :-)

      If it is not a ulimit process issue, perhaps a signal issue. Several signals are used by a *NIX OS (KILL and STOP), but other signals can be passed to the process to have it behave differently (HUP, USR1, USR2, etc.)

      check "man signal" but note there is likely more than one.
      $ man 7 signal (this is probably what you want)
      $ man 2 signal (ANSI C signal header info)

      Specific to perl, try a google search of perl signal handling

      [Added content below here:]
      At first, I thought you were asking for a way to exit loops from the command line after the process was started, and suggested signals for that.

      I see another way to look at your question. You want people on a (web?) server to be able to build and run perl scripts, but perl allows for "system()" and "exec()" to call other applications to run, and since the server runs scripts as its own UID, a kill passed through an exec() or system() allows users to DoS your (web?) server and you want to stop this behavior, but still allow perl to work?

      I think apache supports per-user script execution that makes scripts run under the user's UID instead of the web server's UID which is non-root. With this, users can still exec() and system() but are limited to run what their own UID can run with privs of their own UID.
      Last edited by TheCotMan; May 17, 2005, 03:21.

      Comment


      • #4
        Originally posted by cjet
        Hi I have a problem. How can You can stop a loops if somebody wants to kill your server or something with perl loop - I did group programmer I gave a rules for that group - to work with perl - but if you put binary - and exec it - it works. How to stop it on freebsd ?? any ideas . BTW I do not want to remove account of this user
        Superior minds use FreeBSD
        Delicious Poison:

        The difference between a nerd and a geek? Well a nerd does not wear Spider Man butt huggers.

        Comment


        • #5
          Originally posted by bascule
          If I deciphered your retarded ass wording properly, what you're looking for is probably a ulimit on CPU time. Here, I even made a Google link for you:

          http://www.google.com/search?q=ulimit+cpu+time

          Now RTFM
          sure - I did it - it works only for C and C++ so do googling again :) it does not work on perl language:). I did a binary code and it crached again. Maby I am wrong and you know better - so tell me and do not show me a google - I came here for help not for searching in google.
          Last edited by cjet; May 18, 2005, 12:10.
          "There is no patch for human stupidity"

          Comment


          • #6
            Originally posted by TheCotMan
            I too had trouble understanding your question. I am guessing English was not your first language-- I see your your location is Poland. :-)

            If it is not a ulimit process issue, perhaps a signal issue. Several signals are used by a *NIX OS (KILL and STOP), but other signals can be passed to the process to have it behave differently (HUP, USR1, USR2, etc.)

            check "man signal" but note there is likely more than one.
            $ man 7 signal (this is probably what you want)
            $ man 2 signal (ANSI C signal header info)

            Specific to perl, try a google search of perl signal handling

            [Added content below here:]
            At first, I thought you were asking for a way to exit loops from the command line after the process was started, and suggested signals for that.

            I see another way to look at your question. You want people on a (web?) server to be able to build and run perl scripts, but perl allows for "system()" and "exec()" to call other applications to run, and since the server runs scripts as its own UID, a kill passed through an exec() or system() allows users to DoS your (web?) server and you want to stop this behavior, but still allow perl to work?

            I think apache supports per-user script execution that makes scripts run under the user's UID instead of the web server's UID which is non-root. With this, users can still exec() and system() but are limited to run what their own UID can run with privs of their own UID.
            TXH TheCotMan and you are right - english is not my language :) - THX for help I will try it. If it works I will tell you - THX
            "There is no patch for human stupidity"

            Comment


            • #7
              Originally posted by cjet
              Hi I have a problem. How can You can stop a loops if somebody wants to kill your server or something with perl loop - I did group programmer I gave a rules for that group - to work with perl - but if you put binary - and exec it - it works. How to stop it on freebsd ?? any ideas . BTW I do not want to remove account of this user
              Hi I have a problem. How can You stop a loop if somebody wants to kill your server with perl loop - I did group programmer I gave a rules for that group - to work with perl - but if you put binary - and exec it - it works. How to stop it on freebsd ?? any ideas . BTW I do not want to remove account of this user.

              Hmmm I think is better now - I was drunk I think while I was writing this Question - but I think it looks better now and You can understand it now.
              "There is no patch for human stupidity"

              Comment


              • #8
                Originally posted by cjet
                sure - I did it - it works only for C and C++ so do googling again :)
                The Perl interpreter is written in C. Think harder, Homer.
                45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B0
                45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B1
                [ redacted ]

                Comment


                • #9
                  Originally posted by bascule
                  The Perl interpreter is written in C. Think harder, Homer.
                  lol ok hehehehheheheh LOL rotfl
                  "There is no patch for human stupidity"

                  Comment

                  Working...
                  X