19289f547SJohn Baldwin.\" 29289f547SJohn Baldwin.\" Copyright (c) 2016 John Baldwin <jhb@FreeBSD.org> 39289f547SJohn Baldwin.\" 49289f547SJohn Baldwin.\" Redistribution and use in source and binary forms, with or without 59289f547SJohn Baldwin.\" modification, are permitted provided that the following conditions 69289f547SJohn Baldwin.\" are met: 79289f547SJohn Baldwin.\" 1. Redistributions of source code must retain the above copyright 89289f547SJohn Baldwin.\" notice, this list of conditions and the following disclaimer. 99289f547SJohn Baldwin.\" 2. Redistributions in binary form must reproduce the above copyright 109289f547SJohn Baldwin.\" notice, this list of conditions and the following disclaimer in the 119289f547SJohn Baldwin.\" documentation and/or other materials provided with the distribution. 129289f547SJohn Baldwin.\" 139289f547SJohn Baldwin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 149289f547SJohn Baldwin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 159289f547SJohn Baldwin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 169289f547SJohn Baldwin.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 179289f547SJohn Baldwin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 189289f547SJohn Baldwin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 199289f547SJohn Baldwin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 209289f547SJohn Baldwin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 219289f547SJohn Baldwin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 229289f547SJohn Baldwin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 239289f547SJohn Baldwin.\" SUCH DAMAGE. 249289f547SJohn Baldwin.\" 25*869199d9SMark Johnston.Dd April 11, 2022 269289f547SJohn Baldwin.Dt sysdecode_cap_rights 3 279289f547SJohn Baldwin.Os 289289f547SJohn Baldwin.Sh NAME 299289f547SJohn Baldwin.Nm sysdecode_cap_rights 309289f547SJohn Baldwin.Nd output list of capability rights 319289f547SJohn Baldwin.Sh LIBRARY 329289f547SJohn Baldwin.Lb libsysdecode 339289f547SJohn Baldwin.Sh SYNOPSIS 349289f547SJohn Baldwin.In sysdecode.h 359289f547SJohn Baldwin.Ft void 369289f547SJohn Baldwin.Fn sysdecode_cap_rights "FILE *fp" "cap_rights_t *rightsp" 379289f547SJohn Baldwin.Sh DESCRIPTION 389289f547SJohn BaldwinThe 399289f547SJohn Baldwin.Fn sysdecode_cap_rights 409289f547SJohn Baldwinfunction outputs a comma-separated list of capability rights at 419289f547SJohn Baldwin.Fa rightsp 429289f547SJohn Baldwinto the stream 439289f547SJohn Baldwin.Fa fp . 44*869199d9SMark Johnston.Pp 45*869199d9SMark JohnstonNote that some capability rights are supersets of others; for example, 46*869199d9SMark Johnston.Dv CAP_PREAD 47*869199d9SMark Johnstonis the union of 48*869199d9SMark Johnston.Dv CAP_READ 49*869199d9SMark Johnstonand 50*869199d9SMark Johnston.Dv CAP_SEEK . 51*869199d9SMark Johnston.Fn sysdecode_cap_rights 52*869199d9SMark Johnstonemits a minimal list of rights whose union is equal to 53*869199d9SMark Johnston.Fa *rightsp . 54*869199d9SMark JohnstonFor example, if both 55*869199d9SMark Johnston.Dv CAP_READ 56*869199d9SMark Johnstonand 57*869199d9SMark Johnston.Dv CAP_SEEK 58*869199d9SMark Johnstonare set in 59*869199d9SMark Johnston.Fa *rightsp , 60*869199d9SMark Johnstonthen 61*869199d9SMark Johnston.Fn sysdecode_cap_rights 62*869199d9SMark Johnstonwill include only 63*869199d9SMark Johnston.Dv CAP_PREAD 64*869199d9SMark Johnstonin the output list. 659289f547SJohn Baldwin.Sh SEE ALSO 669289f547SJohn Baldwin.Xr sysdecode 3 67