PERFORCE change 29627 for review
Peter Wemm
peter at FreeBSD.org
Thu Apr 24 13:52:03 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=29627
Change 29627 by peter at peter_daintree on 2003/04/24 13:51:26
IFC @29625
Affected files ...
.. //depot/projects/hammer/etc/pam.d/passwd#3 integrate
.. //depot/projects/hammer/etc/rc.d/Makefile#7 integrate
.. //depot/projects/hammer/etc/rc.d/early.sh#1 branch
.. //depot/projects/hammer/etc/rc.d/hostname#2 integrate
.. //depot/projects/hammer/etc/rc.d/ipfilter#7 integrate
.. //depot/projects/hammer/etc/rc.d/ipfs#2 integrate
.. //depot/projects/hammer/etc/rc.d/ipmon#4 integrate
.. //depot/projects/hammer/etc/rc.d/ipnat#5 integrate
.. //depot/projects/hammer/etc/rc.d/securelevel#3 integrate
.. //depot/projects/hammer/etc/rc.d/sysctl#4 integrate
.. //depot/projects/hammer/lib/libc/gen/getusershell.c#3 integrate
.. //depot/projects/hammer/lib/libc/net/getaddrinfo.c#7 integrate
.. //depot/projects/hammer/lib/libc/net/gethostnamadr.c#2 integrate
.. //depot/projects/hammer/lib/libc/net/getnetnamadr.c#2 integrate
.. //depot/projects/hammer/lib/libc/net/name6.c#6 integrate
.. //depot/projects/hammer/lib/libc/net/nsdispatch.c#4 integrate
.. //depot/projects/hammer/lib/libpam/modules/pam_unix/pam_unix.c#2 integrate
.. //depot/projects/hammer/share/man/man4/acpi.4#4 integrate
.. //depot/projects/hammer/sys/dev/firewire/firewire.c#7 integrate
.. //depot/projects/hammer/sys/dev/firewire/fwohci.c#6 integrate
.. //depot/projects/hammer/sys/dev/firewire/fwohci_pci.c#7 integrate
.. //depot/projects/hammer/sys/dev/firewire/fwohcireg.h#4 integrate
.. //depot/projects/hammer/sys/dev/firewire/sbp.c#7 integrate
.. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_vfsops.c#7 integrate
.. //depot/projects/hammer/sys/i386/i386/trap.c#11 integrate
.. //depot/projects/hammer/sys/kern/kern_mac.c#14 integrate
.. //depot/projects/hammer/sys/kern/kern_proc.c#12 integrate
.. //depot/projects/hammer/sys/kern/vfs_mount.c#10 integrate
.. //depot/projects/hammer/sys/kern/vfs_subr.c#11 integrate
.. //depot/projects/hammer/sys/kern/vfs_syscalls.c#10 integrate
.. //depot/projects/hammer/sys/nfsclient/nfs_vfsops.c#9 integrate
.. //depot/projects/hammer/sys/nfsclient/nfs_vnops.c#8 integrate
.. //depot/projects/hammer/sys/nfsserver/nfs_serv.c#7 integrate
.. //depot/projects/hammer/sys/sys/limits.h#2 integrate
.. //depot/projects/hammer/sys/sys/proc.h#17 integrate
.. //depot/projects/hammer/sys/vm/swap_pager.h#5 integrate
.. //depot/projects/hammer/sys/vm/vm_contig.c#5 integrate
.. //depot/projects/hammer/sys/vm/vm_map.c#9 integrate
.. //depot/projects/hammer/sys/vm/vm_object.c#11 integrate
.. //depot/projects/hammer/sys/vm/vm_pageout.c#13 integrate
.. //depot/projects/hammer/sys/vm/vm_pageout.h#3 integrate
.. //depot/projects/hammer/tools/regression/fsx/fsx.c#2 integrate
.. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.birthday#5 integrate
.. //depot/projects/hammer/usr.sbin/apm/apm.c#4 integrate
.. //depot/projects/hammer/usr.sbin/config/mkmakefile.c#4 integrate
.. //depot/projects/hammer/usr.sbin/newsyslog/newsyslog.8#5 integrate
.. //depot/projects/hammer/usr.sbin/pccard/pccardd/cardd.c#3 integrate
.. //depot/projects/hammer/usr.sbin/pccard/pccardd/cardd.h#2 integrate
.. //depot/projects/hammer/usr.sbin/rpc.lockd/lockd.c#3 integrate
Differences ...
==== //depot/projects/hammer/etc/pam.d/passwd#3 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/etc/pam.d/passwd,v 1.2 2003/02/10 00:50:03 des Exp $
+# $FreeBSD: src/etc/pam.d/passwd,v 1.3 2003/04/24 12:22:42 des Exp $
#
# PAM configuration for the "passwd" service
#
@@ -8,4 +8,4 @@
# password
#password requisite pam_passwdqc.so enforce=users
-password required pam_unix.so no_warn try_first_pass
+password required pam_unix.so no_warn try_first_pass nullok
==== //depot/projects/hammer/etc/rc.d/Makefile#7 (text+ko) ====
@@ -1,14 +1,14 @@
# $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $
-# $FreeBSD: src/etc/rc.d/Makefile,v 1.14 2003/04/19 01:56:44 mtm Exp $
+# $FreeBSD: src/etc/rc.d/Makefile,v 1.15 2003/04/24 08:20:47 mtm Exp $
.include <bsd.own.mk>
FILES= DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz amd \
apm apmd atm1 atm2.sh atm3.sh archdep bgfsck bootparams ccd cleanvar \
cleartmp cron devd devdb devfs dhclient diskless dmesg dumpon fsck \
- hostname inetd initdiskless initrandom ip6fw ipfilter ipfw ipmon ipnat \
- ipsec ipxrouted isdnd jail kadmind kerberos keyserv kldxref ldconfig \
- local localdaemons lomac lpd motd mountcritlocal mountcritremote \
+ hostname inetd initdiskless initrandom ip6fw ipfilter ipfs ipfw ipmon \
+ ipnat ipsec ipxrouted isdnd jail kadmind kerberos keyserv kldxref \
+ ldconfig local localdaemons lomac lpd motd mountcritlocal mountcritremote \
mountd moused mroute6d mrouted msgs named netif network1 network2 network3 \
network_ipv6 nfsclient nfsd nfslocking nfsserver nisdomain ntpd \
ntpdate othermta pccard pcvt ppp-user pppoed pwcheck quota random \
==== //depot/projects/hammer/etc/rc.d/hostname#2 (text+ko) ====
@@ -23,11 +23,11 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD: src/etc/rc.d/hostname,v 1.1 2003/04/18 17:51:53 mtm Exp $
+# $FreeBSD: src/etc/rc.d/hostname,v 1.2 2003/04/24 08:20:47 mtm Exp $
#
# PROVIDE: hostname
-# REQUIRE: mountcritlocal sysctl tty
+# REQUIRE: mountcritlocal tty
# BEFORE: netif
# KEYWORD: FreeBSD
==== //depot/projects/hammer/etc/rc.d/ipfilter#7 (text+ko) ====
@@ -1,11 +1,12 @@
#!/bin/sh
#
# $NetBSD: ipfilter,v 1.10 2001/02/28 17:03:50 lukem Exp $
-# $FreeBSD: src/etc/rc.d/ipfilter,v 1.7 2003/03/22 14:53:23 ume Exp $
+# $FreeBSD: src/etc/rc.d/ipfilter,v 1.8 2003/04/24 08:20:47 mtm Exp $
#
# PROVIDE: ipfilter
-# REQUIRE: root beforenetlkm mountcritlocal tty
+# REQUIRE: root beforenetlkm mountcritlocal tty ipmon
+# BEFORE: netif
# KEYWORD: FreeBSD NetBSD
. /etc/rc.subr
@@ -43,8 +44,7 @@
if kldload ipl; then
echo 'IP-filter module loaded.'
else
- warn 'IP-filter module failed to load.'
- return 1
+ err 1 'IP-filter module failed to load.'
fi
fi
==== //depot/projects/hammer/etc/rc.d/ipfs#2 (text+ko) ====
@@ -1,23 +1,47 @@
#!/bin/sh
#
# $NetBSD: ipfs,v 1.3 2002/02/11 13:55:42 lukem Exp $
+# $FreeBSD: src/etc/rc.d/ipfs,v 1.2 2003/04/24 08:20:47 mtm Exp $
#
# PROVIDE: ipfs
-# REQUIRE: ipnat mountcritremote
-# KEYWORD: shutdown
+# REQUIRE: ipnat
+# BEFORE: netif
+# KEYWORD: FreeBSD NetBSD shutdown
. /etc/rc.subr
name="ipfs"
-rcvar=$name
+rcvar=`set_rcvar`
start_cmd="ipfs_start"
stop_cmd="ipfs_stop"
+case ${OSTYPE} in
+FreeBSD)
+ start_precmd="ipfs_prestart"
+ ;;
+NetBSD)
+ ipfs_program="/usr/sbin/ipfs"
+ ;;
+esac
+
+ipfs_prestart()
+{
+ # Do not continue if either ipnat or ipfilter is not enabled or
+ # if the ipfilter module is not loaded.
+ #
+ if ! checkyesno ipfilter_enable -o ! checkyesno ipnat_enable ; then
+ err 1 "${name} requires either ipfilter or ipnat enabled"
+ fi
+ if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then
+ err 1 "ipfilter module is not loaded"
+ fi
+ return 0
+}
ipfs_start()
{
if [ -r /var/db/ipf/ipstate.ipf -a -r /var/db/ipf/ipnat.ipf ]; then
- /usr/sbin/ipfs -R ${rc_flags}
+ ${ipfs_program} -R ${rc_flags}
rm -f /var/db/ipf/ipstate.ipf /var/db/ipf/ipnat.ipf
fi
}
@@ -29,7 +53,7 @@
chmod 700 /var/db/ipf
chown root:wheel /var/db/ipf
fi
- /usr/sbin/ipfs -W ${rc_flags}
+ ${ipfs_program} -W ${rc_flags}
}
load_rc_config $name
==== //depot/projects/hammer/etc/rc.d/ipmon#4 (text+ko) ====
@@ -1,11 +1,11 @@
#!/bin/sh
#
# $NetBSD: ipmon,v 2002/04/18 05:02:01 lukem Exp $
-# $FreeBSD: src/etc/rc.d/ipmon,v 1.4 2002/10/12 10:31:31 schweikh Exp $
+# $FreeBSD: src/etc/rc.d/ipmon,v 1.5 2003/04/24 08:20:47 mtm Exp $
#
# PROVIDE: ipmon
-# REQUIRE: syslogd
+# REQUIRE: mountcritlocal hostname sysctl
# BEFORE: SERVERS
# KEYWORD: FreeBSD NetBSD
@@ -26,9 +26,14 @@
ipmon_precmd()
{
- # Make sure ipfilter is loaded before continuing
+ # Continue only if ipfilter or ipnat is enabled and the
+ # ipfilter module is loaded.
+ #
+ if ! checkyesno ipfilter_enable -o ! checkyesno ipnat_enable ; then
+ err 1 "${name} requires either ipfilter or ipnat enabled"
+ fi
if ! sysctl net.inet.ipf.fr_pass >/dev/null 2>&1; then
- return 1
+ err 1 "ipfilter module is not loaded"
fi
return 0
}
==== //depot/projects/hammer/etc/rc.d/ipnat#5 (text+ko) ====
@@ -1,84 +1,65 @@
#!/bin/sh
#
# $NetBSD: ipnat,v 1.6 2000/09/19 13:04:38 lukem Exp $
-# $FreeBSD: src/etc/rc.d/ipnat,v 1.5 2002/10/26 00:18:06 fenner Exp $
+# $FreeBSD: src/etc/rc.d/ipnat,v 1.7 2003/04/24 18:14:52 mtm Exp $
#
# PROVIDE: ipnat
-# REQUIRE: ipfilter mountcritremote
-# BEFORE: DAEMON
+# REQUIRE: ipfilter
+# BEFORE: DAEMON netif
# KEYWORD: FreeBSD NetBSD
. /etc/rc.subr
name="ipnat"
rcvar=`set_rcvar`
+load_rc_config $name
case ${OSTYPE} in
-FreeBSD)
- IPNATDIR="/sbin"
- start_precmd="ipnat_precmd"
- reload_cmd="ipnat_start"
- ;;
NetBSD)
- IPNATDIR="/usr/sbin"
- config="/etc/ipnat.conf"
- reload_cmd="/usr/sbin/ipnat -F -C -f ${config}"
- start_precmd=
+ ipnat_flags=
+ ipnat_rules="/etc/ipnat.conf"
+ ipnat_program="/usr/sbin/ipnat"
;;
esac
+start_precmd="ipnat_precmd"
start_cmd="ipnat_start"
-stop_cmd="${ipnat_program:-${IPNATDIR}/${name}} -F -C"
+stop_cmd="${ipnat_program} -F -C"
+reload_cmd="${ipnat_program} -F -C -f ${ipnat_rules}"
extra_commands="reload"
ipnat_precmd()
{
+ case ${OSTYPE} in
+ NetBSD)
+ if ! checkyesno ipfilter || [ ! -f /etc/ipf.conf ]; then
+ echo "Enabling ipfilter for NAT."
+ /sbin/ipf -E -Fa
+ fi
+ return 0
+ ;;
+ esac
+
# Make sure ipfilter is loaded before continuing
if ! ${SYSCTL} net.inet.ipf.fr_pass >/dev/null 2>&1; then
- err 1 'ipnat requires ipfilter be loaded'
+ if kldload ipl; then
+ echo 'IP-filter module loaded.'
+ else
+ err 1 'IP-filter module failed to load.'
+ fi
fi
return 0
}
ipnat_start()
{
- case ${OSTYPE} in
- FreeBSD)
- echo -n 'Installing NAT rules ... '
- if [ -r "${ipnat_rules}" ]; then
- ${ipnat_program:-/sbin/ipnat} -CF -f \
- "${ipnat_rules}" ${ipnat_flags}
- else
- echo -n ' NO IPNAT RULES'
- fi
- echo '.'
-
- # restore filter/NAT state tables after loading the rules
- if checkyesno ipfs_enable; then
- if [ -r "/var/db/ipf/ipstate.ipf" ]; then
- echo -n ' ipfs'
- ${ipfs_program:-/sbin/ipfs} -R ${ipfs_flags}
- # remove files to avoid reloading old state
- # after an ungraceful shutdown
- rm -f /var/db/ipf/ipstate.ipf
- rm -f /var/db/ipf/ipnat.ipf
- fi
- fi
- ;;
- NetBSD)
- if [ ! -f ${config} ]; then
- return 0
- fi
- if ! checkyesno ipfilter || [ ! -f /etc/ipf.conf ]; then
- echo "Enabling ipfilter for NAT."
- /sbin/ipf -E -Fa
- fi
- echo -n "Installing NAT rules ... "
- /usr/sbin/ipnat -F -f ${config}
- ;;
- esac
+ if [ ! -f ${ipnat_rules} ]; then
+ echo -n ' NO IPNAT RULES'
+ return 0
+ fi
+ echo -n "Installing NAT rules ... "
+ ${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags}
}
-load_rc_config $name
run_rc_command "$1"
==== //depot/projects/hammer/etc/rc.d/securelevel#3 (text+ko) ====
@@ -1,7 +1,7 @@
#!/bin/sh
#
# $NetBSD: securelevel,v 1.4 2002/03/22 04:34:00 thorpej Exp $
-# $FreeBSD: src/etc/rc.d/securelevel,v 1.4 2002/09/06 16:18:05 gordon Exp $
+# $FreeBSD: src/etc/rc.d/securelevel,v 1.5 2003/04/24 08:27:29 mtm Exp $
#
# PROVIDE: securelevel
@@ -17,6 +17,10 @@
securelevel_start()
{
+ # Last chance to set sysctl variables that failed the first time.
+ #
+ /etc/rc.d/sysctl lastload
+
case ${OSTYPE} in
FreeBSD)
case ${kern_securelevel_enable} in
==== //depot/projects/hammer/etc/rc.d/sysctl#4 (text+ko) ====
@@ -1,11 +1,11 @@
#!/bin/sh
#
# $NetBSD: sysctl,v 1.12 2002/04/29 12:10:23 lukem Exp $
-# $FreeBSD: src/etc/rc.d/sysctl,v 1.11 2002/10/25 23:02:54 fenner Exp $
+# $FreeBSD: src/etc/rc.d/sysctl,v 1.12 2003/04/24 08:20:47 mtm Exp $
#
# PROVIDE: sysctl
-# REQUIRE: root ipfilter ipsec
+# REQUIRE: root
# BEFORE: DAEMON
# KEYWORD: FreeBSD NetBSD
==== //depot/projects/hammer/lib/libc/gen/getusershell.c#3 (text+ko) ====
@@ -36,8 +36,9 @@
#endif /* LIBC_SCCS and not lint */
/* $NetBSD: getusershell.c,v 1.17 1999/01/25 01:09:34 lukem Exp $ */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/getusershell.c,v 1.8 2003/03/19 14:17:24 robert Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/getusershell.c,v 1.9 2003/04/24 20:16:21 nectar Exp $");
+#include "namespace.h"
#include <sys/param.h>
#include <sys/file.h>
@@ -59,6 +60,7 @@
#include <rpcsvc/ypclnt.h>
#include <rpcsvc/yp_prot.h>
#endif
+#include "un-namespace.h"
/*
* Local shells should NOT be added here. They should be added in
@@ -259,7 +261,7 @@
sl_free(sl, 1);
sl = sl_init();
- if (nsdispatch(NULL, dtab, NSDB_SHELLS, "initshells", __nsdefaultsrc)
+ if (_nsdispatch(NULL, dtab, NSDB_SHELLS, "initshells", __nsdefaultsrc)
!= NS_SUCCESS) {
if (sl)
sl_free(sl, 1);
==== //depot/projects/hammer/lib/libc/net/getaddrinfo.c#7 (text+ko) ====
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.37 2003/02/27 13:40:00 nectar Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.38 2003/04/24 17:41:20 nectar Exp $");
#include "namespace.h"
#include <sys/types.h>
@@ -607,7 +607,7 @@
return 0;
}
- switch (nsdispatch(&result, dtab, NSDB_HOSTS, "getaddrinfo",
+ switch (_nsdispatch(&result, dtab, NSDB_HOSTS, "getaddrinfo",
default_dns_files, hostname, pai)) {
case NS_TRYAGAIN:
error = EAI_AGAIN;
==== //depot/projects/hammer/lib/libc/net/gethostnamadr.c#2 (text+ko) ====
@@ -24,8 +24,9 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/net/gethostnamadr.c,v 1.20 2002/03/22 21:52:29 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/net/gethostnamadr.c,v 1.21 2003/04/24 18:05:48 nectar Exp $");
+#include "namespace.h"
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -38,6 +39,7 @@
#include <nsswitch.h>
#include <arpa/nameser.h> /* XXX hack for _res */
#include <resolv.h> /* XXX hack for _res */
+#include "un-namespace.h"
extern int _ht_gethostbyname(void *, void *, va_list);
extern int _dns_gethostbyname(void *, void *, va_list);
@@ -83,7 +85,7 @@
{ 0 }
};
- rval = nsdispatch((void *)&hp, dtab, NSDB_HOSTS, "gethostbyname",
+ rval = _nsdispatch((void *)&hp, dtab, NSDB_HOSTS, "gethostbyname",
default_src, name, type);
if (rval != NS_SUCCESS)
@@ -105,7 +107,7 @@
{ 0 }
};
- rval = nsdispatch((void *)&hp, dtab, NSDB_HOSTS, "gethostbyaddr",
+ rval = _nsdispatch((void *)&hp, dtab, NSDB_HOSTS, "gethostbyaddr",
default_src, addr, len, type);
if (rval != NS_SUCCESS)
==== //depot/projects/hammer/lib/libc/net/getnetnamadr.c#2 (text+ko) ====
@@ -24,8 +24,9 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/net/getnetnamadr.c,v 1.16 2002/03/22 21:52:29 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/net/getnetnamadr.c,v 1.17 2003/04/24 18:05:48 nectar Exp $");
+#include "namespace.h"
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -36,6 +37,7 @@
#include <string.h>
#include <stdarg.h>
#include <nsswitch.h>
+#include "un-namespace.h"
extern int _ht_getnetbyname(void *, void *, va_list);
extern int _dns_getnetbyname(void *, void *, va_list);
@@ -65,7 +67,7 @@
{ 0 }
};
- rval = nsdispatch((void *)&hp, dtab, NSDB_NETWORKS, "getnetbyname",
+ rval = _nsdispatch((void *)&hp, dtab, NSDB_NETWORKS, "getnetbyname",
default_src, name);
if (rval != NS_SUCCESS)
@@ -87,7 +89,7 @@
{ 0 }
};
- rval = nsdispatch((void *)&hp, dtab, NSDB_NETWORKS, "getnetbyaddr",
+ rval = _nsdispatch((void *)&hp, dtab, NSDB_NETWORKS, "getnetbyaddr",
default_src, addr, af);
if (rval != NS_SUCCESS)
==== //depot/projects/hammer/lib/libc/net/name6.c#6 (text+ko) ====
@@ -94,7 +94,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.31 2003/02/16 17:29:10 nectar Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.32 2003/04/24 17:41:20 nectar Exp $");
#include "namespace.h"
#include <sys/param.h>
@@ -291,7 +291,7 @@
}
THREAD_LOCK();
- rval = nsdispatch(&hp, dtab, NSDB_HOSTS, "ghbyname", default_src,
+ rval = _nsdispatch(&hp, dtab, NSDB_HOSTS, "ghbyname", default_src,
name, af, errp);
THREAD_UNLOCK();
return (rval == NS_SUCCESS) ? hp : NULL;
@@ -438,7 +438,7 @@
}
THREAD_LOCK();
- rval = nsdispatch(&hp, dtab, NSDB_HOSTS, "ghbyaddr", default_src,
+ rval = _nsdispatch(&hp, dtab, NSDB_HOSTS, "ghbyaddr", default_src,
src, len, af, errp);
THREAD_UNLOCK();
return (rval == NS_SUCCESS) ? hp : NULL;
==== //depot/projects/hammer/lib/libc/net/nsdispatch.c#4 (text+ko) ====
@@ -68,7 +68,7 @@
*
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/net/nsdispatch.c,v 1.7 2003/04/17 14:14:22 nectar Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/net/nsdispatch.c,v 1.8 2003/04/24 19:57:31 nectar Exp $");
#include "namespace.h"
#include <sys/param.h>
@@ -549,7 +549,9 @@
return (match->method);
}
}
- nss_log(LOG_DEBUG, "%s, %s, %s, not found", source, database, method);
+ if (is_dynamic())
+ nss_log(LOG_DEBUG, "%s, %s, %s, not found", source, database,
+ method);
*mdata = NULL;
return (NULL);
}
==== //depot/projects/hammer/lib/libpam/modules/pam_unix/pam_unix.c#2 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.40 2002/05/22 23:18:25 jmallett Exp $");
+__FBSDID("$FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.42 2003/04/24 12:27:01 des Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -337,8 +337,10 @@
PAM_LOG("Got old password");
/* always encrypt first */
encrypted = crypt(old_pass, pwd->pw_passwd);
- if ((old_pass[0] == '\0' && pwd->pw_passwd[0] != '\0') ||
- strcmp(encrypted, pwd->pw_passwd) != 0)
+ if (old_pass[0] == '\0' &&
+ !pam_test_option(&options, PAM_OPT_NULLOK, NULL))
+ return (PAM_PERM_DENIED);
+ if (strcmp(encrypted, pwd->pw_passwd) != 0)
return (PAM_PERM_DENIED);
}
else if (flags & PAM_UPDATE_AUTHTOK) {
@@ -364,6 +366,10 @@
return (retval);
}
+ if (getuid() != 0 && new_pass[0] == '\0' &&
+ !pam_test_option(&options, PAM_OPT_NULLOK, NULL))
+ return (PAM_PERM_DENIED);
+
if ((old_pwd = pw_dup(pwd)) == NULL)
return (PAM_BUF_ERR);
==== //depot/projects/hammer/share/man/man4/acpi.4#4 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.6 2002/10/24 01:44:50 rwatson Exp $
+.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.7 2003/04/24 09:54:18 hmp Exp $
.\"
.Dd July 2, 2001
.Dt ACPI 4
@@ -32,7 +32,7 @@
.Nm acpi
.Nd Advanced Configuration and Power Management support
.Sh SYNOPSIS
-.Cd device acpica
+.Cd device acpi
.Pp
.Cd options ACPI_DEBUG
.Sh DESCRIPTION
==== //depot/projects/hammer/sys/dev/firewire/firewire.c#7 (text+ko) ====
@@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.46 2003/04/17 03:38:02 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.47 2003/04/24 09:27:17 simokawa Exp $
*
*/
@@ -1778,7 +1778,11 @@
bind = fw_bindlookup(fc, fp->mode.rreqq.dest_hi,
fp->mode.rreqq.dest_lo);
if(bind == NULL){
+#if __FreeBSD_version >= 500000
printf("Unknown service addr 0x%08x:0x%08x tcode=%x src=0x%x data=%x\n",
+#else
+ printf("Unknown service addr 0x%08x:0x%08x tcode=%x src=0x%x data=%lx\n",
+#endif
fp->mode.wreqq.dest_hi,
fp->mode.wreqq.dest_lo,
tcode,
==== //depot/projects/hammer/sys/dev/firewire/fwohci.c#6 (text+ko) ====
@@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.47 2003/04/17 03:38:02 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.48 2003/04/24 15:27:06 simokawa Exp $
*
*/
@@ -2303,11 +2303,11 @@
key = cmd & OHCI_KEY_MASK;
stat = res >> OHCI_STATUS_SHIFT;
#if __FreeBSD_version >= 500000
- printf("%08tx %s %s %s %s %5d %08x %08x %04x:%04x",
+ printf("%08jx %s %s %s %s %5d %08x %08x %04x:%04x",
#else
printf("%08x %s %s %s %s %5d %08x %08x %04x:%04x",
#endif
- db_tr->bus_addr,
+ (uintmax_t)db_tr->bus_addr,
dbcode[(cmd >> 28) & 0xf],
dbkey[(cmd >> 24) & 0x7],
dbcond[(cmd >> 20) & 0x3],
==== //depot/projects/hammer/sys/dev/firewire/fwohci_pci.c#7 (text+ko) ====
@@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/firewire/fwohci_pci.c,v 1.21 2003/04/17 03:38:02 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/fwohci_pci.c,v 1.22 2003/04/24 07:29:52 simokawa Exp $
*/
#define BOUNCE_BUFFER_TEST 0
@@ -78,6 +78,14 @@
device_set_desc(dev, "NEC uPD72871/2");
return 0;
}
+ if (id == (FW_VENDORID_NEC | FW_DEVICE_UPD72870)) {
+ device_set_desc(dev, "NEC uPD72870");
+ return 0;
+ }
+ if (id == (FW_VENDORID_NEC | FW_DEVICE_UPD72874)) {
+ device_set_desc(dev, "NEC uPD72874");
+ return 0;
+ }
if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB22)) {
device_set_desc(dev, "Texas Instruments TSB12LV22");
return 0;
@@ -98,6 +106,10 @@
device_set_desc(dev, "Texas Instruments TSB43AB22/A");
return 0;
}
+ if (id == (FW_VENDORID_TI | FW_DEVICE_TITSB43AB23)) {
+ device_set_desc(dev, "Texas Instruments TSB43AB23");
+ return 0;
+ }
if (id == (FW_VENDORID_TI | FW_DEVICE_TIPCI4450)) {
device_set_desc(dev, "Texas Instruments PCI4450");
return 0;
@@ -106,6 +118,10 @@
device_set_desc(dev, "Texas Instruments PCI4410A");
return 0;
}
+ if (id == (FW_VENDORID_TI | FW_DEVICE_TIPCI4451)) {
+ device_set_desc(dev, "Texas Instruments PCI4451");
+ return 0;
+ }
if (id == (FW_VENDORID_SONY | FW_DEVICE_CX3022)) {
device_set_desc(dev, "Sony CX3022");
return 0;
@@ -114,6 +130,10 @@
device_set_desc(dev, "VIA VT6306");
return 0;
}
+ if (id == (FW_VENDORID_RICOH | FW_DEVICE_R5C551)) {
+ device_set_desc(dev, "Ricoh R5C551");
+ return 0;
+ }
if (id == (FW_VENDORID_RICOH | FW_DEVICE_R5C552)) {
device_set_desc(dev, "Ricoh R5C552");
return 0;
==== //depot/projects/hammer/sys/dev/firewire/fwohcireg.h#4 (text+ko) ====
@@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/firewire/fwohcireg.h,v 1.9 2003/04/17 03:38:02 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/fwohcireg.h,v 1.10 2003/04/24 07:29:52 simokawa Exp $
*
*/
#define PCI_CBMEM 0x10
@@ -46,15 +46,20 @@
#define FW_DEVICE_UPD861 (0x0063 << 16)
#define FW_DEVICE_UPD871 (0x00ce << 16)
+#define FW_DEVICE_UPD72870 (0x00cd << 16)
+#define FW_DEVICE_UPD72874 (0x00f2 << 16)
#define FW_DEVICE_TITSB22 (0x8009 << 16)
#define FW_DEVICE_TITSB23 (0x8019 << 16)
#define FW_DEVICE_TITSB26 (0x8020 << 16)
#define FW_DEVICE_TITSB43 (0x8021 << 16)
#define FW_DEVICE_TITSB43A (0x8023 << 16)
+#define FW_DEVICE_TITSB43AB23 (0x8024 << 16)
+#define FW_DEVICE_TIPCI4410A (0x8017 << 16)
#define FW_DEVICE_TIPCI4450 (0x8011 << 16)
-#define FW_DEVICE_TIPCI4410A (0x8017 << 16)
+#define FW_DEVICE_TIPCI4451 (0x8027 << 16)
#define FW_DEVICE_CX3022 (0x8039 << 16)
#define FW_DEVICE_VT6306 (0x3044 << 16)
+#define FW_DEVICE_R5C551 (0x0551 << 16)
#define FW_DEVICE_R5C552 (0x0552 << 16)
#define FW_DEVICE_PANGEA (0x0030 << 16)
#define FW_DEVICE_UNINORTH (0x0031 << 16)
==== //depot/projects/hammer/sys/dev/firewire/sbp.c#7 (text+ko) ====
@@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.42 2003/04/17 03:38:02 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.43 2003/04/24 15:27:06 simokawa Exp $
*
*/
@@ -2354,11 +2354,11 @@
printf("sbp_execute_ocb: seg %d", seg);
for (i = 0; i < seg; i++)
#if __FreeBSD_version >= 500000
- printf(", %tx:%zd", segments[i].ds_addr,
+ printf(", %jx:%jd", (uintmax_t)segments[i].ds_addr,
+ (uintmax_t)segments[i].ds_len);
#else
- printf(", %x:%d", segments[i].ds_addr,
+ printf(", %x:%d", segments[i].ds_addr, segments[i].ds_len);
#endif
- segments[i].ds_len);
printf("\n");
END_DEBUG
@@ -2422,11 +2422,13 @@
SBP_DEBUG(1)
sbp_show_sdev_info(sdev, 2);
#if __FreeBSD_version >= 500000
- printf("orb: 0x%tx next: 0x%x, flags %x\n",
+ printf("orb: 0x%jx next: 0x%x, flags %x\n",
+ (uintmax_t)ocb->bus_addr,
#else
printf("orb: 0x%x next: 0x%lx, flags %x\n",
+ ocb->bus_addr,
#endif
- ocb->bus_addr, ntohl(ocb->orb[1]), flags);
+ ntohl(ocb->orb[1]), flags);
END_DEBUG
if (OCB_MATCH(ocb, sbp_status)) {
/* found */
@@ -2468,7 +2470,8 @@
SBP_DEBUG(2)
sbp_show_sdev_info(sdev, 2);
#if __FreeBSD_version >= 500000
- printf("sbp_enqueue_ocb orb=0x%tx in physical memory\n", ocb->bus_addr);
+ printf("sbp_enqueue_ocb orb=0x%jx in physical memory\n",
+ (uintmax_t)ocb->bus_addr);
#else
printf("sbp_enqueue_ocb orb=0x%x in physical memory\n", ocb->bus_addr);
#endif
@@ -2483,11 +2486,11 @@
if (prev != NULL ) {
SBP_DEBUG(1)
#if __FreeBSD_version >= 500000
- printf("linking chain 0x%tx -> 0x%tx\n", prev->bus_addr,
+ printf("linking chain 0x%jx -> 0x%jx\n",
+ (uintmax_t)prev->bus_addr, (uintmax_t)ocb->bus_addr);
#else
- printf("linking chain 0x%x -> 0x%x\n", prev->bus_addr,
+ printf("linking chain 0x%x -> 0x%x\n", prev->bus_addr, ocb->bus_addr);
#endif
- ocb->bus_addr);
END_DEBUG
prev->orb[1] = htonl(ocb->bus_addr);
prev->orb[0] = 0;
@@ -2530,11 +2533,10 @@
SBP_DEBUG(0)
sbp_show_sdev_info(sdev, 2);
#if __FreeBSD_version >= 500000
- printf("sbp_abort_ocb 0x%tx\n",
+ printf("sbp_abort_ocb 0x%jx\n", (uintmax_t)ocb->bus_addr);
#else
- printf("sbp_abort_ocb 0x%x\n",
+ printf("sbp_abort_ocb 0x%x\n", ocb->bus_addr);
#endif
- ocb->bus_addr);
END_DEBUG
SBP_DEBUG(1)
if (ocb->ccb != NULL)
==== //depot/projects/hammer/sys/fs/msdosfs/msdosfs_vfsops.c#7 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.100 2003/02/19 05:47:18 imp Exp $ */
+/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.101 2003/04/24 18:19:19 jhb Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */
/*-
@@ -359,6 +359,10 @@
*/
SecPerClust = b50->bpbSecPerClust;
pmp->pm_BytesPerSec = getushort(b50->bpbBytesPerSec);
+ if (pmp->pm_BytesPerSec < DEV_BSIZE) {
+ error = EINVAL;
+ goto error_exit;
+ }
pmp->pm_ResSectors = getushort(b50->bpbResSectors);
pmp->pm_FATs = b50->bpbFATs;
pmp->pm_RootDirEnts = getushort(b50->bpbRootDirEnts);
@@ -428,12 +432,14 @@
* - logical sector size: power of 2, >= block size
* - sectors per cluster: power of 2, >= 1
* - number of sectors: >= 1, <= size of partition
+ * - number of FAT sectors: >= 1
*/
if ( (SecPerClust == 0)
|| (SecPerClust & (SecPerClust - 1))
|| (pmp->pm_BytesPerSec < DEV_BSIZE)
|| (pmp->pm_BytesPerSec & (pmp->pm_BytesPerSec - 1))
|| (pmp->pm_HugeSectors == 0)
+ || (pmp->pm_FATsecs == 0)
) {
error = EINVAL;
goto error_exit;
==== //depot/projects/hammer/sys/i386/i386/trap.c#11 (text+ko) ====
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $FreeBSD: src/sys/i386/i386/trap.c,v 1.249 2003/04/22 08:12:03 davidxu Exp $
+ * $FreeBSD: src/sys/i386/i386/trap.c,v 1.250 2003/04/24 01:48:59 davidxu Exp $
*/
/*
@@ -212,7 +212,8 @@
printf(
"pid %ld (%s): trap %d with interrupts disabled\n",
(long)curproc->p_pid, curproc->p_comm, type);
- else if (type != T_BPTFLT && type != T_TRCTRAP) {
+ else if (type != T_BPTFLT && type != T_TRCTRAP &&
+ frame.tf_eip != (int)cpu_switch_load_gs) {
/*
* XXX not quite right, since this may be for a
* multiple fault in user mode.
@@ -224,8 +225,7 @@
* and we shouldn't enable interrupts while holding a
* spin lock.
*/
- if (type != T_PAGEFLT && PCPU_GET(spinlocks) == NULL &&
- frame.tf_eip != (int)cpu_switch_load_gs)
+ if (type != T_PAGEFLT && PCPU_GET(spinlocks) == NULL)
enable_intr();
}
}
@@ -481,9 +481,6 @@
*/
if (frame.tf_eip == (int)cpu_switch_load_gs) {
PCPU_GET(curpcb)->pcb_gs = 0;
- printf(
- "Process %d has bad %%gs, reset to zero\n",
- p->p_pid);
#if 0
PROC_LOCK(p);
psignal(p, SIGBUS);
==== //depot/projects/hammer/sys/kern/kern_mac.c#14 (text+ko) ====
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/kern/kern_mac.c,v 1.87 2003/04/18 19:57:37 rwatson Exp $
+ * $FreeBSD: src/sys/kern/kern_mac.c,v 1.88 2003/04/24 04:31:24 alc Exp $
*/
/*
* Developed by the TrustedBSD Project.
@@ -2093,11 +2093,13 @@
*/
vm_object_reference(object);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
+ VM_OBJECT_LOCK(object);
vm_object_page_clean(object,
OFF_TO_IDX(offset),
OFF_TO_IDX(offset + vme->end - vme->start +
PAGE_MASK),
OBJPC_SYNC);
+ VM_OBJECT_UNLOCK(object);
VOP_UNLOCK(vp, 0, td);
vm_object_deallocate(object);
/*
==== //depot/projects/hammer/sys/kern/kern_proc.c#12 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_proc.c 8.7 (Berkeley) 2/14/95
- * $FreeBSD: src/sys/kern/kern_proc.c,v 1.179 2003/04/18 20:17:05 jhb Exp $
+ * $FreeBSD: src/sys/kern/kern_proc.c,v 1.182 2003/04/24 12:12:06 des Exp $
*/
#include "opt_ktrace.h"
@@ -662,10 +662,16 @@
kp->ki_size = vm->vm_map.size;
kp->ki_rssize = vmspace_resident_count(vm); /*XXX*/
- if (p->p_sflag & PS_INMEM)
+ if (p->p_sflag & PS_INMEM) {
kp->ki_rssize += UAREA_PAGES;
- FOREACH_THREAD_IN_PROC(p, td0)/* XXXKSE: thread swapout check */
- kp->ki_rssize += KSTACK_PAGES;
+ FOREACH_THREAD_IN_PROC(p, td0) {
+ if (!TD_IS_SWAPPED(td0))
+ kp->ki_rssize += td0->td_kstack_pages;
+ if (td0->td_altkstack_obj != NULL)
+ kp->ki_rssize +=
+ td0->td_altkstack_pages;
+ }
+ }
kp->ki_swrss = vm->vm_swrss;
kp->ki_tsize = vm->vm_tsize;
kp->ki_dsize = vm->vm_dsize;
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list