# HG changeset patch # User devjani.ray@oracle.com # Date 1328199901 18000 # Node ID a7deccd6492ff98d03e8e7d2ffa97d22397adda9 # Parent a33daeba9b4c58903f8ce4e9705b8947cece7c06 CR 7121230 Rad unix transport paths should be created under /system/volatile/rad/ diff -r a33daeba9b4c -r a7deccd6492f usr/src/cmd/rad/daemon/rad-test.xml --- a/usr/src/cmd/rad/daemon/rad-test.xml Wed Feb 01 09:22:41 2012 -0500 +++ b/usr/src/cmd/rad/daemon/rad-test.xml Thu Feb 02 11:25:01 2012 -0500 @@ -1,7 +1,7 @@ @@ -496,7 +496,7 @@ - /var/run/radsocket + /system/volatile/rad/radsocket The AF_UNIX socket where the local rad instance (svc:/system/rad:local) accepts connections @@ -506,7 +506,7 @@ - /var/run/radsocket-unauth + /system/volatile/rad/radsocket-unauth The AF_UNIX socket where the local rad instance (svc:/system/rad:local) accepts connections @@ -601,10 +601,10 @@ Two instances of rad are delivered by the system. svc:/system/rad:local listens to AF_UNIX - connections at the paths /var/run/radsocket and - /var/run/radsocket-unauth, and is enabled by default. The - former AF_UNIX socket will automatically authenticate the - connecting process using + connections at the paths /system/volatile/rad/radsocket and + /system/volatile/rad/radsocket-unauth, and is enabled by + default. The former AF_UNIX socket will automatically + authenticate the connecting process using getpeerucred 3C , while the latter requires the connecting process to explicitly diff -r a33daeba9b4c -r a7deccd6492f usr/src/java/vpanels/client/org/opensolaris/os/vp/client/common/RadLoginManager.java --- a/usr/src/java/vpanels/client/org/opensolaris/os/vp/client/common/RadLoginManager.java Wed Feb 01 09:22:41 2012 -0500 +++ b/usr/src/java/vpanels/client/org/opensolaris/os/vp/client/common/RadLoginManager.java Thu Feb 02 11:25:01 2012 -0500 @@ -20,7 +20,7 @@ */ /* - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. */ package org.opensolaris.os.vp.client.common; @@ -49,6 +49,11 @@ import org.opensolaris.os.vp.util.misc.finder.Finder; public abstract class RadLoginManager { + public static final String RAD_PATH_AFUNIX_AUTH = + "/system/volatile/rad/radsocket"; + public static final String RAD_PATH_AFUNIX_UNAUTH = + "/system/volatile/rad/radsocket-unauth"; + // // Inner classes // @@ -783,8 +788,8 @@ if (NetUtil.isLocalAddress(host)) { String[] paths = { - "/var/run/radsocket", - "/var/run/radsocket-unauth" + RAD_PATH_AFUNIX_AUTH, + RAD_PATH_AFUNIX_UNAUTH }; for (String path : paths) { diff -r a33daeba9b4c -r a7deccd6492f usr/src/lib/pyrad/util.py --- a/usr/src/lib/pyrad/util.py Wed Feb 01 09:22:41 2012 -0500 +++ b/usr/src/lib/pyrad/util.py Thu Feb 02 11:25:01 2012 -0500 @@ -20,7 +20,7 @@ # # -# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. # import socket @@ -32,6 +32,11 @@ import rad.adaptor as adapt # +# Default path for authenticated AF_UNIX socket +# +_RAD_PATH_AFUNIX_AUTH = "/system/volatile/rad/radsocket" + +# # Make pipes quack enough like a socket to satisfy RecordMarkingSocket # class SocketLike(object): @@ -114,7 +119,7 @@ # # Connect to the local rad daemon via the standard unix domain socket # -def connect_local(path = "/var/run/radsocket", locale = None): +def connect_local(path = _RAD_PATH_AFUNIX_AUTH, locale = None): s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM); s.connect(path) return rad.RadConnection(s, locale = locale) diff -r a33daeba9b4c -r a7deccd6492f usr/src/test/java/src/client/PAMTestBase.java --- a/usr/src/test/java/src/client/PAMTestBase.java Wed Feb 01 09:22:41 2012 -0500 +++ b/usr/src/test/java/src/client/PAMTestBase.java Thu Feb 02 11:25:01 2012 -0500 @@ -20,7 +20,7 @@ */ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. */ package client; @@ -52,8 +52,10 @@ public abstract class PAMTestBase extends MBeanTestCommon { public static final String RADTEST_SVC = "svc:/system/rad:test"; public static final String RADCONVTEST_SVC = "svc:/system/rad-conv-test"; - public static final String PATH_AUTH = "/var/run/test-radsocket"; - public static final String PATH_UNAUTH = "/var/run/test-radsocket-unauth"; + public static final String RAD_PATH_AFUNIX_AUTH = + "/system/volatile/rad/test-radsocket"; + public static final String RAD_PATH_AFUNIX_UNAUTH = + "/system/volatile/rad/test-radsocket-unauth"; private JMXConnector conn_; protected AuthenticatorMXBean bean_; @@ -98,7 +100,7 @@ protected boolean isRadReady(boolean auth) throws Exception { checkRequiredServices(); - String path = auth ? PATH_AUTH : PATH_UNAUTH; + String path = auth ? RAD_PATH_AFUNIX_AUTH : RAD_PATH_AFUNIX_UNAUTH; final String url = "service:jmx:radunix://" + path; final String name = "org.opensolaris.os.rad:type=authentication";