home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / perl / 7595 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!caen!uvaarpa!mmdf
  3. From: Al Gaspar <gaspar@stepsun.army.mil>
  4. Subject: setuid question
  5. Message-ID: <1992Dec23.211810.9925@uvaarpa.Virginia.EDU>
  6. Sender: mmdf@uvaarpa.Virginia.EDU (Mail System)
  7. Reply-To: gaspar@st-louis-emh2.army.mil
  8. Organization: The Internet
  9. Date: Wed, 23 Dec 1992 21:18:10 GMT
  10. Lines: 26
  11.  
  12.  
  13. This is probably a dumb question, but...  I am trying to write a setuid
  14. program using taintperl and the suidscript utility.  I want to be able
  15. to open a pipe from ps and check for some particular processes running.
  16. No matter what I try with execs or opens, it won't let me get at the
  17. output of that ps.  Even trying to capture it into a file first doesn't
  18. seem to work.  Taintperl continues to bitch that my path is insecure.
  19. I have tried the following:
  20.  
  21.     1.  open(FOO,"ps ax|");
  22.     2.  open(FOO,"-|") || exec 'ps -af';
  23.     3.  various combinations of exec to try and capture the ps output
  24.         to a file.
  25.  
  26. Tainperl keeps saying that my path is insecure.  Is there a way to do
  27. this?  Thanks for the help.
  28.  
  29. Cheers, Happy, Happy, Merry, Merry--
  30.  
  31. Al
  32.  
  33. -- 
  34. Al Gaspar       <gaspar@st-louis-emh2.army.mil>
  35. USAMC SIMA, ATTN:  AMXSI-TTC, 1222 Spruce St., St. Louis, MO  63103-2834
  36. COMMERCIAL:  (314) 331-4354  AUTOVON:  555-4354
  37. relay1.uu.net!st-louis-emh2.army.mil!gaspar
  38.