diff options
Diffstat (limited to 'usr/src/uts/common/rpc')
| -rw-r--r-- | usr/src/uts/common/rpc/rpc_subr.c | 10 | ||||
| -rw-r--r-- | usr/src/uts/common/rpc/sec/key_call.c | 26 |
2 files changed, 14 insertions, 22 deletions
diff --git a/usr/src/uts/common/rpc/rpc_subr.c b/usr/src/uts/common/rpc/rpc_subr.c index d53a4eeb4a..ceb153cf84 100644 --- a/usr/src/uts/common/rpc/rpc_subr.c +++ b/usr/src/uts/common/rpc/rpc_subr.c @@ -19,6 +19,11 @@ * * CDDL HEADER END */ + +/* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + */ + /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -27,9 +32,6 @@ * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright 2012 Nexenta Systems, Inc. All rights reserved. - */ /* SVr4.0 1.1 */ @@ -496,7 +498,7 @@ out: /* * Try to get the address for the desired service by using the rpcbind * protocol. Ignores signals. If addr is a loopback address, it is - * expected to be initialized to "<hostname>.". + * expected to be initialized to "localhost.". * rpcbind_getaddr() is able to work with RPCBIND protocol version 3 and 4 * and PORTMAP protocol version 2. * It tries version 4 at first, then version 3 and finally (if both failed) diff --git a/usr/src/uts/common/rpc/sec/key_call.c b/usr/src/uts/common/rpc/sec/key_call.c index 382924bffe..1903a42fb3 100644 --- a/usr/src/uts/common/rpc/sec/key_call.c +++ b/usr/src/uts/common/rpc/sec/key_call.c @@ -18,6 +18,11 @@ * * CDDL HEADER END */ + +/* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + */ + /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -31,8 +36,6 @@ * under license from the Regents of the University of California. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * key_call.c, Interface to keyserver * key_encryptsession(agent, deskey, cr)-encrypt a session key to talk to agent @@ -53,7 +56,6 @@ #include <sys/vnode.h> #include <sys/uio.h> #include <sys/debug.h> -#include <sys/utsname.h> #include <sys/cmn_err.h> #include <rpc/rpc.h> @@ -64,7 +66,6 @@ struct auth_globals { struct knetconfig auth_config; - char auth_keyname[SYS_NMLN+16]; }; static struct timeval keytrytimeout = { KEY_TIMEOUT, 0 }; @@ -236,26 +237,15 @@ key_call(rpcproc_t procn, xdrproc_t xdr_args, caddr_t args, vnode_t *vp; int error; struct auth_globals *authg; - char *keyname; struct knetconfig *configp; k_sigset_t smask; authg = zone_getspecific(auth_zone_key, curproc->p_zone); - keyname = authg->auth_keyname; configp = &authg->auth_config; - /* - * Using a global here is obviously busted and fraught with danger. - */ - (void) strcpy(keyname, uts_nodename()); - netaddr.len = strlen(keyname); - (void) strcpy(&keyname[netaddr.len], ".keyserv"); - - netaddr.buf = keyname; - /* - * 8 = strlen(".keyserv"); - */ - netaddr.len = netaddr.maxlen = netaddr.len + 8; + /* strlen("localhost.keyserv") is 17 */ + netaddr.len = netaddr.maxlen = 17; + netaddr.buf = "localhost.keyserv"; /* * filch a knetconfig structure. |
