changeset 13095:913f12685ef2

6961577 [N2L] Key generated only for official hostname in ipnodes.byname map by 'ypserv -r'
author Ben Chang <Benjamin.Chang@Oracle.COM>
date Wed, 11 Aug 2010 22:02:28 -0700
parents 81ec56bf6147
children 33ad53eb7c84
files usr/src/cmd/ypcmd/yp2lscripts/inityp2l.sh
diffstat 1 files changed, 47 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/ypcmd/yp2lscripts/inityp2l.sh	Wed Aug 11 16:48:54 2010 -0700
+++ b/usr/src/cmd/ypcmd/yp2lscripts/inityp2l.sh	Wed Aug 11 22:02:28 2010 -0700
@@ -20,8 +20,9 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
 #
 # inityp2l -- Utility to generate YP (NIS) to LDAP
 #             configuration file (/etc/default/ypserv)
@@ -1518,7 +1519,7 @@
 put_config_file_copyright_info()
 {
 
-# Start with an emptty file, so don't append, but overwrite here.
+# Start with an empty file, so don't append, but overwrite here.
 # Just change the name, but keep the same date and version number
 # as in the ident string of this script.
 
@@ -1527,8 +1528,27 @@
 
 echo "\
 #
-# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 #\
 " >> $MAP_FILE
 }
@@ -2285,8 +2305,27 @@
 
 echo "\
 #
-# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 #-------------------------------------------------------------------
 #\
@@ -5168,7 +5207,7 @@
 nisLDAPfieldFromAttribute ipnodes.byaddr: \
                         rf_ipkey=ipHostNumber
 nisLDAPfieldFromAttribute ipnodes.byname: \
-			("cn=%s+ipHostNumber=*", rf_key)=dn
+			(rf_key)=(cn)
 nisLDAPfieldFromAttribute ipnodes: \
 			("cn=%s+ipHostNumber=*", canonicalName)=dn, \
                         addr=ipHostNumber, \