tcpdump mailing list archives

Re: Fix FreeBSD capsicum build on FreeBSD 10.1


From: Guy Harris <guy () alum mit edu>
Date: Sat, 6 Dec 2014 12:40:57 -0800


On Dec 6, 2014, at 6:51 AM, Loganaden Velvindron <logan () elandsys com> wrote:

Support for FreeBSD capsicum doesn't work on FreeBSD 10.1, due to 
cap_rights_init which returns a struct, instead of an int.

Did its return value change in FreeBSD 10?  (Presumably it didn't change between 10 and 10.1.)

I think that we should follow OpenSSH and not test cap_rights_init.

If there are no systems that offer Capsicum but that don't have cap_rights_init(), there's no need to check for it.

The comment there is

#
# Check whether various functions are available.  If any are, set
# ac_lbl_capsicum_function_seen to yes; if any are not, set
# ac_lbl_capsicum_function_not_seen to yes.
#
# All of them must be available in order to enable capsicum sandboxing.
#

but, if there aren't any systems that have some but not all, testing for all of them is overkill.

However, AC_CHECK_FUNCS is intended not to care what type a function returns - unless a header is included that 
declares a function, it gets declared within the test program as returning char, so the compiler shouldn't choke on 
returning its value from main().  Is this failing due to the *linker* rejecting it because of mismatched function 
signatures?
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: