Date: Mon, 13 Mar 2017 15:34:21 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315197 - head/usr.bin/diff Message-ID: <201703131534.v2DFYLbq013625@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Mon Mar 13 15:34:21 2017 New Revision: 315197 URL: https://svnweb.freebsd.org/changeset/base/315197 Log: Do not die if cap_rights_limit reports ENOSYS Reported by: mmel Modified: head/usr.bin/diff/diffreg.c Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Mon Mar 13 13:56:01 2017 (r315196) +++ head/usr.bin/diff/diffreg.c Mon Mar 13 15:34:21 2017 (r315197) @@ -424,9 +424,11 @@ diffreg(char *file1, char *file2, int fl if (capsicum) { cap_rights_init(&rights_ro, CAP_READ, CAP_FSTAT, CAP_SEEK); - if (cap_rights_limit(fileno(f1), &rights_ro) < 0) + if (cap_rights_limit(fileno(f1), &rights_ro) < 0 + && errno != ENOSYS) err(2, "unable to limit rights on: %s", file1); - if (cap_rights_limit(fileno(f2), &rights_ro) < 0) + if (cap_rights_limit(fileno(f2), &rights_ro) < 0 && + errno != ENOSYS) err(2, "unable to limit rights on: %s", file2); if (fileno(f1) == STDIN_FILENO || fileno(f2) == STDIN_FILENO) { /* stding has already been limited */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703131534.v2DFYLbq013625>