Do not die on system built without CAPSICUM

This commit is contained in:
Baptiste Daroussin 2017-03-15 15:57:11 +00:00
parent 0e6bc811e4
commit 861152d234
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315309

View File

@ -134,7 +134,8 @@ getargs(char *av[])
else if ((ip->fp = fopen(p, "r")) == NULL) {
err(1, "%s", p);
}
if (cap_rights_limit(fileno(ip->fp), &rights_ro) < 0)
if (cap_rights_limit(fileno(ip->fp), &rights_ro) < 0
&& errno != ENOSYS)
err(1, "unable to limit rights on: %s", p);
ip->pad = P;
if (!ip->sepstring)