summaryrefslogtreecommitdiff
path: root/sys/kern/imgact_aout.c
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>1999-01-21 00:55:32 +0000
committercvs2svn <cvs2svn@FreeBSD.org>1999-01-21 00:55:32 +0000
commit76b5366091f76c9bc73570149ef5055648fc2c39 (patch)
tree590d020e0f2a5bea6e09d66d951a674443b21d67 /sys/kern/imgact_aout.c
parent4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff)
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r--sys/kern/imgact_aout.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 9fbd203177dd8..446946e8c58f5 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: imgact_aout.c,v 1.43 1998/10/16 03:55:00 peter Exp $
+ * $Id: imgact_aout.c,v 1.42 1998/09/14 05:36:49 jdp Exp $
*/
#include <sys/param.h>
@@ -232,8 +232,8 @@ exec_aout_imgact(imgp)
}
/*
- * Dump core, into a file named as described in the comments for
- * expand_name(), unless the process was setuid/setgid.
+ * Dump core, into a file named "progname.core", unless the process was
+ * setuid/setgid.
*/
int
aout_coredump(p)
@@ -248,6 +248,7 @@ aout_coredump(p)
char *name; /* name of corefile */
STOPEVENT(p, S_CORE, 0);
+
if (sugid_coredump == 0 && p->p_flag & P_SUGID)
return (EFAULT);
if (ctob(UPAGES + vm->vm_dsize + vm->vm_ssize) >=
@@ -256,6 +257,7 @@ aout_coredump(p)
name = expand_name(p->p_comm, p->p_ucred->cr_uid, p->p_pid);
if (name == NULL)
return (EFAULT); /* XXX -- not the best error */
+
NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, name, p);
error = vn_open(&nd, O_CREAT | FWRITE, S_IRUSR | S_IWUSR);
free(name, M_TEMP);