Date: Mon, 20 Mar 2017 16:19:29 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 217957] diff: Cannot create unified diffs when running under kern.trap_enotcap=1 Message-ID: <bug-217957-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217957 Bug ID: 217957 Summary: diff: Cannot create unified diffs when running under kern.trap_enotcap=3D1 Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: tobik@freebsd.org Created attachment 181005 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D181005&action= =3Dedit diff.diff This happens while running 'diff -u file1 file2' (file1 and file2 need to actually differ). After cap_enter() and after reading file1, diff(1) will try to open the following files which isn't allowed in capability mode: access("/etc/localtime",R_OK) ERR#94 'Not permitted in capability mode' issetugid() =3D 0 (0x0) open("/usr/share/zoneinfo/UTC",O_RDONLY,00) ERR#94 'Not permitted in capability mode' issetugid() =3D 0 (0x0) open("/usr/share/zoneinfo/posixrules",O_RDONLY,06423226000) ERR#94 'Not permitted in capability mode' Unfortunately when kern.trap_enotcap=3D1 is accidentally still set, it means diff will die immediately after access(). To workaround this we could initialize time conversion information with tzset(3) just before cap_enter(). --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217957-8>