diff options
author | nn35248 <none@none> | 2006-09-11 22:51:59 -0700 |
---|---|---|
committer | nn35248 <none@none> | 2006-09-11 22:51:59 -0700 |
commit | 9acbbeaf2a1ffe5c14b244867d427714fab43c5c (patch) | |
tree | d1ecd54896325c19a463220e9cbc50864874fc82 /usr/src/lib/libnsl/rpc/svc_generic.c | |
parent | da51466dc253d7c98dda4956059042bd0c476328 (diff) | |
download | illumos-joyent-9acbbeaf2a1ffe5c14b244867d427714fab43c5c.tar.gz |
PSARC/2005/471 BrandZ: Support for non-native zones
6374606 ::nm -D without an object may not work on processes in zones
6409350 BrandZ project integration into Solaris
6455289 pthread_setschedparam() should return EPERM rather than panic libc
6455591 setpriority(3C) gets errno wrong for deficient privileges failure
6458178 fifofs doesn't support lofs mounts of fifos
6460380 Attempted open() of a symlink with the O_NOFOLLOW flag set returns EINVAL, not ELOOP
6463857 renice(1) errors erroneously
--HG--
rename : usr/src/lib/libzonecfg/zones/SUNWblank.xml => usr/src/lib/brand/native/zone/SUNWblank.xml
rename : usr/src/lib/libzonecfg/zones/SUNWdefault.xml => usr/src/lib/brand/native/zone/SUNWdefault.xml
Diffstat (limited to 'usr/src/lib/libnsl/rpc/svc_generic.c')
-rw-r--r-- | usr/src/lib/libnsl/rpc/svc_generic.c | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/usr/src/lib/libnsl/rpc/svc_generic.c b/usr/src/lib/libnsl/rpc/svc_generic.c index 553a6390b6..23cd8910ae 100644 --- a/usr/src/lib/libnsl/rpc/svc_generic.c +++ b/usr/src/lib/libnsl/rpc/svc_generic.c @@ -71,6 +71,8 @@ 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 @@ -139,8 +141,25 @@ 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) { - /* Found an old one, use it */ - (void) rpcb_unset(prognum, versnum, nconf); + /* + * 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); if (svc_reg(l->xprt, prognum, versnum, dispatch, nconf) == FALSE) (void) syslog(LOG_ERR, @@ -199,7 +218,25 @@ svc_tp_create(void (*dispatch)(), const rpcprog_t prognum, xprt = svc_tli_create_common(RPC_ANYFD, nconf, NULL, 0, 0, anon_mlp); if (xprt == NULL) return (NULL); - (void) rpcb_unset(prognum, versnum, (struct netconfig *)nconf); + + /* + * 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); 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", |