Mercurial > illumos > illumos-gate
changeset 12648:61bf50c7467b
6960999 portmapper support needed to support lx brand should go too
author | Surya Prakki <Surya.Prakki@Sun.COM> |
---|---|
date | Fri, 18 Jun 2010 09:29:16 -0700 |
parents | ca11a9750060 |
children | 87a8e25df5cf |
files | usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c usr/src/cmd/fs.d/nfs/lib/nfs_tbind.h usr/src/cmd/fs.d/nfs/nfs4cbd/nfs4cbd.c usr/src/cmd/fs.d/nfs/nfsd/nfsd.c usr/src/cmd/fs.d/nfs/statd/sm_svc.c usr/src/lib/libnsl/common/mapfile-vers usr/src/lib/libnsl/rpc/pmap_clnt.c usr/src/lib/libnsl/rpc/svc.c usr/src/lib/libnsl/rpc/svc_generic.c usr/src/lib/libnsl/rpc/svc_simple.c usr/src/uts/common/os/pid.c usr/src/uts/common/sys/proc.h |
diffstat | 12 files changed, 35 insertions(+), 357 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c Fri Jun 18 09:29:16 2010 -0700 @@ -19,16 +19,13 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. */ /* * nfs_tbind.c, common part for nfsd and lockd. */ -#define PORTMAP - #include <tiuser.h> #include <fcntl.h> #include <netconfig.h> @@ -36,7 +33,6 @@ #include <errno.h> #include <syslog.h> #include <rpc/rpc.h> -#include <rpc/pmap_prot.h> #include <sys/time.h> #include <sys/resource.h> #include <signal.h> @@ -128,9 +124,6 @@ static int get_opt(int fd, int level, int name); static void nfslib_set_sockbuf(int fd); -extern bool_t __pmap_set(const rpcprog_t program, const rpcvers_t version, - const struct netconfig *nconf, const struct netbuf *address); - /* * Called to create and prepare a transport descriptor for in-kernel * RPC service. @@ -552,7 +545,7 @@ */ void do_one(char *provider, NETSELDECL(proto), struct protob *protobp0, - int (*svc)(int, struct netbuf, struct netconfig *), int use_pmap) + int (*svc)(int, struct netbuf, struct netconfig *)) { register int sock; struct protob *protobp; @@ -596,31 +589,9 @@ strncasecmp(retnconf->nc_proto, NC_UDP, l) == 0) continue; - if (use_pmap) { - /* - * Note that if we're using a portmapper - * instead of rpcbind then we can't do an - * unregister operation here. - * - * The reason is that the portmapper unset - * operation removes all the entries for a - * given program/version regardelss of - * transport protocol. - * - * The caller of this routine needs to ensure - * that __pmap_unset() has been called for all - * program/version service pairs they plan - * to support before they start registering - * each program/version/protocol triplet. - */ - (void) __pmap_set(protobp->program, vers, - retnconf, retaddr); - } else { - (void) rpcb_unset(protobp->program, vers, - retnconf); - (void) rpcb_set(protobp->program, vers, - retnconf, retaddr); - } + (void) rpcb_unset(protobp->program, vers, retnconf); + (void) rpcb_set(protobp->program, vers, retnconf, + retaddr); } } @@ -660,7 +631,7 @@ */ int do_all(struct protob *protobp, - int (*svc)(int, struct netbuf, struct netconfig *), int use_pmap) + int (*svc)(int, struct netbuf, struct netconfig *)) { struct netconfig *nconf; NCONF_HANDLE *nc; @@ -678,7 +649,7 @@ (protobp->program != NFS4_CALLBACK || strncasecmp(nconf->nc_proto, NC_UDP, l) != 0)) do_one(nconf->nc_device, nconf->nc_proto, - protobp, svc, use_pmap); + protobp, svc); } (void) endnetconfig(nc); return (0);
--- a/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.h Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.h Fri Jun 18 09:29:16 2010 -0700 @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. */ /* @@ -30,8 +29,6 @@ #ifndef _NFS_TBIND_H #define _NFS_TBIND_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <netconfig.h> #include <netdir.h> @@ -76,11 +73,9 @@ struct nd_hostserv *, int); extern void nfslib_log_tli_error(char *, int, struct netconfig *); extern int do_all(struct protob *, - int (*)(int, struct netbuf, struct netconfig *), - int use_pmap); + int (*)(int, struct netbuf, struct netconfig *)); extern void do_one(char *, char *, struct protob *, - int (*)(int, struct netbuf, struct netconfig *), - int use_pmap); + int (*)(int, struct netbuf, struct netconfig *)); extern void poll_for_action(void); #ifdef __cplusplus
--- a/usr/src/cmd/fs.d/nfs/nfs4cbd/nfs4cbd.c Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/cmd/fs.d/nfs/nfs4cbd/nfs4cbd.c Fri Jun 18 09:29:16 2010 -0700 @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ @@ -31,8 +30,6 @@ * under license from the Regents of the University of California. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This module provides the user level support for the NFSv4 * callback program. It is modeled after nfsd. When a nfsv4 @@ -201,7 +198,7 @@ protobp->program = NFS4_CALLBACK; protobp->next = NULL; - if (do_all(protobp, NULL, 0) == -1) { + if (do_all(protobp, NULL) == -1) { exit(1); }
--- a/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c Fri Jun 18 09:29:16 2010 -0700 @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -534,7 +533,7 @@ protobp->next = (struct protob *)NULL; if (allflag) { - if (do_all(protobp0, nfssvc, 0) == -1) { + if (do_all(protobp0, nfssvc) == -1) { fprintf(stderr, "setnetconfig failed : %s", strerror(errno)); exit(1); @@ -553,7 +552,7 @@ if (strcmp(nconf->nc_proto, proto) == 0) { protoFound = TRUE; do_one(nconf->nc_device, NULL, - protobp0, nfssvc, 0); + protobp0, nfssvc); } } (void) endnetconfig(nc); @@ -563,12 +562,12 @@ proto); } } else if (provider) - do_one(provider, proto, protobp0, nfssvc, 0); + do_one(provider, proto, protobp0, nfssvc); else { for (providerp = defaultproviders; *providerp != NULL; providerp++) { provider = *providerp; - do_one(provider, NULL, protobp0, nfssvc, 0); + do_one(provider, NULL, protobp0, nfssvc); } } done:
--- a/usr/src/cmd/fs.d/nfs/statd/sm_svc.c Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/cmd/fs.d/nfs/statd/sm_svc.c Fri Jun 18 09:29:16 2010 -0700 @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -77,9 +76,6 @@ #define backup1 "statmon/sm.bak/" #define state1 "statmon/state" -extern void __use_portmapper(int); -extern bool_t __pmap_unset(const rpcprog_t program, const rpcvers_t version); - /* * User and group IDs to run as. These are hardwired, rather than looked * up at runtime, because they are very unlikely to change and because they @@ -440,7 +436,6 @@ int mode; int sz; int connmaxrec = RPC_MAXDATASIZE; - int use_pmap = 0; addrix = 0; pathix = 0; @@ -449,7 +444,7 @@ if (init_hostname() < 0) exit(1); - while ((c = getopt(argc, argv, "a:Dd:G:Pp:rU:")) != EOF) + while ((c = getopt(argc, argv, "Dd:a:G:p:rU:")) != EOF) switch (c) { case 'd': (void) sscanf(optarg, "%d", &debug); @@ -478,10 +473,6 @@ (void) fprintf(stderr, "statd: -a exceeding maximum hostnames\n"); break; - case 'P': - __use_portmapper(1); - use_pmap = 1; - break; case 'U': (void) sscanf(optarg, "%d", &daemon_uid); break; @@ -612,11 +603,6 @@ syslog(LOG_INFO, "unable to set maximum RPC record size"); } - if (use_pmap) { - (void) __pmap_unset(SM_PROG, SM_VERS); - (void) __pmap_unset(NSM_ADDR_PROGRAM, NSM_ADDR_V1); - } - if (!svc_create(sm_prog_1, SM_PROG, SM_VERS, "netpath")) { syslog(LOG_ERR, "statd: unable to create (SM_PROG, SM_VERS) for netpath.");
--- a/usr/src/lib/libnsl/common/mapfile-vers Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/lib/libnsl/common/mapfile-vers Fri Jun 18 09:29:16 2010 -0700 @@ -295,9 +295,6 @@ SUNWprivate_1.5 { global: clnt_create_service_timed; - __pmap_set; - __pmap_unset; - __use_portmapper; } SUNWprivate_1.4; SUNWprivate_1.4 {
--- a/usr/src/lib/libnsl/rpc/pmap_clnt.c Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/lib/libnsl/rpc/pmap_clnt.c Fri Jun 18 09:29:16 2010 -0700 @@ -20,8 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ @@ -32,8 +31,6 @@ * California. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef PORTMAP /* @@ -59,176 +56,6 @@ static const struct timeval rmttimeout = { 3, 0 }; /* - * Solaris hasn't trully supported local portmappers since Solaris 2.4. - * - * In Solaris 2.0 the portmapper was replaced with rpcbind. Essentially - * rpcbind implements version 3 of the portmapper protocol. (The last - * version of the portmapper protocol while it was still called - * portmap was version 2.) The rpcbind protocol provides a lot - * of improvements over the portmap protocol. (Like the ability - * to bind to non AF_INET transports like TLI and to unregister - * individual transport providers instead of entire serivices.) - * - * So in Solaris 2.0 the portmapper was replace with rpcbind, but it - * wasn't until Solaris 2.5 that all the local portmapper code was - * modified to assume that the local processes managing rpc services - * always supported the rpcbind protocol. When this happened all the - * local portmap registration code was enhanced to translated any - * portmapper requests into rpcbind requests. This is a fine assumption - * for Solaris where we always have control over the local - * portmapper/rpcbind service and we can make sure that it always - * understands the rpcbind protocol. - * - * But this is a problem for BrandZ. In BrandZ we don't have contol over - * what local portmapper is running. (Unless we want to replace it.) - * In the Linux case, current Linux distributions don't support the - * rpcbind protocol, instead they support the old portmapper protocol - * (verison 2.) So to allow Solaris services to register with the - * Linux portmapper (which we need to support to allow us to run the - * native NFS daemons) there are two things that need to be done. - * - * - The classic interfaces for registering services with the version 2 - * portmapper is via pmap_set() and pmap_unset(). In Solaris 2.5 these - * functions were changed to translate portmap requests into rpcbind - * requests. These interfaces need to be enhanced so that if we're - * trying to register with a portmapper instead of rpcbind, we don't - * translate the requests to rpcbind requests. - * - * - Libnsl provides lots of interfaces to simplify the creation of rpc - * services (see rpc_svc_*). Internally, the interfaces all assume - * that the local process that manages rpc services support the rpcbind - * protocol. To avoid having to update all rpc services that use these - * functions to be portmapper aware, we need to enhance these functions - * to support the portmapper protocol in addition to rpcbind. - * - * To address both these requirements we've introduced three key functions. - * - * __pmap_set() - Registers services using the portmapper version 2 - * protocol. (Behaves like the Pre-Solaris 2.5 pmap_set()) - * - * __pmap_unset() - Unregisters services using the portmapper version 2 - * protocol. (Behaves like the Pre-Solaris 2.5 pmap_unset()) - * - * __use_portmapper() - Tells libnsl if the local system expects - * the portmapper protocol versus the rpcbind protocol. - * - * If an rpc program uses this interface to tell libnsl - * that it want's to use portmap based services instead of - * rpcbind based services, then libnsl will internally - * replace attempts to register services via rpcbind - * with portmap. - */ - -static CLIENT * -pmap_common(const struct netconfig *nconf, int *socket) -{ - struct sockaddr_in sa_local; - CLIENT *client; - - /* we only support tcp and udp */ - if ((nconf != NULL) && - (strcmp(nconf->nc_netid, "udp") != 0) && - (strcmp(nconf->nc_netid, "tcp") != 0)) - return (NULL); - - /* try connecting to the portmapper via udp */ - get_myaddress(&sa_local); - client = clntudp_bufcreate(&sa_local, PMAPPROG, PMAPVERS, - timeout, socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); - if (client == NULL) { - /* try connecting to the portmapper via tcp */ - client = clnttcp_create(&sa_local, PMAPPROG, PMAPVERS, - socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); - if (client == NULL) - return (NULL); - } - - return (client); -} - -void -__use_portmapper(int p) -{ - use_portmapper = p; -} - -/* - * Set a mapping between program, version and address. - * Calls the portmapper service to do the mapping. - */ -bool_t -__pmap_set(const rpcprog_t program, const rpcvers_t version, - const struct netconfig *nconf, const struct netbuf *address) -{ - struct sockaddr_in *sa; - struct pmap parms; - CLIENT *client; - bool_t rslt; - int socket = RPC_ANYSOCK; - - /* address better be a sockaddr_in struct */ - if (address == NULL) - return (FALSE); - if (address->len != sizeof (struct sockaddr_in)) - return (FALSE); - - /* get a connection to the portmapper */ - if (nconf == NULL) - return (FALSE); - if ((client = pmap_common(nconf, &socket)) == NULL) - return (FALSE); - - /* LINTED pointer cast */ - sa = (struct sockaddr_in *)(address->buf); - - /* initialize the portmapper request */ - parms.pm_prog = program; - parms.pm_vers = version; - parms.pm_port = ntohs(sa->sin_port); - parms.pm_prot = - (strcmp(nconf->nc_netid, "udp") == 0) ? IPPROTO_UDP : IPPROTO_TCP; - - /* make the call */ - if (CLNT_CALL(client, PMAPPROC_SET, xdr_pmap, (caddr_t)&parms, - xdr_bool, (char *)&rslt, tottimeout) != RPC_SUCCESS) - rslt = FALSE; - - CLNT_DESTROY(client); - (void) close(socket); - return (rslt); -} - -/* - * Remove the mapping between program, version and port. - * Calls the portmapper service remotely to do the un-mapping. - */ -bool_t -__pmap_unset(const rpcprog_t program, const rpcvers_t version) -{ - struct pmap parms; - CLIENT *client; - bool_t rslt; - int socket = RPC_ANYSOCK; - - /* get a connection to the portmapper */ - if ((client = pmap_common(NULL, &socket)) == NULL) - return (FALSE); - - /* initialize the portmapper request */ - parms.pm_prog = program; - parms.pm_vers = version; - parms.pm_port = 0; - parms.pm_prot = 0; - - /* make the call */ - CLNT_CALL(client, PMAPPROC_UNSET, xdr_pmap, (caddr_t)&parms, - xdr_bool, (char *)&rslt, tottimeout); - CLNT_DESTROY(client); - (void) close(socket); - return (rslt); -} - -/* * Set a mapping between program, version and port. * Calls the pmap service remotely to do the mapping. */ @@ -252,10 +79,8 @@ freenetconfigent(nconf); return (FALSE); } - if (!use_portmapper) - rslt = rpcb_set(program, version, nconf, na); - else - rslt = __pmap_set(program, version, nconf, na); + rslt = rpcb_set(program, version, nconf, na); + netdir_free((char *)na, ND_ADDR); freenetconfigent(nconf); return (rslt); @@ -272,9 +97,6 @@ bool_t udp_rslt = FALSE; bool_t tcp_rslt = FALSE; - if (use_portmapper) - return (__pmap_unset(program, version)); - nconf = __rpc_getconfip("udp"); if (nconf) { udp_rslt = rpcb_unset(program, version, nconf);
--- a/usr/src/lib/libnsl/rpc/svc.c Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/lib/libnsl/rpc/svc.c Fri Jun 18 09:29:16 2010 -0700 @@ -20,8 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* * Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved. @@ -34,8 +33,6 @@ * California. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * svc.c, Server-side remote procedure call interface. * @@ -68,11 +65,6 @@ extern bool_t __svc_get_door_cred(); extern bool_t __rpc_get_local_cred(); -extern int use_portmapper; -extern bool_t __pmap_set(const rpcprog_t, const rpcvers_t, - const struct netconfig *, const struct netbuf *); -extern bool_t __pmap_unset(const rpcprog_t, const rpcvers_t); - SVCXPRT **svc_xports; static int nsvc_xports; /* total number of svc_xports allocated */ @@ -925,14 +917,11 @@ rpcb_it: (void) rw_unlock(&svc_lock); - if (!nconf) - return (TRUE); /* now register the information with the local binder service */ - if (!use_portmapper) + if (nconf) return (rpcb_set(prog, vers, nconf, &xprt->xp_ltaddr)); - else - return (__pmap_set(prog, vers, nconf, &xprt->xp_ltaddr)); + return (TRUE); /*NOTREACHED*/ } @@ -946,10 +935,8 @@ struct svc_callout *s; /* unregister the information anyway */ - if (!use_portmapper) - (void) rpcb_unset(prog, vers, NULL); - else - (void) __pmap_unset(prog, vers); + (void) rpcb_unset(prog, vers, NULL); + (void) rw_wrlock(&svc_lock); while ((s = svc_find(prog, vers, &prev, NULL)) != NULL_SVC) { if (prev == NULL_SVC) {
--- a/usr/src/lib/libnsl/rpc/svc_generic.c Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/lib/libnsl/rpc/svc_generic.c Fri Jun 18 09:29:16 2010 -0700 @@ -20,15 +20,12 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * svc_generic.c, Server side for RPC. * @@ -71,8 +68,6 @@ extern bool_t __rpc_try_doors(const char *, bool_t *); -extern int use_portmapper; - /* * The highest level interface for server creation. * It tries for all the nettokens in that particular class of token @@ -141,25 +136,8 @@ (void) mutex_lock(&xprtlist_lock); for (l = _svc_xprtlist; l; l = l->next) { if (strcmp(l->xprt->xp_netid, nconf->nc_netid) == 0) { - /* - * Note that if we're using a portmapper - * instead of rpcbind then we can't do an - * unregister operation here. - * - * The reason is that the portmapper unset - * operation removes all the entries for a - * given program/version regardelss of - * transport protocol. - * - * The caller of this routine needs to ensure - * that __pmap_unset() has been called for all - * program/version service pairs they plan - * to support before they start registering - * each program/version/protocol triplet. - */ - if (!use_portmapper) - (void) rpcb_unset(prognum, - versnum, nconf); + /* Found an old one, use it */ + (void) rpcb_unset(prognum, versnum, nconf); if (svc_reg(l->xprt, prognum, versnum, dispatch, nconf) == FALSE) (void) syslog(LOG_ERR, @@ -219,24 +197,7 @@ if (xprt == NULL) return (NULL); - /* - * Note that if we're using a portmapper - * instead of rpcbind then we can't do an - * unregister operation here. - * - * The reason is that the portmapper unset - * operation removes all the entries for a - * given program/version regardelss of - * transport protocol. - * - * The caller of this routine needs to ensure - * that __pmap_unset() has been called for all - * program/version service pairs they plan - * to support before they start registering - * each program/version/protocol triplet. - */ - if (!use_portmapper) - (void) rpcb_unset(prognum, versnum, (struct netconfig *)nconf); + (void) rpcb_unset(prognum, versnum, (struct netconfig *)nconf); if (svc_reg(xprt, prognum, versnum, dispatch, nconf) == FALSE) { (void) syslog(LOG_ERR, "svc_tp_create: Could not register prog %d vers %d on %s",
--- a/usr/src/lib/libnsl/rpc/svc_simple.c Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/lib/libnsl/rpc/svc_simple.c Fri Jun 18 09:29:16 2010 -0700 @@ -20,8 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -31,8 +30,6 @@ * California. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * svc_simple.c * Simplified front end to rpc. @@ -56,8 +53,6 @@ #include <syslog.h> #include <rpc/nettype.h> -extern int use_portmapper; - static struct proglst { char *(*p_progname)(); rpcprog_t p_prognum; @@ -176,24 +171,7 @@ (strcmp(pl->p_netid, netid) == 0)) break; if (pl == NULL) { /* Not yet */ - /* - * Note that if we're using a portmapper - * instead of rpcbind then we can't do an - * unregister operation here. - * - * The reason is that the portmapper unset - * operation removes all the entries for a - * given program/version regardelss of - * transport protocol. - * - * The caller of this routine needs to ensure - * that __pmap_unset() has been called for all - * program/version service pairs they plan - * to support before they start registering - * each program/version/protocol triplet. - */ - if (!use_portmapper) - (void) rpcb_unset(prognum, versnum, nconf); + (void) rpcb_unset(prognum, versnum, nconf); } else { /* so that svc_reg does not call rpcb_set() */ nconf = NULL;
--- a/usr/src/uts/common/os/pid.c Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/uts/common/os/pid.c Fri Jun 18 09:29:16 2010 -0700 @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -111,18 +110,6 @@ return (pidp); } -struct pid * -pid_find(pid_t pid) -{ - struct pid *pidp; - - mutex_enter(&pidlinklock); - pidp = pid_lookup(pid); - mutex_exit(&pidlinklock); - - return (pidp); -} - void pid_setmin(void) {
--- a/usr/src/uts/common/sys/proc.h Fri Jun 18 08:20:44 2010 -0700 +++ b/usr/src/uts/common/sys/proc.h Fri Jun 18 09:29:16 2010 -0700 @@ -20,8 +20,7 @@ */ /* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -624,7 +623,6 @@ extern void pid_setmin(void); extern pid_t pid_allocate(proc_t *, pid_t, int); -extern struct pid *pid_find(pid_t); extern int pid_rele(struct pid *); extern void pid_exit(proc_t *); extern void proc_entry_free(struct pid *);