1.\" 2.\" Copyright (c) 2016 John Baldwin <jhb@FreeBSD.org> 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.Dd April 11, 2022 26.Dt sysdecode_cap_rights 3 27.Os 28.Sh NAME 29.Nm sysdecode_cap_rights 30.Nd output list of capability rights 31.Sh LIBRARY 32.Lb libsysdecode 33.Sh SYNOPSIS 34.In sysdecode.h 35.Ft void 36.Fn sysdecode_cap_rights "FILE *fp" "cap_rights_t *rightsp" 37.Sh DESCRIPTION 38The 39.Fn sysdecode_cap_rights 40function outputs a comma-separated list of capability rights at 41.Fa rightsp 42to the stream 43.Fa fp . 44.Pp 45Note that some capability rights are supersets of others; for example, 46.Dv CAP_PREAD 47is the union of 48.Dv CAP_READ 49and 50.Dv CAP_SEEK . 51.Fn sysdecode_cap_rights 52emits a minimal list of rights whose union is equal to 53.Fa *rightsp . 54For example, if both 55.Dv CAP_READ 56and 57.Dv CAP_SEEK 58are set in 59.Fa *rightsp , 60then 61.Fn sysdecode_cap_rights 62will include only 63.Dv CAP_PREAD 64in the output list. 65.Sh SEE ALSO 66.Xr sysdecode 3 67