.\" .\" Copyright (c) 2006 The DragonFly Project. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" 3. Neither the name of The DragonFly Project nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific, prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $DragonFly: src/lib/libc/sys/caps_sys_client.2,v 1.2 2006/03/02 19:27:35 swildner Exp $ .\" .Dd February 28, 2006 .Dt CAPS_SYS_CLIENT 2 .Os .Sh NAME .Nm caps_sys_client .Nd create a CAPS IPC client .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In sys/caps.h .Ft int .Fo caps_sys_client .Fa "const char *name" .Fa "uid_t uid" .Fa "gid_t gid" .Fa "int upcid" .Fa "int flags" .Fc .Sh DESCRIPTION Create an IPC client connected to the service specified by the .Fa name argument. Either .Fa uid or .Fa gid can be -1 (thereby indicating a wildcard), but not both. Programs connecting to a .Em generic service typically first try .Fn getuid and -1, then try -1 and .Fn getgid , then try 0 and 0. The .Fa upcid argument can either be an upcall or a kqueue identifier. .Sh RETURN VALUES On success, this function returns a port identifier. On failure, -1 is returned and .Va errno is set to indicate the error. .Sh ERRORS This function will fail if: .Bl -tag -width ".Bq Er EOPNOTSUPP" .It Bq Er EOPNOTSUPP The CAPS system has not been enabled with .Va kern.caps_enabled . .It Bq Er EINVAL An invalid argument was specified. .El .Sh SEE ALSO .Xr caps_sys_service 2 .Sh HISTORY The .Fn caps_sys_client function call first appeared in .Dx 1.0 . .Sh AUTHORS .An -nosplit CAPS IPC was written by .An Matthew Dillon . This man page was written by .An Sascha Wildner . .Sh BUGS Support for the .Fa upcid argument is currently not implemented.