1.\" $OpenBSD: authnone_create.3,v 1.3 2013/06/05 03:39:23 tedu Exp $ 2.\" Mostly converted to mandoc by Theo de Raadt, Tue Feb 24 04:04:46 MST 1998 3.\" 4.\" Copyright (c) 2010, Oracle America, Inc. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions are 8.\" met: 9.\" 10.\" * Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" * Redistributions in binary form must reproduce the above 13.\" copyright notice, this list of conditions and the following 14.\" disclaimer in the documentation and/or other materials 15.\" provided with the distribution. 16.\" * Neither the name of the "Oracle America, Inc." nor the names of its 17.\" contributors may be used to endorse or promote products derived 18.\" from this software without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24.\" COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 27.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 29.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32.\" 33.Dd $Mdocdate: June 5 2013 $ 34.Dt AUTHNONE_CREATE 3 35.Os 36.Sh NAME 37.Nm auth_destroy , 38.Nm authnone_create , 39.Nm authunix_create , 40.Nm authunix_create_default , 41.Nm set_rpc_maxgrouplist 42.Nd library routines for remote procedure calls 43.Sh SYNOPSIS 44.In rpc/rpc.h 45.Ft void 46.Fn auth_destroy "AUTH *auth" 47.Ft AUTH * 48.Fn authnone_create "void" 49.Ft AUTH * 50.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup.gids" 51.Ft AUTH * 52.Fn authunix_create_default "void" 53.Ft void 54.Fn set_rpc_maxgrouplist "int num" 55.Sh DESCRIPTION 56These routines establish authentication information for use by the 57RPC functions described in 58.Xr rpc 3 . 59.Pp 60.Fn auth_destroy 61is a macro that destroys the authentication information associated with 62.Fa auth . 63Destruction usually involves deallocation of private data structures. 64The use of 65.Fa auth 66is undefined after calling 67.Fn auth_destroy . 68.Pp 69.Fn authnone_create 70creates and returns an RPC 71authentication handle that passes nonusable authentication 72information with each remote procedure call. 73This is the default authentication used by RPC. 74.Pp 75.Fn authunix_create 76creates and returns an RPC authentication handle that contains 77.Ux 78authentication information. 79The parameter 80.Fa host 81is the name of the machine on which the information was 82created; 83.Fa uid 84is the user's user ID; 85.Fa gid 86is the user's current group ID; 87.Fa len 88and 89.Fa aup_gids 90refer to a counted array of groups to which the user belongs. 91It is easy to impersonate a user. 92.Pp 93.Fn authunix_create_default 94calls 95.Fn authunix_create 96with the appropriate parameters. 97.Pp 98.Fn set_rpc_maxgrouplist 99allows the application to set the maximum size of the group list that 100will be used in 101.Fn authunix_create_default 102to 103.Fa num . 104Some servers will refuse mounts if the group list is larger than it 105expects (like 8). 106.Sh SEE ALSO 107.\"Xr rpc_secure 3 , 108.Xr rpcgen 1 , 109.Xr select 2 , 110.Xr getrpcport 3 , 111.Xr rpc 3 , 112.Xr xdr 3 , 113.Xr rpc 5 , 114.Xr portmap 8 115.Rs 116.%T Remote Procedure Calls: Protocol Specification 117.Re 118.Rs 119.%T Remote Procedure Call Programming Guide 120.Re 121.Rs 122.%T rpcgen Programming Guide 123.Re 124.Sh STANDARDS 125.Rs 126.%D June 1988 127.%Q Sun Microsystems, Inc. 128.%R RFC 1057 129.%T RPC: Remote Procedure Call Protocol Specification Version 2 130.Re 131