View | Details | Raw Unified | Return to bug 57065
Collapse All | Expand All

(-)/sys/kern/kern_sig.c (+6 lines)
Lines 119-124 Link Here
119
SYSCTL_INT(_kern, OID_AUTO, coredump, CTLFLAG_RW,
119
SYSCTL_INT(_kern, OID_AUTO, coredump, CTLFLAG_RW,
120
	&do_coredump, 0, "Enable/Disable coredumps");
120
	&do_coredump, 0, "Enable/Disable coredumps");
121
121
122
static int set_nodump_flag = 0;
123
SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW,
124
	&set_nodump_flag, 0, "Enable/Disable setting of NODUMP flag on coredump files");
125
122
/*
126
/*
123
 * Signal properties and actions.
127
 * Signal properties and actions.
124
 * The array below categorizes the signals and their default actions
128
 * The array below categorizes the signals and their default actions
Lines 1656-1661 Link Here
1656
	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
1660
	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
1657
	vattr.va_size = 0;
1661
	vattr.va_size = 0;
1658
	VOP_LEASE(vp, p, cred, LEASE_WRITE);
1662
	VOP_LEASE(vp, p, cred, LEASE_WRITE);
1663
	if (set_nodump_flag)
1664
		vattr.va_flags = UF_NODUMP;
1659
	VOP_SETATTR(vp, &vattr, cred, p);
1665
	VOP_SETATTR(vp, &vattr, cred, p);
1660
	p->p_acflag |= ACORE;
1666
	p->p_acflag |= ACORE;
1661
	VOP_UNLOCK(vp, 0, p);
1667
	VOP_UNLOCK(vp, 0, p);

Return to bug 57065