summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c43
-rw-r--r--usr/src/cmd/fs.d/nfs/lib/nfs_tbind.h11
-rw-r--r--usr/src/cmd/fs.d/nfs/nfs4cbd/nfs4cbd.c7
-rw-r--r--usr/src/cmd/fs.d/nfs/nfsd/nfsd.c11
-rw-r--r--usr/src/cmd/fs.d/nfs/statd/sm_svc.c18
-rw-r--r--usr/src/lib/libnsl/common/mapfile-vers3
-rw-r--r--usr/src/lib/libnsl/rpc/pmap_clnt.c184
-rw-r--r--usr/src/lib/libnsl/rpc/svc.c23
-rw-r--r--usr/src/lib/libnsl/rpc/svc_generic.c47
-rw-r--r--usr/src/lib/libnsl/rpc/svc_simple.c26
-rw-r--r--usr/src/uts/common/os/pid.c15
-rw-r--r--usr/src/uts/common/sys/proc.h4
12 files changed, 35 insertions, 357 deletions
diff --git a/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c b/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c
index 84d7ece0e2..338cfa1efa 100644
--- a/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c
+++ b/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c
@@ -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 setopt(int fd, int level, int name, int value);
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 @@ nfslib_log_tli_error(char *tli_name, int fd, struct netconfig *nconf)
*/
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 @@ do_one(char *provider, NETSELDECL(proto), struct protob *protobp0,
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 @@ do_one(char *provider, NETSELDECL(proto), struct protob *protobp0,
*/
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 @@ do_all(struct protob *protobp,
(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);
diff --git a/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.h b/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.h
index 96eac79f0e..6f5da2d5b3 100644
--- a/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.h
+++ b/usr/src/cmd/fs.d/nfs/lib/nfs_tbind.h
@@ -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 @@ extern int nfslib_bindit(struct netconfig *, struct netbuf **,
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
diff --git a/usr/src/cmd/fs.d/nfs/nfs4cbd/nfs4cbd.c b/usr/src/cmd/fs.d/nfs/nfs4cbd/nfs4cbd.c
index c99453f6dd..0825a3c465 100644
--- a/usr/src/cmd/fs.d/nfs/nfs4cbd/nfs4cbd.c
+++ b/usr/src/cmd/fs.d/nfs/nfs4cbd/nfs4cbd.c
@@ -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 @@ main(int argc, char *argv[])
protobp->program = NFS4_CALLBACK;
protobp->next = NULL;
- if (do_all(protobp, NULL, 0) == -1) {
+ if (do_all(protobp, NULL) == -1) {
exit(1);
}
diff --git a/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c b/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c
index e786d5d868..56b0eaf70a 100644
--- a/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c
+++ b/usr/src/cmd/fs.d/nfs/nfsd/nfsd.c
@@ -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 @@ main(int ac, char *av[])
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 @@ main(int ac, char *av[])
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 @@ main(int ac, char *av[])
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:
diff --git a/usr/src/cmd/fs.d/nfs/statd/sm_svc.c b/usr/src/cmd/fs.d/nfs/statd/sm_svc.c
index 4905c33e52..b2d8a8171c 100644
--- a/usr/src/cmd/fs.d/nfs/statd/sm_svc.c
+++ b/usr/src/cmd/fs.d/nfs/statd/sm_svc.c
@@ -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 @@ main(int argc, char *argv[])
int mode;
int sz;
int connmaxrec = RPC_MAXDATASIZE;
- int use_pmap = 0;
addrix = 0;
pathix = 0;
@@ -449,7 +444,7 @@ main(int argc, char *argv[])
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 @@ main(int argc, char *argv[])
(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 @@ main(int argc, char *argv[])
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.");
diff --git a/usr/src/lib/libnsl/common/mapfile-vers b/usr/src/lib/libnsl/common/mapfile-vers
index 762f155bf5..528c9df4aa 100644
--- a/usr/src/lib/libnsl/common/mapfile-vers
+++ b/usr/src/lib/libnsl/common/mapfile-vers
@@ -295,9 +295,6 @@ SUNW_0.7 { # SunOS 5.3 (Solaris 2.3)
SUNWprivate_1.5 {
global:
clnt_create_service_timed;
- __pmap_set;
- __pmap_unset;
- __use_portmapper;
} SUNWprivate_1.4;
SUNWprivate_1.4 {
diff --git a/usr/src/lib/libnsl/rpc/pmap_clnt.c b/usr/src/lib/libnsl/rpc/pmap_clnt.c
index 98c6e431e6..72f316cc8c 100644
--- a/usr/src/lib/libnsl/rpc/pmap_clnt.c
+++ b/usr/src/lib/libnsl/rpc/pmap_clnt.c
@@ -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 tottimeout = { 60, 0 };
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 @@ pmap_set(rpcprog_t program, rpcvers_t version, rpcprot_t protocol,
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 @@ pmap_unset(rpcprog_t program, rpcvers_t version)
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);
diff --git a/usr/src/lib/libnsl/rpc/svc.c b/usr/src/lib/libnsl/rpc/svc.c
index d188d5d713..b9601f59b8 100644
--- a/usr/src/lib/libnsl/rpc/svc.c
+++ b/usr/src/lib/libnsl/rpc/svc.c
@@ -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 @@ svc_reg(const SVCXPRT *xprt, const rpcprog_t prog, const rpcvers_t vers,
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 @@ svc_unreg(const rpcprog_t prog, const rpcvers_t vers)
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) {
diff --git a/usr/src/lib/libnsl/rpc/svc_generic.c b/usr/src/lib/libnsl/rpc/svc_generic.c
index 23cd8910ae..a62cad1a5c 100644
--- a/usr/src/lib/libnsl/rpc/svc_generic.c
+++ b/usr/src/lib/libnsl/rpc/svc_generic.c
@@ -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 void __svc_free_xlist(SVCXPRT_LIST **, mutex_t *);
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 @@ svc_create(void (*dispatch)(), const rpcprog_t prognum, const rpcvers_t versnum,
(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 @@ svc_tp_create(void (*dispatch)(), const rpcprog_t prognum,
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",
diff --git a/usr/src/lib/libnsl/rpc/svc_simple.c b/usr/src/lib/libnsl/rpc/svc_simple.c
index cf56a14a23..45b0447708 100644
--- a/usr/src/lib/libnsl/rpc/svc_simple.c
+++ b/usr/src/lib/libnsl/rpc/svc_simple.c
@@ -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 @@ rpc_reg(const rpcprog_t prognum, const rpcvers_t versnum,
(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;
diff --git a/usr/src/uts/common/os/pid.c b/usr/src/uts/common/os/pid.c
index d71e943b93..848c87efde 100644
--- a/usr/src/uts/common/os/pid.c
+++ b/usr/src/uts/common/os/pid.c
@@ -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 @@ pid_lookup(pid_t pid)
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)
{
diff --git a/usr/src/uts/common/sys/proc.h b/usr/src/uts/common/sys/proc.h
index 9edf599552..a919b4d77f 100644
--- a/usr/src/uts/common/sys/proc.h
+++ b/usr/src/uts/common/sys/proc.h
@@ -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 sigdefault(proc_t *);
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 *);