svn commit: r305949 - head/usr.bin/soelim
Allan Jude
allanjude at freebsd.org
Mon Sep 19 00:24:10 UTC 2016
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
More information about the svn-src-all
mailing list