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.\" 259289f547SJohn Baldwin.\" $FreeBSD$ 269289f547SJohn Baldwin.\" 27*869199d9SMark Johnston.Dd April 11, 2022 289289f547SJohn Baldwin.Dt sysdecode_cap_rights 3 299289f547SJohn Baldwin.Os 309289f547SJohn Baldwin.Sh NAME 319289f547SJohn Baldwin.Nm sysdecode_cap_rights 329289f547SJohn Baldwin.Nd output list of capability rights 339289f547SJohn Baldwin.Sh LIBRARY 349289f547SJohn Baldwin.Lb libsysdecode 359289f547SJohn Baldwin.Sh SYNOPSIS 369289f547SJohn Baldwin.In sys/types.h 379289f547SJohn Baldwin.In stdbool.h 382edb60b9SJohn Baldwin.In stdio.h 399289f547SJohn Baldwin.In sysdecode.h 409289f547SJohn Baldwin.Ft void 419289f547SJohn Baldwin.Fn sysdecode_cap_rights "FILE *fp" "cap_rights_t *rightsp" 429289f547SJohn Baldwin.Sh DESCRIPTION 439289f547SJohn BaldwinThe 449289f547SJohn Baldwin.Fn sysdecode_cap_rights 459289f547SJohn Baldwinfunction outputs a comma-separated list of capability rights at 469289f547SJohn Baldwin.Fa rightsp 479289f547SJohn Baldwinto the stream 489289f547SJohn Baldwin.Fa fp . 49*869199d9SMark Johnston.Pp 50*869199d9SMark JohnstonNote that some capability rights are supersets of others; for example, 51*869199d9SMark Johnston.Dv CAP_PREAD 52*869199d9SMark Johnstonis the union of 53*869199d9SMark Johnston.Dv CAP_READ 54*869199d9SMark Johnstonand 55*869199d9SMark Johnston.Dv CAP_SEEK . 56*869199d9SMark Johnston.Fn sysdecode_cap_rights 57*869199d9SMark Johnstonemits a minimal list of rights whose union is equal to 58*869199d9SMark Johnston.Fa *rightsp . 59*869199d9SMark JohnstonFor example, if both 60*869199d9SMark Johnston.Dv CAP_READ 61*869199d9SMark Johnstonand 62*869199d9SMark Johnston.Dv CAP_SEEK 63*869199d9SMark Johnstonare set in 64*869199d9SMark Johnston.Fa *rightsp , 65*869199d9SMark Johnstonthen 66*869199d9SMark Johnston.Fn sysdecode_cap_rights 67*869199d9SMark Johnstonwill include only 68*869199d9SMark Johnston.Dv CAP_PREAD 69*869199d9SMark Johnstonin the output list. 709289f547SJohn Baldwin.Sh SEE ALSO 719289f547SJohn Baldwin.Xr sysdecode 3 72