Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2018 19:27:14 +0000 (UTC)
From:      Mariusz Zaborski <oshogbo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341347 - head/lib/libcasper/services/cap_fileargs
Message-ID:  <201811301927.wAUJREoJ073551@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: oshogbo
Date: Fri Nov 30 19:27:14 2018
New Revision: 341347
URL: https://svnweb.freebsd.org/changeset/base/341347

Log:
  libcasper: do not fail if Capsicum is not avilable
  
  Casper service can be also used on the kernels without Capsicum support.
  
  Reported by:	sbruno
  Tested by:	sbruno

Modified:
  head/lib/libcasper/services/cap_fileargs/cap_fileargs.c

Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c
==============================================================================
--- head/lib/libcasper/services/cap_fileargs/cap_fileargs.c	Fri Nov 30 18:02:59 2018	(r341346)
+++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.c	Fri Nov 30 19:27:14 2018	(r341347)
@@ -363,7 +363,7 @@ open_file(const char *name)
 		return (-1);
 
 	if (caprightsp != NULL) {
-		if (cap_rights_limit(fd, caprightsp) < 0) {
+		if (cap_rights_limit(fd, caprightsp) < 0 && errno != ENOSYS) {
 			serrno = errno;
 			close(fd);
 			errno = serrno;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811301927.wAUJREoJ073551>