home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10510 < prev    next >
Encoding:
Text File  |  1992-08-29  |  2.4 KB  |  59 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!caen!umeecs!nova!ellis
  3. From: ellis@nova.gmi.edu (Stew Ellis)
  4. Subject: Re: How to prevent a large core-dump
  5. Message-ID: <ellis.715101781@nova>
  6. Sender: news@zip.eecs.umich.edu (Mr. News)
  7. Organization: GMI Engineering&Management Institute, Flint, MI
  8. References: <1992Aug26.013800.27174@sserve.cc.adfa.oz.au> <118390009@hpcupt3.cup.hp.com> <10035@uqcspe.cs.uq.oz.au>
  9. Date: Sat, 29 Aug 1992 15:23:01 GMT
  10. Lines: 47
  11.  
  12. gjn@cs.uq.oz.au (Geoff (cbird) Newton) writes:
  13.  
  14. >In <118390009@hpcupt3.cup.hp.com> aakash@hpcupt3.cup.hp.com (Aakash Sahai) writes:
  15.  
  16. >>In article <1992Aug25.173056.13401@utwente.nl> soos@math.utwente.nl (Adwin Soos) writes:
  17. >>| A few weeks or even months ago I have read some discussion about the problem
  18. >>| of preventing a core-dump.
  19.  
  20. >>Two simple solutions are -
  21.  
  22. >>(i)    Run the core-dumping program from a directory where the user does
  23. >>    not have permission to create file.
  24.  
  25. >>(ii)    Set the Effective-User-ID of the program different from its
  26. >>    Real-User-ID.
  27.  
  28. >Most systems have a ulimit command which allows you to set resource limits.
  29.  
  30. >bash has a builtin ulimit command, 'ulimit -c <num>' specifies the max size
  31. >of a corefile. <num> == 0 means no coredumps.
  32.  
  33. >csh has a similar feature with its builtin 'limit' (limit coredumpsize <num>).
  34.  
  35. >gjn
  36. >gjn@cs.uq.oz.au
  37. >(-|
  38.  
  39.  
  40. On SunOS, the core filesize if usually reported as being much larger than
  41. the number of blocks it actually occupies.  The reason is that it does not
  42. dump the dynamic libs with the image, but reports the amount of mem they
  43. take up when the process is running.  Frequently they take up only 20K even
  44. though they report 8M with ls -l.
  45.  
  46. Frequently it is not the size that is a problem, but rather the information
  47. they may contain to the curious person with access to strings.  If you use
  48. the limit command in the csh family, that does not impact a program that is
  49. running suid root, and you can get a core that contains passwords or
  50. something else sensitive written in a core that is mode 644.  What I have
  51. done is 'ln /dev/null core' in some of the directories where cores have had
  52. a nasty habit of showing up.  Does anybody know of any problem with this?
  53.  
  54. --
  55. --                                                        ___________________
  56.   R.Stewart(Stew) Ellis, Assoc.Prof., (Off)313-762-9765  /   _____  ______ 
  57.   Humanities & Social Science,  GMI Eng.& Mgmt. Inst.   /        / /  /  / /
  58.   Flint, MI 48504      ellis@nova.gmi.edu              /________/ /  /  / /
  59.