Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Sep 2016 20:24:08 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        Baptiste Daroussin <bapt@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r305949 - head/usr.bin/soelim
Message-ID:  <a0a97be6-c09a-5622-c668-16fecad36ea5@freebsd.org>
In-Reply-To: <201609181916.u8IJGnG2062423@repo.freebsd.org>
References:  <201609181916.u8IJGnG2062423@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2016-09-18 15:16, Baptiste Daroussin wrote:
> Author: bapt
> Date: Sun Sep 18 19:16:48 2016
> New Revision: 305949
> URL: https://svnweb.freebsd.org/changeset/base/305949
> 
> Log:
>   Simplify the fix for bootstrap tools
>   
>   building head is not supported from prior to stable/10 where sys/capsicum.h was
>   named sys/capabilities.h
>   
>   Reported by:	kib
> 
> Modified:
>   head/usr.bin/soelim/soelim.c
> 
> Modified: head/usr.bin/soelim/soelim.c
> ==============================================================================
> --- head/usr.bin/soelim/soelim.c	Sun Sep 18 18:49:18 2016	(r305948)
> +++ head/usr.bin/soelim/soelim.c	Sun Sep 18 19:16:48 2016	(r305949)
> @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$");
>  #include <sys/param.h>
>  #if __FreeBSD_version > 1001510
>  #include <sys/capsicum.h>
> +#else
> +#include <sys/capabilities.h>

I am pretty sure this is spelled: sys/capability.h

>  #endif
>  #include <sys/types.h>
>  
> @@ -163,10 +165,8 @@ main(int argc, char **argv)
>  	int ret = 0;
>  	int flags = 0;
>  	char cwd[MAXPATHLEN];
> -#if __FreeBSD_version > 1001510
>  	unsigned long cmd;
>  	cap_rights_t rights;
> -#endif
>  
>  	includes = sl_init();
>  	if (getcwd(cwd, sizeof(cwd)) != NULL)
> @@ -200,7 +200,6 @@ main(int argc, char **argv)
>  	rootfd = open("/", O_DIRECTORY | O_RDONLY);
>  	if (rootfd == -1)
>  		err(EXIT_FAILURE, "unable to open '/'");
> -#if __FreeBSD_version > 1001510
>  	cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_IOCTL);
>  	/*
>  	 * EBADF in case stdin is closed by the caller
> @@ -227,7 +226,6 @@ main(int argc, char **argv)
>  
>  	if (cap_enter() < 0 && errno != ENOSYS)
>  		err(EXIT_FAILURE, "unable to enter capability mode");
> -#endif
>  
>  	if (argc == 0)
>  		ret = soelim_file(rootfd, stdin, flags);
> 


-- 
Allan Jude



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a0a97be6-c09a-5622-c668-16fecad36ea5>