PERFORCE change 104430 for review

Michael Bushkov bushman at FreeBSD.org
Thu Aug 17 19:44:13 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=104430

Change 104430 by bushman at bushman_nss_ldap_cached on 2006/08/17 19:43:19

	IFC. Kerberos added to make it able to use OpenLDAP from source tree.

Affected files ...

.. //depot/projects/soc2006/nss_ldap_cached/src/etc/defaults/rc.conf#5 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/etc/network.subr#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/etc/pccard_ether#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/dhclient#3 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.subr#4 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/etc/sendmail/freebsd.mc#3 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/etc/sendmail/freebsd.submit.mc#3 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/Makefile.inc#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/README#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/doc/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/include/config.h#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/include/crypto-headers.h#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/include/krb5-types.h#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/include/version.h#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/Makefile.inc#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libasn1/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libgssapi/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libhdb/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libkadm5clnt/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libkadm5srv/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libkafs5/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libkrb5/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libroken/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libsl/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/lib/libvers/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/libexec/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/libexec/Makefile.inc#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/libexec/hprop/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/libexec/hpropd/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/libexec/ipropd-master/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/libexec/ipropd-slave/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/libexec/kadmind/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/libexec/kdc/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/libexec/kpasswdd/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/tools/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/tools/Makefile.inc#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/tools/asn1_compile/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/tools/make-print-version/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/tools/make-roken/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/Makefile.inc#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/kadmin/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/kdestroy/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/kinit/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/klist/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/kpasswd/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/krb5-config/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/ksu/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.bin/verify_krb5_conf/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.sbin/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.sbin/Makefile.inc#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.sbin/kstash/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/kerberos5/usr.sbin/ktutil/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/arp/arp.8#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/newsyslog/newsyslog.c#4 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rpc.lockd/kern.c#3 integrate

Differences ...

==== //depot/projects/soc2006/nss_ldap_cached/src/etc/defaults/rc.conf#5 (text+ko) ====

@@ -15,7 +15,7 @@
 # For a more detailed explanation of all the rc.conf variables, please
 # refer to the rc.conf(5) manual page.
 #
-# $FreeBSD: src/etc/defaults/rc.conf,v 1.292 2006/08/16 17:14:52 brooks Exp $
+# $FreeBSD: src/etc/defaults/rc.conf,v 1.293 2006/08/17 17:12:26 brian Exp $
 
 ##############################################################
 ###  Important initial Boot-time options  ####################
@@ -94,6 +94,7 @@
 nisdomainname="NO"		# Set to NIS domain if using NIS (or NO).
 dhclient_program="/sbin/dhclient"	# Path to dhcp client program.
 dhclient_flags=""		# Additional flags to pass to dhcp client.
+dhclient_flags_fxp0=""		# Additional dhclient flags for fxp0 only
 background_dhclient="NO"	# Start dhcp client in the background.
 synchronous_dhclient="YES"	# Start dhclient directly on configured
 				# interfaces during startup.

==== //depot/projects/soc2006/nss_ldap_cached/src/etc/network.subr#2 (text+ko) ====

@@ -22,7 +22,7 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/network.subr,v 1.171 2006/04/13 18:34:13 brooks Exp $
+# $FreeBSD: src/etc/network.subr,v 1.172 2006/08/17 03:03:38 brooks Exp $
 #
 
 #
@@ -70,35 +70,14 @@
 }
 
 # ifconfig_down if
-#	Remove all inet entries from the $if interface. It returns
-#	0 if inet entries were found and removed. It returns 1 if
-#	no entries were found or they could not be removed.
-#
-#	XXX: should not be only inet
+#	returns 1 if wpa_supplicant or dhclient was stopped or
+#	the interface exists.
 #
 ifconfig_down()
 {
 	[ -z "$1" ] && return 1
-	_ifs="^"
 	_cfg=1
 
-	inetList="`ifconfig $1 | grep 'inet ' | tr "\n" "$_ifs"`"
-
-	oldifs="$IFS"
-	IFS="$_ifs"
-	for _inet in $inetList ; do
-		# get rid of extraneous line
-		[ -z "$_inet" ] && break
-
-		_inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'`
-
-		IFS="$oldifs"
-		ifconfig $1 ${_inet} delete
-		IFS="$_ifs"
-		_cfg=0
-	done
-	IFS="$oldifs"
-
 	if wpaif $1; then
 		/etc/rc.d/wpa_supplicant stop $1
 		_cfg=0
@@ -109,7 +88,10 @@
 		_cfg=0
 	fi
 
-	ifconfig $1 down
+	if ifexists $1; then
+		ifconfig $1 down
+		_cfg=0
+	fi
 
 	return $_cfg
 }
