PERFORCE change 30643 for review
Peter Wemm
peter at FreeBSD.org
Mon May 5 16:09:36 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=30643
Change 30643 by peter at peter_daintree on 2003/05/05 16:09:03
IFC @30641 (repocopied machine/ieeefp.h from i386 on cvs)
Affected files ...
.. //depot/projects/hammer/UPDATING#11 integrate
.. //depot/projects/hammer/etc/newsyslog.conf#6 integrate
.. //depot/projects/hammer/etc/pccard_ether#3 integrate
.. //depot/projects/hammer/etc/remote#2 integrate
.. //depot/projects/hammer/etc/services#4 integrate
.. //depot/projects/hammer/lib/libpam/libpam/Makefile#5 integrate
.. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml#7 integrate
.. //depot/projects/hammer/sbin/Makefile#4 integrate
.. //depot/projects/hammer/sbin/bsdlabel/Makefile#4 integrate
.. //depot/projects/hammer/share/mk/bsd.sys.mk#6 integrate
.. //depot/projects/hammer/sys/amd64/include/ieeefp.h#1 branch
.. //depot/projects/hammer/sys/conf/NOTES#16 integrate
.. //depot/projects/hammer/sys/kern/kern_sig.c#12 integrate
.. //depot/projects/hammer/sys/kern/kern_subr.c#5 integrate
.. //depot/projects/hammer/sys/kern/kern_synch.c#15 integrate
.. //depot/projects/hammer/sys/kern/uipc_syscalls.c#7 integrate
.. //depot/projects/hammer/sys/sys/signalvar.h#5 integrate
.. //depot/projects/hammer/sys/sys/syscallsubr.h#6 integrate
.. //depot/projects/hammer/usr.sbin/newsyslog/newsyslog.c#7 integrate
Differences ...
==== //depot/projects/hammer/UPDATING#11 (text+ko) ====
@@ -17,6 +17,11 @@
developers choose to disable these features on build machines
to maximize performance.
+20030505:
+ Kerberos 5 (Heimdal) is now built by default. Setting
+ MAKE_KERBEROS5 no longer has any effect. If you do NOT
+ want the "base" Kerberos 5, you need to set NO_KERBEROS.
+
20030502:
groff has been updated. If you try to do a buildworld and
get an infinite loop in troff, update to May 4th or newer. If you
@@ -1273,4 +1278,4 @@
Contact Warner Losh if you have any questions about your use of
this document.
-$FreeBSD: src/UPDATING,v 1.250 2003/05/04 06:26:30 imp Exp $
+$FreeBSD: src/UPDATING,v 1.251 2003/05/05 20:05:37 markm Exp $
==== //depot/projects/hammer/etc/newsyslog.conf#6 (text+ko) ====
@@ -1,5 +1,14 @@
# configuration file for newsyslog
-# $FreeBSD: src/etc/newsyslog.conf,v 1.44 2003/04/08 16:14:02 des Exp $
+# $FreeBSD: src/etc/newsyslog.conf,v 1.46 2003/05/05 19:08:33 gad Exp $
+#
+# Entries which do not specify the '/pid_file' field will cause the
+# syslogd process to be signalled when that log file is rotated. This
+# action is only appropriate for log files which are written to by the
+# syslogd process (ie, files listed in /etc/syslogd.conf). If there
+# is no process which needs to be signalled when a given log file is
+# rotated, then the entry for that file should include the 'N' flag.
+#
+# The 'flags' field is one or more of the letters: BCGJNUWZ or a '-'.
#
# Note: some sites will want to select more restrictive protections than the
# defaults. In particular, it may be desirable to switch many of the 644
@@ -7,23 +16,23 @@
# contents of maillog, messages, and lpd-errs to be confidential. In the
# future, these defaults may change to more conservative ones.
#
-# logfilename [owner:group] mode count size when [ZJB] [/pid_file] [sig_num]
+# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/var/log/all.log 600 7 * @T00 J
/var/log/amd.log 644 7 100 * J
/var/log/auth.log 600 7 100 * J
/var/log/console.log 600 5 100 * J
/var/log/cron 600 3 100 * J
-/var/log/daily.log 640 7 * @T00 J
+/var/log/daily.log 640 7 * @T00 JN
/var/log/debug.log 600 7 100 * J
/var/log/kerberos.log 600 7 100 * J
/var/log/lpd-errs 644 7 100 * J
/var/log/maillog 640 7 * @T00 J
/var/log/messages 644 5 100 * J
-/var/log/monthly.log 640 12 * $M1D0 J
+/var/log/monthly.log 640 12 * $M1D0 JN
/var/log/ppp.log root:network 640 3 100 * J
/var/log/security 600 10 100 * J
/var/log/sendmail.st 640 10 * 168 B
/var/log/slip.log root:network 640 3 100 * J
-/var/log/weekly.log 640 5 1 $W6D0 J
+/var/log/weekly.log 640 5 1 $W6D0 JN
/var/log/wtmp 644 3 * @01T05 B
/var/log/xferlog 600 7 100 * J
==== //depot/projects/hammer/etc/pccard_ether#3 (text+ko) ====
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $FreeBSD: src/etc/pccard_ether,v 1.28 2002/12/12 09:31:09 imp Exp $
+# $FreeBSD: src/etc/pccard_ether,v 1.29 2003/05/05 19:06:46 ume Exp $
#
# pccard_ether interfacename [start|stop] [ifconfig option]
#
@@ -134,8 +134,8 @@
# IPv6 setup
case ${ipv6_enable} in
[Yy][Ee][Ss])
- if [ -r /etc/rc.network6 ]; then
- . /etc/rc.network6
+ if [ -r /etc/rc.d/network_ipv6 ]; then
+ . /etc/rc.d/network_ipv6
network6_interface_setup ${interface}
fi
;;
==== //depot/projects/hammer/etc/remote#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/remote,v 1.11 2001/02/21 19:45:47 nik Exp $
+# $FreeBSD: src/etc/remote,v 1.12 2003/05/05 21:37:43 dougb Exp $
#
# @(#)remote 5.2 (Berkeley) 6/30/90
#
@@ -52,7 +52,7 @@
cuaa0c|cua0c:dv=/dev/cuaa0:br#9600:pa=none:
# Finger friendly shortcuts
-com1:dv=/dev/cuaa0:br#9600:pa=none:
-com2:dv=/dev/cuaa1:br#9600:pa=none:
-com3:dv=/dev/cuaa2:br#9600:pa=none:
-com4:dv=/dev/cuaa3:br#9600:pa=none:
+sio0|com1:dv=/dev/cuaa0:br#9600:pa=none:
+sio1|com2:dv=/dev/cuaa1:br#9600:pa=none:
+sio2|com3:dv=/dev/cuaa2:br#9600:pa=none:
+sio3|com4:dv=/dev/cuaa3:br#9600:pa=none:
==== //depot/projects/hammer/etc/services#4 (text+ko) ====
@@ -16,7 +16,7 @@
# Kerberos services are for Kerberos v4, and are unofficial. Sites running
# v5 should uncomment v5 entries and comment v4 entries.
#
-# $FreeBSD: src/etc/services,v 1.92 2003/04/29 09:54:06 mdodd Exp $
+# $FreeBSD: src/etc/services,v 1.93 2003/05/05 22:10:14 dougb Exp $
# From: @(#)services 5.8 (Berkeley) 5/9/91
#
# WELL KNOWN PORT NUMBERS
@@ -1198,6 +1198,7 @@
accessbuilder 888/tcp
accessbuilder 888/udp
swat 901/tcp # samba web configuration tool
+rndc 953/tcp # named's rndc control socket
ftps-data 989/tcp # ftp protocol, data, over TLS/SSL
ftps-data 989/udp
ftps 990/tcp # ftp protocol, control, over TLS/SSL
@@ -1922,6 +1923,8 @@
dec-notes 3333/tcp #DEC Notes
dec-notes 3333/udp #DEC Notes
rsvp-encap 3455/udp #RSVP encapsulated in UDP
+nut 3493/tcp #Network UPS Tools
+nut 3493/udp #Network UPS Tools
mapper-nodemgr 3984/tcp #MAPPER network node manager
mapper-nodemgr 3984/udp #MAPPER network node manager
mapper-mapethd 3985/tcp #MAPPER TCP/IP server
==== //depot/projects/hammer/lib/libpam/libpam/Makefile#5 (text+ko) ====
@@ -33,7 +33,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD: src/lib/libpam/libpam/Makefile,v 1.43 2003/05/01 14:55:06 des Exp $
+# $FreeBSD: src/lib/libpam/libpam/Makefile,v 1.44 2003/05/05 21:15:35 des Exp $
OPENPAM= ${.CURDIR}/../../../contrib/openpam
.PATH: ${OPENPAM}/include ${OPENPAM}/lib ${OPENPAM}/doc/man
@@ -127,7 +127,7 @@
pam_vprompt.3
CSTD?= c99
-WARNS?= 5
+WARNS?= 6
CFLAGS+= -I${.CURDIR} -I${OPENPAM}/include
CFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR}
==== //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml#7 (text+ko) ====
@@ -1,4 +1,4 @@
-<!-- $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml,v 1.59 2003/05/04 20:23:38 wilko Exp $ -->
+<!-- $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml,v 1.60 2003/05/05 17:43:30 wilko Exp $ -->
<sect1 id="support-proc">
<sect1info>
@@ -2207,8 +2207,8 @@
<para>Features:</para>
<itemizedlist>
<listitem>
- <para>21164 EV5 CPUs at 266, 300 MHz or 21164A EV56
- CPUs at 400, 466, 533, 600 and 666 Mhz</para>
+ <para>21164 EV5 CPUs at 266, 300, 333 MHz or 21164A EV56
+ CPUs at 400, 466, 533, 600 Mhz</para>
</listitem>
<listitem>
<para>cache: 4 Mbytes per CPU. EV5 300 MHz was also
==== //depot/projects/hammer/sbin/Makefile#4 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 8.5 (Berkeley) 3/31/94
-# $FreeBSD: src/sbin/Makefile,v 1.119 2003/03/02 01:50:32 mckusick Exp $
+# $FreeBSD: src/sbin/Makefile,v 1.120 2003/05/05 21:28:07 phk Exp $
# XXX MISSING: icheck ncheck
@@ -7,6 +7,7 @@
atacontrol \
atm \
badsect \
+ bsdlabel \
camcontrol \
ccdconfig \
clri \
@@ -94,7 +95,6 @@
SUBDIR+=cxconfig \
mount_nwfs \
mount_smbfs
-SUBDIR+=disklabel
.if ${MACHINE} == "pc98"
SUBDIR+=fdisk_pc98
.else
@@ -104,15 +104,10 @@
.if ${MACHINE_ARCH} == "ia64"
SUBDIR+=fdisk \
- disklabel \
gpt \
mca
.endif
-.if ${MACHINE_ARCH} == "alpha"
-SUBDIR+=disklabel
-.endif
-
.if ${MACHINE_ARCH} == "sparc64"
SUBDIR+=sunlabel
.endif
==== //depot/projects/hammer/sbin/bsdlabel/Makefile#4 (text+ko) ====
@@ -1,11 +1,21 @@
# @(#)Makefile 8.2 (Berkeley) 3/17/94
-# $FreeBSD: src/sbin/bsdlabel/Makefile,v 1.14 2003/05/03 08:04:24 phk Exp $
+# $FreeBSD: src/sbin/bsdlabel/Makefile,v 1.15 2003/05/05 21:28:08 phk Exp $
PROG= bsdlabel
SRCS= bsdlabel.c geom_bsd_enc.c
#MAN+= bsdlabel.5
MAN+= bsdlabel.8
+.if ${MACHINE_ARCH} == "i386"
+LINKS= ${BINDIR}/bsdlabel ${BINDIR}/disklabel
+MLINKS+= bsdlabel.8 disklabel.8
+.endif
+
+.if ${MACHINE_ARCH} == "alpha"
+LINKS= ${BINDIR}/bsdlabel ${BINDIR}/disklabel
+MLINKS+= bsdlabel.8 disklabel.8
+.endif
+
DDADD= ${LIBGEOM}
LDADD= -lgeom -lbsdxml -lsbuf
==== //depot/projects/hammer/share/mk/bsd.sys.mk#6 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/mk/bsd.sys.mk,v 1.15 2003/05/01 14:36:27 des Exp $
+# $FreeBSD: src/share/mk/bsd.sys.mk,v 1.17 2003/05/05 21:14:36 des Exp $
#
# This file contains common settings used for building FreeBSD
# sources.
@@ -11,14 +11,17 @@
.if !defined(NO_WARNS)
. if defined(CSTD)
. if ${CSTD} == "k&r"
-CFLAGS += -traditional
+CFLAGS += -traditional
. elif ${CSTD} == "c89" || ${CSTD} == "c90"
-CFLAGS += -std=iso9899:1990
+CFLAGS += -std=iso9899:1990
. elif ${CSTD} == "c94" || ${CSTD} == "c95"
-CFLAGS += -std=iso9899:199409
+CFLAGS += -std=iso9899:199409
. elif ${CSTD} == "c99"
-CFLAGS += -std=iso9899:1999
+CFLAGS += -std=iso9899:1999
+. else
+CFLAGS += -std=${CSTD}
. endif
+CFLAGS += -pedantic
. endif
. if defined(WARNS)
. if ${WARNS} > 0
@@ -38,7 +41,7 @@
. endif
# BDECFLAGS
. if ${WARNS} > 5
-CFLAGS += -pedantic -Wno-long-long -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
+CFLAGS += -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
. endif
. if ${WARNS} > 1 && ${WARNS} < 5
# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
==== //depot/projects/hammer/sys/conf/NOTES#16 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1147 2003/05/03 10:16:55 akiyama Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1148 2003/05/05 21:21:31 phk Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -116,15 +116,15 @@
#
options INCLUDE_CONFIG_FILE # Include this file in kernel
-options GEOM_AES
-options GEOM_APPLE
-options GEOM_BDE
-options GEOM_BSD
-options GEOM_GPT
-options GEOM_MBR
-options GEOM_PC98
-options GEOM_SUNLABEL
-options GEOM_VOL
+options GEOM_AES # Don't use, use GEOM_BDE
+options GEOM_APPLE # Apple partitioning
+options GEOM_BDE # Disk encryption.
+options GEOM_BSD # BSD disklabels
+options GEOM_GPT # GPT partitioning
+options GEOM_MBR # DOS/MBR partitioning
+options GEOM_PC98 # NEC PC9800 partitioning
+options GEOM_SUNLABEL # Sun/Solaris partitioning
+options GEOM_VOL # Volume names from UFS superblock
#
# The root device and filesystem type can be compiled in;
==== //depot/projects/hammer/sys/kern/kern_sig.c#12 (text+ko) ====
@@ -36,40 +36,40 @@
* SUCH DAMAGE.
*
* @(#)kern_sig.c 8.7 (Berkeley) 4/18/94
- * $FreeBSD: src/sys/kern/kern_sig.c,v 1.233 2003/04/30 19:45:13 jhb Exp $
+ * $FreeBSD: src/sys/kern/kern_sig.c,v 1.236 2003/05/05 21:26:25 jhb Exp $
*/
#include "opt_compat.h"
#include "opt_ktrace.h"
#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/sysproto.h>
#include <sys/systm.h>
#include <sys/signalvar.h>
-#include <sys/namei.h>
#include <sys/vnode.h>
+#include <sys/acct.h>
+#include <sys/condvar.h>
#include <sys/event.h>
-#include <sys/proc.h>
-#include <sys/pioctl.h>
-#include <sys/acct.h>
#include <sys/fcntl.h>
-#include <sys/condvar.h>
+#include <sys/kernel.h>
+#include <sys/ktr.h>
+#include <sys/ktrace.h>
#include <sys/lock.h>
+#include <sys/malloc.h>
#include <sys/mutex.h>
-#include <sys/wait.h>
-#include <sys/ktr.h>
-#include <sys/ktrace.h>
+#include <sys/namei.h>
+#include <sys/proc.h>
+#include <sys/pioctl.h>
#include <sys/resourcevar.h>
#include <sys/smp.h>
#include <sys/stat.h>
#include <sys/sx.h>
#include <sys/syscallsubr.h>
+#include <sys/sysctl.h>
+#include <sys/sysent.h>
#include <sys/syslog.h>
-#include <sys/sysent.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
+#include <sys/sysproto.h>
#include <sys/unistd.h>
+#include <sys/wait.h>
#include <machine/cpu.h>
@@ -82,6 +82,7 @@
static int coredump(struct thread *);
static char *expand_name(const char *, uid_t, pid_t);
static int killpg1(struct thread *td, int sig, int pgid, int all);
+static int issignal(struct thread *p);
static int sigprop(int sig);
static void stop(struct proc *);
static void tdsigwakeup(struct thread *td, int sig, sig_t action);
@@ -731,9 +732,11 @@
error = copyout(&info.si_signo, uap->sig, sizeof(info.si_signo));
/* Repost if we got an error. */
- if (error && info.si_signo)
+ if (error && info.si_signo) {
+ PROC_LOCK(td->td_proc);
tdsignal(td, info.si_signo);
-
+ PROC_UNLOCK(td->td_proc);
+ }
return (error);
}
/*
@@ -767,9 +770,11 @@
error = copyout(&info, uap->info, sizeof(info));
/* Repost if we got an error. */
- if (error && info.si_signo)
+ if (error && info.si_signo) {
+ PROC_LOCK(td->td_proc);
tdsignal(td, info.si_signo);
-
+ PROC_UNLOCK(td->td_proc);
+ }
return (error);
}
@@ -793,9 +798,11 @@
error = copyout(&info, uap->info, sizeof(info));
/* Repost if we got an error. */
- if (error && info.si_signo)
+ if (error && info.si_signo) {
+ PROC_LOCK(td->td_proc);
tdsignal(td, info.si_signo);
-
+ PROC_UNLOCK(td->td_proc);
+ }
return (error);
}
@@ -1886,7 +1893,7 @@
* while (sig = cursig(curthread))
* postsig(sig);
*/
-int
+static int
issignal(td)
struct thread *td;
{
==== //depot/projects/hammer/sys/kern/kern_subr.c#5 (text+ko) ====
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_subr.c 8.3 (Berkeley) 1/21/94
- * $FreeBSD: src/sys/kern/kern_subr.c,v 1.73 2003/03/25 20:13:24 jhb Exp $
+ * $FreeBSD: src/sys/kern/kern_subr.c,v 1.74 2003/05/05 21:27:29 jhb Exp $
*/
#include "opt_zero.h"
@@ -185,9 +185,9 @@
n -= cnt;
}
out:
- if (td) {
+ if (td && save == 0) {
mtx_lock_spin(&sched_lock);
- td->td_flags = (td->td_flags & ~TDF_DEADLKTREAT) | save;
+ td->td_flags &= ~TDF_DEADLKTREAT;
mtx_unlock_spin(&sched_lock);
}
return (error);
==== //depot/projects/hammer/sys/kern/kern_synch.c#15 (text+ko) ====
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_synch.c 8.9 (Berkeley) 5/19/95
- * $FreeBSD: src/sys/kern/kern_synch.c,v 1.220 2003/05/01 17:05:24 jhb Exp $
+ * $FreeBSD: src/sys/kern/kern_synch.c,v 1.221 2003/05/05 21:12:36 jhb Exp $
*/
#include "opt_ddb.h"
@@ -467,9 +467,7 @@
p = td->td_proc; /* XXX */
KASSERT(!TD_ON_RUNQ(td), ("mi_switch: called by old code"));
#ifdef INVARIANTS
- if (!TD_ON_LOCK(td) &&
- !TD_ON_RUNQ(td) &&
- !TD_IS_RUNNING(td))
+ if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td))
mtx_assert(&Giant, MA_NOTOWNED);
#endif
KASSERT(td->td_critnest == 1,
==== //depot/projects/hammer/sys/kern/uipc_syscalls.c#7 (text+ko) ====
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94
- * $FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.145 2003/03/31 06:25:42 alc Exp $
+ * $FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.146 2003/05/05 20:33:37 dwmalone Exp $
*/
#include "opt_compat.h"
@@ -619,47 +619,18 @@
register struct msghdr *mp;
int flags;
{
- struct uio auio;
- register struct iovec *iov;
- register int i;
struct mbuf *control;
- struct sockaddr *to = NULL;
- int len, error;
- struct socket *so;
-#ifdef KTRACE
- struct iovec *ktriov = NULL;
- struct uio ktruio;
- int iovlen;
-#endif
+ struct sockaddr *to;
+ int error;
- if ((error = fgetsock(td, s, &so, NULL)) != 0)
- return (error);
-
-#ifdef MAC
- error = mac_check_socket_send(td->td_ucred, so);
- if (error)
- goto bad;
-#endif
-
- auio.uio_iov = mp->msg_iov;
- auio.uio_iovcnt = mp->msg_iovlen;
- auio.uio_segflg = UIO_USERSPACE;
- auio.uio_rw = UIO_WRITE;
- auio.uio_td = td;
- auio.uio_offset = 0; /* XXX */
- auio.uio_resid = 0;
- iov = mp->msg_iov;
- for (i = 0; i < mp->msg_iovlen; i++, iov++) {
- if ((auio.uio_resid += iov->iov_len) < 0) {
- error = EINVAL;
- goto bad;
- }
- }
- if (mp->msg_name) {
+ if (mp->msg_name != NULL) {
error = getsockaddr(&to, mp->msg_name, mp->msg_namelen);
if (error)
- goto bad;
- }
+ return error;
+ mp->msg_name = to;
+ } else
+ to = NULL;
+
if (mp->msg_control) {
if (mp->msg_controllen < sizeof(struct cmsghdr)
#ifdef COMPAT_OLDSOCK
@@ -690,7 +661,59 @@
}
#endif
} else {
- control = 0;
+ control = NULL;
+ }
+
+ error = kern_sendit(td, s, mp, flags, control);
+
+bad:
+ if (to)
+ FREE(to, M_SONAME);
+ return (error);
+}
+
+int
+kern_sendit(td, s, mp, flags, control)
+ struct thread *td;
+ int s;
+ struct msghdr *mp;
+ int flags;
+ struct mbuf *control;
+{
+ struct uio auio;
+ struct iovec *iov;
+ struct socket *so;
+ int i;
+ int len, error;
+#ifdef KTRACE
+ struct iovec *ktriov = NULL;
+ struct uio ktruio;
+ int iovlen;
+#endif
+
+ mtx_lock(&Giant);
+ if ((error = fgetsock(td, s, &so, NULL)) != 0)
+ goto bad2;
+
+#ifdef MAC
+ error = mac_check_socket_send(td->td_ucred, so);
+ if (error)
+ goto bad;
+#endif
+
+ auio.uio_iov = mp->msg_iov;
+ auio.uio_iovcnt = mp->msg_iovlen;
+ auio.uio_segflg = UIO_USERSPACE;
+ auio.uio_rw = UIO_WRITE;
+ auio.uio_td = td;
+ auio.uio_offset = 0; /* XXX */
+ auio.uio_resid = 0;
+ iov = mp->msg_iov;
+ for (i = 0; i < mp->msg_iovlen; i++, iov++) {
+ if ((auio.uio_resid += iov->iov_len) < 0) {
+ error = EINVAL;
+ goto bad;
+ }
}
#ifdef KTRACE
if (KTRPOINT(td, KTR_GENIO)) {
@@ -701,8 +724,8 @@
}
#endif
len = auio.uio_resid;
- error = so->so_proto->pr_usrreqs->pru_sosend(so, to, &auio, 0, control,
- flags, td);
+ error = so->so_proto->pr_usrreqs->pru_sosend(so, mp->msg_name, &auio,
+ 0, control, flags, td);
if (error) {
if (auio.uio_resid != len && (error == ERESTART ||
error == EINTR || error == EWOULDBLOCK))
@@ -728,8 +751,8 @@
#endif
bad:
fputsock(so);
- if (to)
- FREE(to, M_SONAME);
+bad2:
+ mtx_unlock(&Giant);
return (error);
}
@@ -762,9 +785,7 @@
#endif
aiov.iov_base = uap->buf;
aiov.iov_len = uap->len;
- mtx_lock(&Giant);
error = sendit(td, uap->s, &msg, uap->flags);
- mtx_unlock(&Giant);
return (error);
}
@@ -794,9 +815,7 @@
aiov.iov_len = uap->len;
msg.msg_control = 0;
msg.msg_flags = 0;
- mtx_lock(&Giant);
error = sendit(td, uap->s, &msg, uap->flags);
- mtx_unlock(&Giant);
return (error);
}
@@ -816,7 +835,6 @@
struct iovec aiov[UIO_SMALLIOV], *iov;
int error;
- mtx_lock(&Giant);
error = copyin(uap->msg, &msg, sizeof (struct omsghdr));
if (error)
goto done2;
@@ -842,7 +860,6 @@
if (iov != aiov)
FREE(iov, M_IOV);
done2:
- mtx_unlock(&Giant);
return (error);
}
#endif
@@ -863,7 +880,6 @@
struct iovec aiov[UIO_SMALLIOV], *iov;
int error;
- mtx_lock(&Giant);
error = copyin(uap->msg, &msg, sizeof (msg));
if (error)
goto done2;
@@ -891,7 +907,6 @@
if (iov != aiov)
FREE(iov, M_IOV);
done2:
- mtx_unlock(&Giant);
return (error);
}
==== //depot/projects/hammer/sys/sys/signalvar.h#5 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)signalvar.h 8.6 (Berkeley) 2/19/95
- * $FreeBSD: src/sys/sys/signalvar.h,v 1.59 2003/04/30 19:57:21 jhb Exp $
+ * $FreeBSD: src/sys/sys/signalvar.h,v 1.60 2003/05/05 21:16:28 jhb Exp $
*/
#ifndef _SYS_SIGNALVAR_H_
@@ -238,7 +238,6 @@
int cursig(struct thread *td);
void execsigs(struct proc *p);
void gsignal(int pgid, int sig);
-int issignal(struct thread *p);
void killproc(struct proc *p, char *why);
void pgsigio(struct sigio **, int signum, int checkctty);
void pgsignal(struct pgrp *pgrp, int sig, int checkctty);
==== //depot/projects/hammer/sys/sys/syscallsubr.h#6 (text+ko) ====
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/sys/syscallsubr.h,v 1.8 2003/05/05 09:22:58 mbr Exp $
+ * $FreeBSD: src/sys/sys/syscallsubr.h,v 1.9 2003/05/05 20:33:38 dwmalone Exp $
*/
#ifndef _SYS_SYSCALLSUBR_H_
@@ -32,6 +32,8 @@
#include <sys/uio.h>
struct sockaddr;
+struct msghdr;
+struct mbuf;
int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg,
u_int buflen);
@@ -70,6 +72,8 @@
int kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg);
int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou,
fd_set *fd_ex, struct timeval *tvp);
+int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags,
+ struct mbuf *control);
int kern_shmat(struct thread *td, int shmid, const void *shmaddr,
int shmflg, int wantrem);
int kern_shmctl(struct thread *td, int shmid, int cmd, void *buf,
==== //depot/projects/hammer/usr.sbin/newsyslog/newsyslog.c#7 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.sbin/newsyslog/newsyslog.c,v 1.68 2003/05/03 21:06:38 obrien Exp $");
+__FBSDID("$FreeBSD: src/usr.sbin/newsyslog/newsyslog.c,v 1.69 2003/05/05 22:27:37 gad Exp $");
#define OSF
#ifndef COMPRESS_POSTFIX
@@ -155,6 +155,7 @@
* range 0 to 255, plus EOF. Define wrappers which can take
* values of type 'char', either signed or unsigned.
*/
+#define isdigitch(Anychar) isdigit(((int) Anychar) & 255)
#define isprintch(Anychar) isprint(((int) Anychar) & 255)
#define isspacech(Anychar) isspace(((int) Anychar) & 255)
#define tolowerch(Anychar) tolower(((int) Anychar) & 255)
@@ -949,10 +950,15 @@
errx(1, "malformed line (missing fields):\n%s",
errline);
*parse = '\0';
- if (isdigit(*q))
+ if (isdigitch(*q))
working->size = atoi(q);
- else
+ else if (strcmp(q,"*") == 0)
+ working->size = -1;
+ else {
+ warnx("Invalid value of '%s' for 'size' in line:\n%s",
+ q, errline);
working->size = -1;
+ }
working->flags = 0;
q = parse = missing_field(sob(++parse), errline);
More information about the p4-projects
mailing list