home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / misc / 5021 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.2 KB

  1. Path: sparky!uunet!think.com!yale.edu!spool.mu.edu!news.nd.edu!bsu-cs!nosilla
  2. From: nosilla@bsu-cs.bsu.edu (Lucky Knuckles)
  3. Newsgroups: comp.unix.misc
  4. Subject: Being nice(2)
  5. Message-ID: <3569@bsu-cs.bsu.edu>
  6. Date: 27 Jan 93 18:25:33 GMT
  7. Distribution: world
  8. Organization: Dept. of CS Ball State University Muncie IN
  9. Lines: 32
  10.  
  11.  
  12. Here is my situation:
  13.  
  14. I work on a AT&T SysVR3.2 (v2.11) machine everyday.  I am the system
  15. mangler.
  16.  
  17. But, normally, I do not run as root (of course).  A number of my users use
  18. up a LOT of CPU time.  I do not want to limit them, so I made this program:
  19.  
  20. main () 
  21. {
  22. nice(0);
  23. setuid(getuid());
  24. execl("/bin/csh","-csh",0);
  25. }
  26. (Please, no flames about programming style, or lack thereof)
  27. And, this program runs setuid root.
  28.  
  29. So, when I run it, I am "niced" up, but I don't gain root privs.
  30.  
  31. Question:  Is this cumulative?  If I run this over and over,
  32. will my "niceness" go up?  Or am I at max?  Or, am I fooling myself?
  33.  
  34. Reply via EMail, please:
  35.  
  36. nosilla@bsu-cs.bsu.edu
  37.  
  38. Thank you.
  39. -- 
  40. Andrew J. Templin, Confused Programmer, Ball State University
  41. VAX: 00AJTEMPLIN@bsu-ucs.bsu.edu   ULTRIX: nosilla@bsu-cs.bsu.edu
  42. "Ad Meorium Cthulhi Gloriam"            "Carpe Carp"
  43.