Date: Wed, 14 Feb 2024 22:00:24 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 277057] rights(4): Not all rights may be specified in a rights mask Message-ID: <bug-277057-227-R6C0camdY1@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-277057-227@https.bugs.freebsd.org/bugzilla/> References: <bug-277057-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277057 Mark Johnston <markj@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |markj@FreeBSD.org --- Comment #2 from Mark Johnston <markj@FreeBSD.org> --- > 144: cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL | CAP_= SEEK), But the right(!) way to write this is cap_rights_init(&rights, CAP_READ, CAP_FSTAT, ...). I'd expect that to work for mixed-index rights. If it doesn't that's certainly a bug. Most of the code in the tree does this properly (and at least one of the few exceptions is my fault, sorry). Using plain OR works except when it doesn'= t, as you note. Maybe rights(4) should be more clear. cap_rights_set() should be used to incrementally add rights to a set. --=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-277057-227-R6C0camdY1>