@@ -255,6 +237,13 @@
 	return 1
 }
 
+# ifexists if
+#	Returns 0 if the interface exists and 1 otherwise.
+ifexists()
+{
+	ifconfig $1 > /dev/null 2>&1
+}
+
 # ipv4_up if
 #  add IPv4 addresses to the interface $if 
 ipv4_up()
@@ -269,8 +258,32 @@
 ipv4_down()
 {
 	_if=$1
-	ifalias_down ${_if}
-	ipv4_addrs_common ${_if} -alias
+	_ifs="^"
+	_ret=1
+
+	ifexists ${_if} || return 1
+
+	inetList="`ifconfig ${_if} | grep 'inet ' | tr "\n" "$_ifs"`"
+
+	oldifs="$IFS"
+	IFS="$_ifs"
+	for _inet in $inetList ; do
+		# get rid of extraneous line
+		[ -z "$_inet" ] && break
+
+		_inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'`
+
+		IFS="$oldifs"
+		ifconfig ${_if} ${_inet} delete
+		IFS="$_ifs"
+		_ret=0
+	done
+	IFS="$oldifs"
+
+	ifalias_down ${_if} && _ret=0
+	ipv4_addrs_common ${_if} -alias && _ret=0
+
+	return $_ret
 }
 
 # ipv4_addrs_common if action
@@ -466,6 +479,8 @@
 	_ifs="^"
 	_ret=1
 
+	ifexists $1 || return 1
+
 	ipxList="`ifconfig $1 | grep 'ipx ' | tr "\n" "$_ifs"`"
 
 	oldifs="$IFS"

==== //depot/projects/soc2006/nss_ldap_cached/src/etc/pccard_ether#2 (text+ko) ====

@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-# $FreeBSD: src/etc/pccard_ether,v 1.48 2005/10/03 18:20:44 brooks Exp $
+# $FreeBSD: src/etc/pccard_ether,v 1.49 2006/08/17 03:03:38 brooks Exp $
 #
 # pccard_ether interfacename [start|stop|restart]
 #
@@ -101,7 +101,7 @@
 	/etc/rc.d/netif stop $ifn
 
 	# clean ARP table
-	arp -d -a
+	ifexists $ifn && arp -d -i $ifn -a
 
 	# Clean the routing table
 	if checkyesno removable_route_flush; then

==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/dhclient#3 (text+ko) ====

@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $
-# $FreeBSD: src/etc/rc.d/dhclient,v 1.22 2006/07/09 06:54:24 stefanf Exp $
+# $FreeBSD: src/etc/rc.d/dhclient,v 1.23 2006/08/17 17:12:26 brian Exp $
 #
 
 # PROVIDE: dhclient
@@ -27,7 +27,18 @@
 		fi
 	fi
 
