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
This commit is contained in:
Mariusz Zaborski 2018-11-30 19:27:14 +00:00
parent e7a0ad24b0
commit 77ebcc05ea

View File

@ -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;