Fix a braino in previous.

Instead of trying to partially ifdef out ktrace handling, define the
missing identifier to 0. Without this fix lack of ktrace in the kernel
also means there is no SIGXFSZ signal delivery.
This commit is contained in:
Mateusz Guzik 2021-05-22 19:48:31 +00:00
parent 154f0ecc10
commit 48235c377f
2 changed files with 4 additions and 2 deletions

View File

@ -2371,13 +2371,11 @@ vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio,
if ((uoff_t)uio->uio_offset + uio->uio_resid < lim)
return (0);
#ifdef KTRACE
if (!ktr_write || ktr_filesize_limit_signal) {
PROC_LOCK(td->td_proc);
kern_psignal(td->td_proc, SIGXFSZ);
PROC_UNLOCK(td->td_proc);
}
#endif
return (EFBIG);
}

View File

@ -308,8 +308,12 @@ void ktrcapfail(enum ktr_cap_fail_type, const cap_rights_t *,
#define ktrstat_error(s, error) \
ktrstruct_error("stat", (s), sizeof(struct stat), error)
extern u_int ktr_geniosize;
#ifdef KTRACE
extern int ktr_filesize_limit_signal;
#else
#define ktr_filesize_limit_signal 0
#endif
#else
#include <sys/cdefs.h>