From e44502272a70f657b5704f822f52dd2c90dc7eba Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 4 Mar 2012 17:42:33 +0000 Subject: Drop the rpcauth(3) MLINK, there is no function of that name. Joint work with and OK haesbaert@ jmc@ --- lib/libc/rpc/Makefile.inc | 15 +++-- lib/libc/rpc/authnone_create.3 | 128 +++++++++++++++++++++++++++++++++++++++++ lib/libc/rpc/rpc.3 | 6 +- lib/libc/rpc/rpcauth.3 | 127 ---------------------------------------- 4 files changed, 138 insertions(+), 138 deletions(-) create mode 100644 lib/libc/rpc/authnone_create.3 delete mode 100644 lib/libc/rpc/rpcauth.3 (limited to 'lib/libc/rpc') diff --git a/lib/libc/rpc/Makefile.inc b/lib/libc/rpc/Makefile.inc index 2d6967102ba..8cccdc4f364 100644 --- a/lib/libc/rpc/Makefile.inc +++ b/lib/libc/rpc/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.15 2009/06/02 14:11:39 schwarze Exp $ +# $OpenBSD: Makefile.inc,v 1.16 2012/03/04 17:42:32 schwarze Exp $ # librpc sources .PATH: ${LIBCSRCDIR}/arch/${MACHINE}/rpc ${LIBCSRCDIR}/rpc @@ -12,17 +12,16 @@ SRCS+= auth_none.c auth_unix.c authunix_prot.c bindresvport.c \ svc_tcp.c svc_udp.c xdr.c xdr_array.c xdr_float.c xdr_mem.c \ xdr_rec.c xdr_reference.c xdr_stdio.c -MAN+= bindresvport.3 getrpcent.3 getrpcport.3 rpc.3 xdr.3 rpcauth.3 -MLINKS+= bindresvport.3 bindresvport_sa.3 \ +MAN+= authnone_create.3 bindresvport.3 getrpcent.3 getrpcport.3 rpc.3 xdr.3 +MLINKS+= authnone_create.3 auth_destroy.3 \ + authnone_create.3 authunix_create.3 \ + authnone_create.3 authunix_create_default.3 \ + authnone_create.3 set_rpc_maxgrouplist.3 \ + bindresvport.3 bindresvport_sa.3 \ getrpcent.3 getrpcbyname.3 \ getrpcent.3 getrpcbynumber.3 \ getrpcent.3 endrpcent.3 \ getrpcent.3 setrpcent.3 \ - rpcauth.3 auth_destroy.3 \ - rpcauth.3 authnone_create.3 \ - rpcauth.3 authunix_create.3 \ - rpcauth.3 authunix_create_default.3 \ - rpcauth.3 set_rpc_maxgrouplist.3 \ rpc.3 callrpc.3 \ rpc.3 clnt_broadcast.3 \ rpc.3 clnt_call.3 \ diff --git a/lib/libc/rpc/authnone_create.3 b/lib/libc/rpc/authnone_create.3 new file mode 100644 index 00000000000..b63d1ba45cb --- /dev/null +++ b/lib/libc/rpc/authnone_create.3 @@ -0,0 +1,128 @@ +.\" $OpenBSD: authnone_create.3,v 1.1 2012/03/04 17:42:32 schwarze Exp $ +.\" Mostly converted to mandoc by Theo de Raadt, Tue Feb 24 04:04:46 MST 1998 +.\" +.\" Copyright (c) 2010, Oracle America, Inc. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" * Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" * 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. +.\" * Neither the name of the "Oracle America, Inc." 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 HOLDER 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. +.\" +.Dd $Mdocdate: March 4 2012 $ +.Dt AUTHNONE_CREATE 3 +.Os +.Sh NAME +.Nm auth_destroy , +.Nm authnone_create , +.Nm authunix_create , +.Nm authunix_create_default , +.Nm set_rpc_maxgrouplist +.Nd library routines for remote procedure calls +.Sh SYNOPSIS +.Fd #include +.Ft void +.Fn auth_destroy "AUTH *auth" +.Ft AUTH * +.Fn authnone_create "void" +.Ft AUTH * +.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup.gids" +.Ft AUTH * +.Fn authunix_create_default "void" +.Ft void +.Fn set_rpc_maxgrouplist "int num" +.Sh DESCRIPTION +These routines establish authentication information for use by the +RPC functions described in +.Xr rpc 3 . +.Pp +.Fn auth_destroy +is a macro that destroys the authentication information associated with +.Fa auth . +Destruction usually involves deallocation of private data structures. +The use of +.Fa auth +is undefined after calling +.Fn auth_destroy . +.Pp +.Fn authnone_create +creates and returns an RPC +authentication handle that passes nonusable authentication +information with each remote procedure call. +This is the default authentication used by RPC. +.Pp +.Fn authunix_create +creates and returns an RPC authentication handle that contains +.Ux +authentication information. +The parameter +.Fa host +is the name of the machine on which the information was +created; +.Fa uid +is the user's user ID; +.Fa gid +is the user's current group ID; +.Fa len +and +.Fa aup_gids +refer to a counted array of groups to which the user belongs. +It is easy to impersonate a user. +.Pp +.Fn authunix_create_default +calls +.Fn authunix_create +with the appropriate parameters. +.Pp +.Fn set_rpc_maxgrouplist +allows the application to set the maximum size of the group list that +will be used in +.Fn authunix_create_default +to +.Fa num . +Some servers will refuse mounts if the group list is larger than it +expects (like 8). +.Sh SEE ALSO +.\"Xr rpc_secure 3 , +.Xr rpcgen 1 , +.Xr select 2 , +.Xr getrpcport 3 , +.Xr rpc 3 , +.Xr xdr 3 , +.Xr rpc 5 , +.Xr portmap 8 +.Rs +.%T "Remote Procedure Calls: Protocol Specification" +.Re +.Rs +.%T "Remote Procedure Call Programming Guide" +.Re +.Rs +.%T "rpcgen Programming Guide" +.Re +.Rs +.%A "Sun Microsystems, Inc." +.%T "RPC: Remote Procedure Call Protocol Specification" +.%R "RFC 1057, USC-ISI" +.Re diff --git a/lib/libc/rpc/rpc.3 b/lib/libc/rpc/rpc.3 index 4053fc7c504..c5743e991b6 100644 --- a/lib/libc/rpc/rpc.3 +++ b/lib/libc/rpc/rpc.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rpc.3,v 1.43 2010/10/29 12:43:09 jmc Exp $ +.\" $OpenBSD: rpc.3,v 1.44 2012/03/04 17:42:32 schwarze Exp $ .\" .\" Copyright (c) 1998 Theo de Raadt .\" All rights reserved. @@ -52,7 +52,7 @@ .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: October 29 2010 $ +.Dd $Mdocdate: March 4 2012 $ .Dt RPC 3 .Os .Sh NAME @@ -1211,9 +1211,9 @@ Service implementors usually do not need this routine. .Xr rpcgen 1 , .Xr poll 2 , .Xr select 2 , +.Xr authnone_create 3 , .Xr getrpcent 3 , .Xr getrpcport 3 , -.Xr rpcauth 3 , .Xr xdr 3 , .Xr rpc 5 , .Xr portmap 8 diff --git a/lib/libc/rpc/rpcauth.3 b/lib/libc/rpc/rpcauth.3 deleted file mode 100644 index 646b09f642f..00000000000 --- a/lib/libc/rpc/rpcauth.3 +++ /dev/null @@ -1,127 +0,0 @@ -.\" $OpenBSD: rpcauth.3,v 1.16 2012/02/26 19:15:20 haesbaert Exp $ -.\" Mostly converted to mandoc by Theo de Raadt, Tue Feb 24 04:04:46 MST 1998 -.\" -.\" Copyright (c) 2010, Oracle America, Inc. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions are -.\" met: -.\" -.\" * Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" * 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. -.\" * Neither the name of the "Oracle America, Inc." 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 HOLDER 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. -.\" -.Dd $Mdocdate: February 26 2012 $ -.Dt AUTHNONE_CREATE 3 -.Os -.Sh NAME -.Nm auth_destroy , -.Nm authnone_create , -.Nm authunix_create , -.Nm authunix_create_default -.Nd library routines for remote procedure calls -.Sh SYNOPSIS -.Fd #include -.Ft void -.Fn auth_destroy "AUTH *auth" -.Ft AUTH * -.Fn authnone_create "void" -.Ft AUTH * -.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup.gids" -.Ft AUTH * -.Fn authunix_create_default "void" -.Ft void -.Fn set_rpc_maxgrouplist "int num" -.Sh DESCRIPTION -These routines establish authentication information for use by the -RPC functions described in -.Xr rpc 3 . -.Pp -.Fn auth_destroy -is a macro that destroys the authentication information associated with -.Fa auth . -Destruction usually involves deallocation of private data structures. -The use of -.Fa auth -is undefined after calling -.Fn auth_destroy . -.Pp -.Fn authnone_create -creates and returns an RPC -authentication handle that passes nonusable authentication -information with each remote procedure call. -This is the default authentication used by RPC. -.Pp -.Fn authunix_create -creates and returns an RPC authentication handle that contains -.Ux -authentication information. -The parameter -.Fa host -is the name of the machine on which the information was -created; -.Fa uid -is the user's user ID; -.Fa gid -is the user's current group ID; -.Fa len -and -.Fa aup_gids -refer to a counted array of groups to which the user belongs. -It is easy to impersonate a user. -.Pp -.Fn authunix_create_default -calls -.Fn authunix_create -with the appropriate parameters. -.Pp -.Fn set_rpc_maxgrouplist -allows the application to set the maximum size of the group list that -will be used in -.Fn authunix_create_default -to -.Fa num . -Some servers will refuse mounts if the group list is larger than it -expects (like 8). -.Sh SEE ALSO -.\"Xr rpc_secure 3 , -.Xr rpcgen 1 , -.Xr select 2 , -.Xr getrpcport 3 , -.Xr rpc 3 , -.Xr xdr 3 , -.Xr rpc 5 , -.Xr portmap 8 -.Rs -.%T "Remote Procedure Calls: Protocol Specification" -.Re -.Rs -.%T "Remote Procedure Call Programming Guide" -.Re -.Rs -.%T "rpcgen Programming Guide" -.Re -.Rs -.%A "Sun Microsystems, Inc." -.%T "RPC: Remote Procedure Call Protocol Specification" -.%R "RFC 1057, USC-ISI" -.Re -- cgit v1.2.3