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