Date: Sun, 21 Mar 2021 01:39:24 +0000 From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: "Emmanuel Vadot" <manu@FreeBSD.org>, "Dr Robert N. M. Watson" <rwatson@FreeBSD.org> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8c3eaf244a41 - main - pkgbase: Install all BSM includes with INCS Message-ID: <690AB8BF-69F3-465A-BB2F-F72145935195@FreeBSD.org> In-Reply-To: <202103160613.12G6DJlN061954@gitrepo.freebsd.org> References: <202103160613.12G6DJlN061954@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 16 Mar 2021, at 6:13, Emmanuel Vadot wrote: Hi manu, Cc: rwatson > The branch main has been updated by manu: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=8c3eaf244a417a4ee105834410a52144206102e5 > > commit 8c3eaf244a417a4ee105834410a52144206102e5 > Author: Emmanuel Vadot <manu@FreeBSD.org> > AuthorDate: 2021-03-16 06:12:46 +0000 > Commit: Emmanuel Vadot <manu@FreeBSD.org> > CommitDate: 2021-03-16 06:12:46 +0000 > > pkgbase: Install all BSM includes with INCS > > Now they are correctly taggued and put them into the libbsm > package > > Reviewed by: bapt > Differential Revision: https://reviews.freebsd.org/D29165 > MFC after: 2 weeks > --- > include/Makefile | 27 +++++++++++++++++++++++++-- > 1 file changed, 25 insertions(+), 2 deletions(-) > > diff --git a/include/Makefile b/include/Makefile > index 8ddfd7015918..cf760359d2f5 100644 > --- a/include/Makefile > +++ b/include/Makefile .. > @@ -175,6 +193,11 @@ INCSGROUPS= INCS \ > VERIEXEC \ > WG > > +.if ${MK_AUDIT} != "no" > +INCSGROUPS+= BSM > +INCSGROUPS+= SECAUDIT > +.endif > + > .if ${MK_IPFILTER} != "no" > INCSGROUPS+= IPFILTER > .endif This breaks builds for WITHOUT_AUDIT= I believe. Files in libc (gen/fstab.c) include sys/mount.h which includes sys/ucred.h which unconditionally includes bsm/audit.h (and has been for a decade or more, and so does sys/sysent.h) which now is not found anymore if audit is turned off. I believe sys/ucred.h can be fixed: iff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 6a9becb54c7..b23374f48c9 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -38,8 +38,8 @@ #if defined(_KERNEL) || defined(_WANT_UCRED) #include <sys/_lock.h> #include <sys/_mutex.h> -#endif #include <bsm/audit.h> +#endif struct loginclass; Sadly this won’t fix lib/libkvm/kvm_proc.c and lib/libprocstat/libprocstat.c which define _WANT_UCRED and at least kvm_proc.c and probably kdump and rpcgen consumers rely on sysent and whatever else I missed with a quick look again which are not as easily fixed. How do we check in kernel header files for user space build options to be set correctly? That would actually not fix the problem for sysent.h as we’d have a missing type. And for ucred with the places actually asking for it as well. Given we cannot change the size of these structs I believe we have to unconditionally install at least audit.h (for now)? /bz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?690AB8BF-69F3-465A-BB2F-F72145935195>