-	if checkyesno background_dhclient; then
+	# Override for $ifn specific flags (see rc.subr for $flags setting)
+	eval specific=\$dhclient_flags_$ifn
+	if [ -z "$flags" -a -n "$specific" ]; then
+		rc_flags=$specific
+	fi
+
+	eval specific=\$background_dhclient_$ifn
+	if [ -n "$specific ]; then
+		if checkyesno background_dhclient_$ifn; then
+			rc_flags="${rc_flags} -b"
+		fi
+	elif checkyesno background_dhclient; then
 		rc_flags="${rc_flags} -b"
 	fi
 

==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.subr#4 (text+ko) ====

@@ -1,5 +1,5 @@
 # $NetBSD: rc.subr,v 1.66 2006/04/01 10:05:50 he Exp $
-# $FreeBSD: src/etc/rc.subr,v 1.64 2006/07/26 08:03:24 yar Exp $
+# $FreeBSD: src/etc/rc.subr,v 1.65 2006/08/17 08:04:20 yar Exp $
 #
 # Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -666,12 +666,17 @@
 $_chroot $command $rc_flags $command_args"
 			else
 				_doit="\
-${_chdir:+cd $_chdir; }\
-${_nice:+nice -n $_nice }\
+${_chdir:+cd $_chdir && }\
 $command $rc_flags $command_args"
 				if [ -n "$_user" ]; then
 				    _doit="su -m $_user -c 'sh -c \"$_doit\"'"
 				fi
+				if [ -n "$_nice" ]; then
+					if [ -z "$_user" ]; then
+						_doit="sh -c \"$_doit\""
+					fi	
+					_doit="nice -n $_nice $_doit"
+				fi
 			fi
 
 					# run the full command;

==== //depot/projects/soc2006/nss_ldap_cached/src/etc/sendmail/freebsd.mc#3 (text+ko) ====

@@ -44,7 +44,7 @@
 #
 
 divert(0)
-VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.32 2006/06/14 23:03:41 gshapiro Exp $')
+VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.33 2006/08/17 05:12:07 gshapiro Exp $')
 OSTYPE(freebsd6)
 DOMAIN(generic)
 

==== //depot/projects/soc2006/nss_ldap_cached/src/etc/sendmail/freebsd.submit.mc#3 (text+ko) ====

@@ -16,7 +16,7 @@
 #
 
 divert(0)dnl
-VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.submit.mc,v 1.3 2006/06/14 23:03:41 gshapiro Exp $')
+VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.submit.mc,v 1.4 2006/08/17 05:12:07 gshapiro Exp $')
 define(`confCF_VERSION', `Submit')dnl
 define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
 define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet

==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/arp/arp.8#2 (text+ko) ====

@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)arp.8	8.1 (Berkeley) 6/6/93
-.\" $FreeBSD: src/usr.sbin/arp/arp.8,v 1.24 2006/01/10 05:17:16 brooks Exp $
+.\" $FreeBSD: src/usr.sbin/arp/arp.8,v 1.25 2006/08/17 07:14:01 yar Exp $
 .\"
-.Dd June 6, 1993
+.Dd August 17, 2006
 .Dt ARP 8
 .Os
 .Sh NAME
@@ -103,7 +103,8 @@
 .Tn ARP
 entries on
 .Ar interface .
-Applicable to the display operations only.
+Applicable only to the following operations:
+display one, display all, delete all.
 .It Fl n
 Show network addresses as numbers (normally
 .Nm

==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/newsyslog/newsyslog.c#4 (text+ko) ====

@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.sbin/newsyslog/newsyslog.c,v 1.106 2006/07/21 22:13:06 sobomax Exp $");
+__FBSDID("$FreeBSD: src/usr.sbin/newsyslog/newsyslog.c,v 1.107 2006/08/17 18:15:43 delphij Exp $");
 
 #define	OSF
 #ifndef COMPRESS_POSTFIX
@@ -890,7 +890,8 @@
 static void
 expand_globs(struct conf_entry **work_p, struct conf_entry **glob_p)
 {
-	int gmatch, gres, i;
+	int gmatch, gres;
+	size_t i;
 	char *mfname;
 	struct conf_entry *dupent, *ent, *firstmatch, *globent;
 	struct conf_entry *lastmatch;

==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rpc.lockd/kern.c#3 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.sbin/rpc.lockd/kern.c,v 1.20 2006/08/16 18:33:35 thomas Exp $");
+__FBSDID("$FreeBSD: src/usr.sbin/rpc.lockd/kern.c,v 1.21 2006/08/17 05:55:20 maxim Exp $");
 
 #include <sys/param.h>
 #include <sys/mount.h>
@@ -147,10 +147,10 @@
 	case -1:
 		err(1, "fork");
 	case 0:
-		setproctitle ("client");
+		setproctitle("client");
 		break;
 	default:
-		setproctitle ("server");
+		setproctitle("server");
 		return (child);
 	}
 


More information about the p4-projects mailing list