PERFORCE change 19999 for review

Robert Watson rwatson at freebsd.org
Wed Oct 23 23:41:12 GMT 2002


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

Change 19999 by rwatson at rwatson_tislabs on 2002/10/23 16:41:03

	Integ FreeBSD tree into TrustedBSD base: loop back a variety of
	MAC-related changes, including the userland utilities, some
	library changes (libutil), etc.

Affected files ...

.. //depot/projects/trustedbsd/base/bin/cat/cat.c#8 integrate
.. //depot/projects/trustedbsd/base/bin/df/df.c#11 integrate
.. //depot/projects/trustedbsd/base/bin/ls/lomac.c#7 integrate
.. //depot/projects/trustedbsd/base/bin/ls/lomac.h#3 integrate
.. //depot/projects/trustedbsd/base/bin/ls/print.c#10 integrate
.. //depot/projects/trustedbsd/base/contrib/groff/tmac/troffrc#5 integrate
.. //depot/projects/trustedbsd/base/contrib/openpam/lib/openpam_ttyconv.c#8 integrate
.. //depot/projects/trustedbsd/base/crypto/kerberosIV/kadmin/kadm_ser_wrap.c#2 integrate
.. //depot/projects/trustedbsd/base/gnu/usr.bin/groff/src/roff/groff/Makefile#4 integrate
.. //depot/projects/trustedbsd/base/gnu/usr.bin/groff/tmac/Makefile#6 integrate
.. //depot/projects/trustedbsd/base/include/pthread_np.h#4 integrate
.. //depot/projects/trustedbsd/base/include/stdlib.h#13 integrate
.. //depot/projects/trustedbsd/base/kerberos5/include/version.h#5 integrate
.. //depot/projects/trustedbsd/base/kerberosIV/include/version.h#2 integrate
.. //depot/projects/trustedbsd/base/lib/libc/gen/getbsize.3#2 integrate
.. //depot/projects/trustedbsd/base/lib/libc/gen/getbsize.c#3 integrate
.. //depot/projects/trustedbsd/base/lib/libc/net/name6.c#7 integrate
.. //depot/projects/trustedbsd/base/lib/libc/string/strcpy.3#8 integrate
.. //depot/projects/trustedbsd/base/lib/libc/string/strerror.3#5 integrate
.. //depot/projects/trustedbsd/base/lib/libc/string/wcschr.c#5 integrate
.. //depot/projects/trustedbsd/base/lib/libc/string/wcscmp.c#5 integrate
.. //depot/projects/trustedbsd/base/lib/libc/string/wcsncmp.c#5 integrate
.. //depot/projects/trustedbsd/base/lib/libc/string/wcsncpy.c#6 integrate
.. //depot/projects/trustedbsd/base/lib/libc/string/wcsrchr.c#5 integrate
.. //depot/projects/trustedbsd/base/lib/libc/sys/aio_cancel.2#2 integrate
.. //depot/projects/trustedbsd/base/lib/libc/sys/aio_error.2#2 integrate
.. //depot/projects/trustedbsd/base/lib/libc/sys/aio_read.2#2 integrate
.. //depot/projects/trustedbsd/base/lib/libc/sys/aio_return.2#2 integrate
.. //depot/projects/trustedbsd/base/lib/libc/sys/aio_suspend.2#2 integrate
.. //depot/projects/trustedbsd/base/lib/libc/sys/aio_waitcomplete.2#2 integrate
.. //depot/projects/trustedbsd/base/lib/libc/sys/aio_write.2#2 integrate
.. //depot/projects/trustedbsd/base/lib/libc_r/uthread/pthread_private.h#10 integrate
.. //depot/projects/trustedbsd/base/lib/libdisk/Makefile#4 integrate
.. //depot/projects/trustedbsd/base/lib/libdisk/blocks.c#4 integrate
.. //depot/projects/trustedbsd/base/lib/libdisk/chunk.c#6 integrate
.. //depot/projects/trustedbsd/base/lib/libdisk/create_chunk.c#10 integrate
.. //depot/projects/trustedbsd/base/lib/libdisk/disk.c#11 integrate
.. //depot/projects/trustedbsd/base/lib/libdisk/libdisk.h#7 integrate
.. //depot/projects/trustedbsd/base/lib/libdisk/tst01.c#4 integrate
.. //depot/projects/trustedbsd/base/lib/libdisk/write_alpha_disk.c#1 branch
.. //depot/projects/trustedbsd/base/lib/libdisk/write_disk.c#6 integrate
.. //depot/projects/trustedbsd/base/lib/libdisk/write_i386_disk.c#1 branch
.. //depot/projects/trustedbsd/base/lib/libdisk/write_pc98_disk.c#1 branch
.. //depot/projects/trustedbsd/base/lib/libufs/Makefile#2 integrate
.. //depot/projects/trustedbsd/base/lib/libufs/block.c#2 integrate
.. //depot/projects/trustedbsd/base/lib/libufs/error.c#1 branch
.. //depot/projects/trustedbsd/base/lib/libufs/libufs.h#3 integrate
.. //depot/projects/trustedbsd/base/lib/libufs/sblock.c#2 integrate
.. //depot/projects/trustedbsd/base/lib/libufs/type.c#3 integrate
.. //depot/projects/trustedbsd/base/lib/libutil/login_class.c#4 integrate
.. //depot/projects/trustedbsd/base/lib/msun/src/math.h#6 integrate
.. //depot/projects/trustedbsd/base/libexec/rtld-elf/map_object.c#2 integrate
.. //depot/projects/trustedbsd/base/libexec/rtld-elf/rtld.c#9 integrate
.. //depot/projects/trustedbsd/base/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#29 integrate
.. //depot/projects/trustedbsd/base/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#46 integrate
.. //depot/projects/trustedbsd/base/sbin/Makefile#9 integrate
.. //depot/projects/trustedbsd/base/sbin/dumpfs/dumpfs.c#7 integrate
.. //depot/projects/trustedbsd/base/sbin/gpt/map.c#2 integrate
.. //depot/projects/trustedbsd/base/sbin/ifconfig/Makefile#5 integrate
.. //depot/projects/trustedbsd/base/sbin/ifconfig/ifconfig.c#10 integrate
.. //depot/projects/trustedbsd/base/sbin/ifconfig/ifconfig.h#2 integrate
.. //depot/projects/trustedbsd/base/sbin/ifconfig/ifmac.c#1 branch
.. //depot/projects/trustedbsd/base/share/man/man7/firewall.7#5 integrate
.. //depot/projects/trustedbsd/base/share/man/man7/ports.7#5 integrate
.. //depot/projects/trustedbsd/base/share/man/man7/release.7#7 integrate
.. //depot/projects/trustedbsd/base/sys/conf/files#43 integrate
.. //depot/projects/trustedbsd/base/sys/conf/files.i386#20 integrate
.. //depot/projects/trustedbsd/base/sys/conf/majors#14 integrate
.. //depot/projects/trustedbsd/base/sys/dev/ata/ata-all.c#18 integrate
.. //depot/projects/trustedbsd/base/sys/dev/ata/atapi-all.h#8 integrate
.. //depot/projects/trustedbsd/base/sys/dev/ata/atapi-cam.c#6 integrate
.. //depot/projects/trustedbsd/base/sys/dev/firewire/sbp.c#3 integrate
.. //depot/projects/trustedbsd/base/sys/dev/ic/cd180.h#1 branch
.. //depot/projects/trustedbsd/base/sys/dev/rc/rc.c#1 branch
.. //depot/projects/trustedbsd/base/sys/dev/rc/rcreg.h#1 branch
.. //depot/projects/trustedbsd/base/sys/i386/conf/GENERIC.hints#3 integrate
.. //depot/projects/trustedbsd/base/sys/i386/conf/NOTES#25 integrate
.. //depot/projects/trustedbsd/base/sys/i386/include/speaker.h#2 integrate
.. //depot/projects/trustedbsd/base/sys/i386/isa/ic/cd180.h#2 delete
.. //depot/projects/trustedbsd/base/sys/i386/isa/pmtimer.c#2 integrate
.. //depot/projects/trustedbsd/base/sys/i386/isa/rc.c#7 delete
.. //depot/projects/trustedbsd/base/sys/i386/isa/rcreg.h#2 delete
.. //depot/projects/trustedbsd/base/sys/kern/imgact_elf.c#13 integrate
.. //depot/projects/trustedbsd/base/sys/kern/kern_mutex.c#19 integrate
.. //depot/projects/trustedbsd/base/sys/kern/subr_mchain.c#8 integrate
.. //depot/projects/trustedbsd/base/sys/modules/Makefile#30 integrate
.. //depot/projects/trustedbsd/base/sys/modules/mac_biba/Makefile#2 integrate
.. //depot/projects/trustedbsd/base/sys/modules/mac_ifoff/Makefile#2 integrate
.. //depot/projects/trustedbsd/base/sys/modules/mac_mls/Makefile#2 integrate
.. //depot/projects/trustedbsd/base/sys/modules/mac_none/Makefile#2 integrate
.. //depot/projects/trustedbsd/base/sys/modules/mac_test/Makefile#2 integrate
.. //depot/projects/trustedbsd/base/sys/modules/rc/Makefile#1 branch
.. //depot/projects/trustedbsd/base/sys/net/if_tun.c#10 integrate
.. //depot/projects/trustedbsd/base/sys/netinet/in.c#6 integrate
.. //depot/projects/trustedbsd/base/sys/netinet/ip_fw2.c#9 integrate
.. //depot/projects/trustedbsd/base/sys/pc98/conf/GENERIC.hints#3 integrate
.. //depot/projects/trustedbsd/base/sys/security/mac_biba/mac_biba.c#14 integrate
.. //depot/projects/trustedbsd/base/sys/security/mac_mls/mac_mls.c#13 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/conf/GENERIC#22 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/include/frame.h#7 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/include/reg.h#7 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/include/ucontext.h#3 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/sparc64/exception.S#9 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/sparc64/genassym.c#18 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/sparc64/intr_machdep.c#12 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/sparc64/machdep.c#22 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/sparc64/swtch.S#3 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/sparc64/tick.c#6 integrate
.. //depot/projects/trustedbsd/base/sys/sparc64/sparc64/trap.c#16 integrate
.. //depot/projects/trustedbsd/base/sys/sys/mac.h#13 integrate
.. //depot/projects/trustedbsd/base/sys/sys/signalvar.h#9 integrate
.. //depot/projects/trustedbsd/base/sys/sys/unistd.h#9 integrate
.. //depot/projects/trustedbsd/base/sys/ufs/ffs/ffs_softdep.c#15 integrate
.. //depot/projects/trustedbsd/base/usr.bin/du/du.c#7 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/arch.c#8 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/compat.c#7 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/cond.c#7 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/job.c#9 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/main.c#13 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/make.c#7 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/nonints.h#6 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/parse.c#11 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/str.c#6 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/suff.c#6 integrate
.. //depot/projects/trustedbsd/base/usr.bin/make/targ.c#6 integrate
.. //depot/projects/trustedbsd/base/usr.bin/su/su.1#4 integrate
.. //depot/projects/trustedbsd/base/usr.bin/su/su.c#11 integrate
.. //depot/projects/trustedbsd/base/usr.bin/systat/swap.c#4 integrate
.. //depot/projects/trustedbsd/base/usr.bin/xlint/lint1/Makefile#5 integrate
.. //depot/projects/trustedbsd/base/usr.sbin/Makefile#13 integrate
.. //depot/projects/trustedbsd/base/usr.sbin/getfmac/Makefile#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/getfmac/getfmac.8#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/getfmac/getfmac.c#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/getpmac/Makefile#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/getpmac/getpmac.c#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/pstat/pstat.c#5 integrate
.. //depot/projects/trustedbsd/base/usr.sbin/setfmac/Makefile#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/setfmac/setfmac.8#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/setfmac/setfmac.c#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/setpmac/Makefile#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/setpmac/setpmac.c#1 branch
.. //depot/projects/trustedbsd/base/usr.sbin/sysinstall/install.c#12 integrate

Differences ...

==== //depot/projects/trustedbsd/base/bin/cat/cat.c#8 (text+ko) ====

@@ -46,7 +46,7 @@
 #endif
 #endif /* not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/cat/cat.c,v 1.27 2002/07/31 16:50:21 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/cat/cat.c,v 1.28 2002/10/23 10:23:38 markm Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -71,7 +71,7 @@
 const char *filename;
 
 static void usage(void);
-static void scanfiles(char **argv, int cooked);
+static void scanfiles(char *argv[], int cooked);
 static void cook_cat(FILE *);
 static void raw_cat(int);
 
@@ -132,8 +132,8 @@
 	/* NOTREACHED */
 }
 
-void
-scanfiles(char **argv, int cooked)
+static void
+scanfiles(char *argv[], int cooked)
 {
 	int i = 0;
 	char *path;

==== //depot/projects/trustedbsd/base/bin/df/df.c#11 (text+ko) ====

@@ -48,7 +48,7 @@
 #endif
 #endif /* not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.43 2002/08/26 04:56:23 trhodes Exp $");
+__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.44 2002/10/23 22:09:05 markm Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -381,7 +381,8 @@
 prtstat(struct statfs *sfsp, struct maxwidths *mwp)
 {
 	static long blocksize;
-	static int headerlen, timesthrough;
+	static int timesthrough;
+	static size_t headerlen;
 	static const char *header;
 	long used, availblks, inodes;
 
@@ -392,7 +393,7 @@
 			mwp->total = mwp->used = mwp->avail = strlen(header);
 		} else {
 			header = getbsize(&headerlen, &blocksize);
-			mwp->total = imax(mwp->total, headerlen);
+			mwp->total = imax(mwp->total, (int)headerlen);
 		}
 		mwp->used = imax(mwp->used, strlen("Used"));
 		mwp->avail = imax(mwp->avail, strlen("Avail"));
@@ -441,7 +442,7 @@
 update_maxwidths(struct maxwidths *mwp, struct statfs *sfsp)
 {
 	static long blocksize;
-	int dummy;
+	size_t dummy;
 
 	if (blocksize == 0)
 		getbsize(&dummy, &blocksize);

==== //depot/projects/trustedbsd/base/bin/ls/lomac.c#7 (text+ko) ====

@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
- __FBSDID("$FreeBSD: src/bin/ls/lomac.c,v 1.8 2002/07/10 20:44:54 dillon Exp $");
+ __FBSDID("$FreeBSD: src/bin/ls/lomac.c,v 1.9 2002/10/23 10:15:44 markm Exp $");
 
 #include <sys/types.h>
 #include <security/lomac/lomacio.h>
@@ -106,7 +106,7 @@
  */
 
 char *
-get_lattr(FTSENT *ent)
+get_lattr(const FTSENT *ent)
 {
 	char *lattr;
 

==== //depot/projects/trustedbsd/base/bin/ls/lomac.h#3 (text+ko) ====

@@ -32,9 +32,9 @@
  * SUCH DAMAGE.
  *
  * $Id: lomac.h,v 1.3 2001/11/26 19:23:02 bfeldman Exp $
- * $FreeBSD: src/bin/ls/lomac.h,v 1.2 2002/03/14 21:51:00 rwatson Exp $
+ * $FreeBSD: src/bin/ls/lomac.h,v 1.3 2002/10/23 10:15:44 markm Exp $
  */
 
 void lomac_start(void);
 void lomac_stop(void);
-char *get_lattr(FTSENT *);
+char *get_lattr(const FTSENT *);

==== //depot/projects/trustedbsd/base/bin/ls/print.c#10 (text+ko) ====

@@ -40,7 +40,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/ls/print.c,v 1.59 2002/10/18 10:59:45 tjr Exp $");
+__FBSDID("$FreeBSD: src/bin/ls/print.c,v 1.60 2002/10/23 10:20:01 markm Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -65,7 +65,7 @@
 #include "extern.h"
 
 static int	printaname(FTSENT *, u_long, u_long);
-static void	printlink(FTSENT *);
+static void	printlink(const FTSENT *);
 static void	printtime(time_t);
 static int	printtype(u_int);
 static void	printsize(size_t, off_t);
@@ -95,7 +95,7 @@
 } unit_t;
 static unit_t unit_adjust(double *);
 
-static int unitp[] = {NONE, KILO, MEGA, GIGA, TERA, PETA};
+static unit_t unitp[] = {NONE, KILO, MEGA, GIGA, TERA, PETA};
 
 #ifdef COLORLS
 /* Most of these are taken from <sys/stat.h> */
@@ -522,7 +522,7 @@
 {
 	int i;
 	int j;
-	int len;
+	size_t len;
 	char c[2];
 	short legacy_warn = 0;
 
@@ -579,7 +579,7 @@
 #endif /* COLORLS */
 
 static void
-printlink(FTSENT *p)
+printlink(const FTSENT *p)
 {
 	int lnklen;
 	char name[MAXPATHLEN + 1];
@@ -624,18 +624,18 @@
  * especially on huge disks.
  *
  */
-unit_t
+static unit_t
 unit_adjust(double *val)
 {
 	double abval;
 	unit_t unit;
-	unsigned int unit_sz;
+	u_int unit_sz;
 
 	abval = fabs(*val);
 
-	unit_sz = abval ? ilogb(abval) / 10 : 0;
+	unit_sz = abval ? (u_int)ilogb(abval) / 10 : 0;
 
-	if (unit_sz >= UNIT_MAX) {
+	if (unit_sz >= (u_int)UNIT_MAX) {
 		unit = NONE;
 	} else {
 		unit = unitp[unit_sz];

==== //depot/projects/trustedbsd/base/contrib/groff/tmac/troffrc#5 (text+ko) ====

@@ -1,5 +1,5 @@
 .\" Startup file for troff.
-.\" $FreeBSD: src/contrib/groff/tmac/troffrc,v 1.12 2002/10/21 12:29:57 ru Exp $
+.\" $FreeBSD: src/contrib/groff/tmac/troffrc,v 1.13 2002/10/23 19:04:00 ru Exp $
 .
 .\" This is tested by pic.
 .nr 0p 0
@@ -45,7 +45,4 @@
 .
 .\}
 .
-.\" Disable SGR support in grotty(1).
-.if n .do output "x X tty: sgr 0
-.
 .\" Don't let blank lines creep in here.

==== //depot/projects/trustedbsd/base/contrib/openpam/lib/openpam_ttyconv.c#8 (text+ko) ====

@@ -31,8 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/base/contrib/openpam/lib/openpam_ttyconv.c#7 $
- * $FreeBSD$
+ * $P4: //depot/projects/trustedbsd/base/contrib/openpam/lib/openpam_ttyconv.c#8 $
  */
 
 #include <sys/types.h>

==== //depot/projects/trustedbsd/base/crypto/kerberosIV/kadmin/kadm_ser_wrap.c#2 (text+ko) ====

@@ -117,16 +117,25 @@
     u_char *retdat, *tmpdat;
     int retval, retlen;
 
-    if (strncmp(KADM_VERSTR, (char *)*dat, KADM_VERSIZE)) {
+    if (*dat_len < (KADM_VERSIZE + sizeof(u_int32_t))
+	|| strncmp(KADM_VERSTR, (char *)*dat, KADM_VERSIZE) != 0) {
 	errpkt(errdat, dat, dat_len, KADM_BAD_VER);
 	return KADM_BAD_VER;
     }
     in_len = KADM_VERSIZE;
     /* get the length */
-    if ((retc = stv_long(*dat, &r_len, in_len, *dat_len)) < 0)
+    if ((retc = stv_long(*dat, &r_len, in_len, *dat_len)) < 0 ||
+	(r_len > *dat_len - KADM_VERSIZE - sizeof(u_int32_t))) {
+	errpkt(errdat, dat, dat_len, KADM_LENGTH_ERROR);
 	return KADM_LENGTH_ERROR;
+    }
+    
     in_len += retc;
     authent.length = *dat_len - r_len - KADM_VERSIZE - sizeof(u_int32_t);
+    if (authent.length > MAX_KTXT_LEN) {
+	errpkt(errdat, dat, dat_len, KADM_LENGTH_ERROR);
+	return KADM_LENGTH_ERROR;
+    }
     memcpy(authent.dat, (char *)(*dat) + in_len, authent.length);
     authent.mbz = 0;
     /* service key should be set before here */

==== //depot/projects/trustedbsd/base/gnu/usr.bin/groff/src/roff/groff/Makefile#4 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/gnu/usr.bin/groff/src/roff/groff/Makefile,v 1.5 2002/10/21 03:21:50 obrien Exp $
+# $FreeBSD: src/gnu/usr.bin/groff/src/roff/groff/Makefile,v 1.6 2002/10/23 21:28:52 gallatin Exp $
 
 PROG_CXX=	groff
 SRCS=		groff.cc pipeline.c
@@ -6,10 +6,4 @@
 LDADD=		${LIBGROFF} -lm
 CLEANFILES=	${MAN}
 
-.if ${MACHINE_ARCH} == "alpha"
-#XXXX ld produces only one PT_LOAD segment when this binary
-#XXXX is linked dynamically, which confuses the rtld
-NOSHARED?=	yes
-.endif
-
 .include <bsd.prog.mk>

==== //depot/projects/trustedbsd/base/gnu/usr.bin/groff/tmac/Makefile#6 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/gnu/usr.bin/groff/tmac/Makefile,v 1.38 2002/10/13 12:22:57 ru Exp $
+# $FreeBSD: src/gnu/usr.bin/groff/tmac/Makefile,v 1.39 2002/10/23 19:04:00 ru Exp $
 
 TMACOWN?=	${BINOWN}
 TMACGRP?=	${BINGRP}
@@ -14,6 +14,7 @@
 MLINKS+=	groff_mdoc.7 mdoc.7 groff_mdoc.7 mdoc.samples.7
 
 CLEANFILES=	${MAN} ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/}
+CLEANFILES+=	troffrc-end.patched
 
 NORMALFILES=	mandoc.tmac andoc.tmac an-old.tmac \
 		me.tmac \
@@ -32,7 +33,7 @@
 		lbp.tmac \
 		html.tmac www.tmac \
 		eqnrc \
-		troffrc troffrc-end \
+		troffrc \
 		hyphen.us
 SPECIALFILES=	an.tmac man.tmac s.tmac ms.tmac
 STRIPFILES=	e.tmac doc.tmac mdoc.local
@@ -40,6 +41,7 @@
 		fr.ISO8859-1 ru.KOI8-R
 
 all: ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/}
+all: troffrc-end.patched
 
 .for f in ${MDOCFILES} ${STRIPFILES}
 $f-s: $f
@@ -53,6 +55,9 @@
 		${.ALLSRC} > ${.TARGET}
 .endfor
 
+troffrc-end.patched: troffrc-end
+	(cat ${.ALLSRC}; echo ".if n .do nop \X'tty: sgr 0'\c") > ${.TARGET}
+
 beforeinstall:
 	cd ${DIST_DIR}; \
 	    ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
@@ -61,6 +66,8 @@
 	    ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
 	    hyphen.ru ${DESTDIR}${TMACDIR}
 	cd ${.OBJDIR}
+	${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
+	    troffrc-end.patched ${DESTDIR}${TMACDIR}/troffrc-end
 .for f in ${STRIPFILES} ${SPECIALFILES}
 	${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
 	    $f-s ${DESTDIR}${TMACDIR}/$f

==== //depot/projects/trustedbsd/base/include/pthread_np.h#4 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/include/pthread_np.h,v 1.12 2002/05/24 04:35:55 deischen Exp $
+ * $FreeBSD: src/include/pthread_np.h,v 1.13 2002/10/22 17:11:49 fjoe Exp $
  */
 #ifndef _PTHREAD_NP_H_
 #define _PTHREAD_NP_H_
@@ -48,11 +48,11 @@
 int pthread_multi_np(void);
 int pthread_mutexattr_getkind_np(pthread_mutexattr_t);
 int pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);
-int pthread_resume_all_np(void);
+void pthread_resume_all_np(void);
 int pthread_resume_np(pthread_t);
 void pthread_set_name_np(pthread_t, const char *);
 int pthread_single_np(void);
-int pthread_suspend_all_np(void);
+void pthread_suspend_all_np(void);
 int pthread_suspend_np(pthread_t);
 int pthread_switch_add_np(pthread_switch_routine_t);
 int pthread_switch_delete_np(pthread_switch_routine_t);

==== //depot/projects/trustedbsd/base/include/stdlib.h#13 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
- * $FreeBSD: src/include/stdlib.h,v 1.44 2002/09/21 22:05:37 bde Exp $
+ * $FreeBSD: src/include/stdlib.h,v 1.45 2002/10/23 14:18:07 markm Exp $
  */
 
 #ifndef _STDLIB_H_
@@ -227,7 +227,7 @@
 	 arc4random(void);
 void	 arc4random_addrandom(unsigned char *dat, int datlen);
 void	 arc4random_stir(void);
-char	*getbsize(int *, long *);
+char	*getbsize(size_t *, long *);
 					/* getcap(3) functions */
 char	*cgetcap(char *, const char *, int);
 int	 cgetclose(void);

==== //depot/projects/trustedbsd/base/kerberos5/include/version.h#5 (text+ko) ====

@@ -1,5 +1,5 @@
-/* $FreeBSD: src/kerberos5/include/version.h,v 1.8 2002/09/19 12:12:26 nectar Exp $ */
-const char *krb4_long_version = "@(#)$Version: krb4-1.0.5 (FreeBSD) $";
-const char *krb4_version = "krb4-1.0.5";
-const char *heimdal_long_version = "@(#)$Version: Heimdal 0.5 (FreeBSD) $";
-const char *heimdal_version = "Heimdal 0.5";
+/* $FreeBSD: src/kerberos5/include/version.h,v 1.9 2002/10/23 06:12:21 assar Exp $ */
+const char *krb4_long_version = "@(#)$Version: krb4-1.0.5fb1 (FreeBSD) $";
+const char *krb4_version = "krb4-1.0.5fb1";
+const char *heimdal_long_version = "@(#)$Version: Heimdal 0.5fb1 (FreeBSD) $";
+const char *heimdal_version = "Heimdal 0.5fb1";

==== //depot/projects/trustedbsd/base/kerberosIV/include/version.h#2 (text+ko) ====

@@ -1,5 +1,5 @@
-/* $FreeBSD: src/kerberosIV/include/version.h,v 1.3 2000/01/09 08:59:34 markm Exp $ */
-char *krb4_long_version = "@(#)$Version: krb4-1.0 by root on greenpeace.grondar.za (i386-unknown-freebsd4.0) Sat Jan  8 19:34:57 SAST 2000 $";
-char *krb4_version = "krb4-1.0";
-char *heimdal_long_version = "@(#)$Version: heimdal-0.1l by root on greenpeace.grondar.za (i386-unknown-freebsd4.0) Sat Jan  8 20:56:02 SAST 2000 $";
-char *heimdal_version = "heimdal-0.1l";
+/* $FreeBSD: src/kerberosIV/include/version.h,v 1.4 2002/10/23 06:12:21 assar Exp $ */
+char *krb4_long_version = "@(#)$Version: krb4-1.0.5 (FreeBSD) $";
+char *krb4_version = "krb4-1.0.5";
+char *heimdal_long_version = "@(#)$Version: Heimdal 0.5fb1 (FreeBSD) $";
+char *heimdal_version = "Heimdal 0.5fb1";

==== //depot/projects/trustedbsd/base/lib/libc/gen/getbsize.3#2 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)getbsize.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/gen/getbsize.3,v 1.8 2001/10/01 16:08:50 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/getbsize.3,v 1.9 2002/10/23 14:18:07 markm Exp $
 .\"
 .Dd June 4, 1993
 .Dt GETBSIZE 3
@@ -43,7 +43,7 @@
 .Sh SYNOPSIS
 .In stdlib.h
 .Ft char *
-.Fn getbsize "int *headerlenp" "long *blocksizep"
+.Fn getbsize "size_t *headerlenp" "long *blocksizep"
 .Sh DESCRIPTION
 The
 .Fn getbsize

==== //depot/projects/trustedbsd/base/lib/libc/gen/getbsize.c#3 (text+ko) ====

@@ -35,7 +35,7 @@
 static char sccsid[] = "@(#)getbsize.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/getbsize.c,v 1.4 2002/03/22 21:52:05 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/getbsize.c,v 1.5 2002/10/23 14:18:07 markm Exp $");
 
 #include <err.h>
 #include <stdio.h>
@@ -44,12 +44,13 @@
 
 char *
 getbsize(headerlenp, blocksizep)
-	int *headerlenp;
+	size_t *headerlenp;
 	long *blocksizep;
 {
 	static char header[20];
 	long n, max, mul, blocksize;
-	char *ep, *p, *form;
+	char *ep, *p;
+	const char *form;
 
 #define	KB	(1024L)
 #define	MB	(1024L * 1024L)

==== //depot/projects/trustedbsd/base/lib/libc/net/name6.c#7 (text+ko) ====

@@ -94,7 +94,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.29 2002/10/06 08:43:35 ume Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.30 2002/10/23 10:45:09 ume Exp $");
 
 #include "namespace.h"
 #include <sys/param.h>
@@ -1529,6 +1529,7 @@
 	int af;
 	int *errp;
 	int n;
+	int err;
 	struct hostent *hp;
 	u_char c, *cp;
 	char *bp;
@@ -1540,6 +1541,9 @@
 	querybuf *buf;
 	char qbuf[MAXDNAME+1];
 	char *hlist[2];
+	char *tld6[] = { "ip6.arpa", "ip6.int", NULL };
+	char *tld4[] = { "in-addr.arpa", NULL };
+	char **tld;
 
 	addr = va_arg(ap, const void *);
 	addrlen = va_arg(ap, int);
@@ -1554,6 +1558,19 @@
 		return NS_NOTFOUND;
 #endif
 
+	switch (af) {
+#ifdef INET6
+	case AF_INET6:
+		tld = tld6;
+		break;
+#endif
+	case AF_INET:
+		tld = tld4;
+		break;
+	default:
+		return NS_NOTFOUND;
+	}
+
 	if ((_res.options & RES_INIT) == 0) {
 		if (res_init() < 0) {
 			*errp = h_errno;
@@ -1566,67 +1583,76 @@
 	hbuf.h_length = addrlen;
 	na = 0;
 
-	/* XXX assumes that MAXDNAME is big enough */
-	n = 0;
-	bp = qbuf;
-	cp = (u_char *)addr+addrlen-1;
-	switch (af) {
-#ifdef INET6
-	case AF_INET6:
-		for (; n < addrlen; n++, cp--) {
-			c = *cp;
-			*bp++ = hex[c & 0xf];
-			*bp++ = '.';
-			*bp++ = hex[c >> 4];
-			*bp++ = '.';
-		}
-		strcpy(bp, "ip6.int");
-		break;
-#endif
-	default:
-		for (; n < addrlen; n++, cp--) {
-			c = *cp;
-			if (c >= 100)
-				*bp++ = '0' + c / 100;
-			if (c >= 10)
-				*bp++ = '0' + (c % 100) / 10;
-			*bp++ = '0' + c % 10;
-			*bp++ = '.';
-		}
-		strcpy(bp, "in-addr.arpa");
-		break;
-	}
-
 	buf = malloc(sizeof(*buf));
 	if (buf == NULL) {
 		*errp = NETDB_INTERNAL;
 		return NS_UNAVAIL;
 	}
+	err = NS_SUCCESS;
+	for (/* nothing */; *tld; tld++) {
+		/*
+		 * XXX assumes that MAXDNAME is big enough - error checks
+		 * has been made by callers
+		 */
+		n = 0;
+		bp = qbuf;
+		cp = (u_char *)addr+addrlen-1;
+		switch (af) {
+#ifdef INET6
+		case AF_INET6:
+			for (; n < addrlen; n++, cp--) {
+				c = *cp;
+				*bp++ = hex[c & 0xf];
+				*bp++ = '.';
+				*bp++ = hex[c >> 4];
+				*bp++ = '.';
+			}
+			strcpy(bp, *tld);
+			break;
+#endif
+		case AF_INET:
+			for (; n < addrlen; n++, cp--) {
+				c = *cp;
+				if (c >= 100)
+					*bp++ = '0' + c / 100;
+				if (c >= 10)
+					*bp++ = '0' + (c % 100) / 10;
+				*bp++ = '0' + c % 10;
+				*bp++ = '.';
+			}
+			strcpy(bp, *tld);
+			break;
+		}
 
-	n = res_query(qbuf, C_IN, T_PTR, buf->buf, sizeof buf->buf);
-	if (n < 0) {
-		free(buf);
-		*errp = h_errno;
-		return NS_UNAVAIL;
-	} else if (n > sizeof(buf->buf)) {
-		free(buf);
+		n = res_query(qbuf, C_IN, T_PTR, buf->buf, sizeof buf->buf);
+		if (n < 0) {
+			*errp = h_errno;
+			err = NS_UNAVAIL;
+			continue;
+		} else if (n > sizeof(buf->buf)) {
 #if 0
-		errno = ERANGE; /* XXX is it OK to set errno here? */
+			errno = ERANGE; /* XXX is it OK to set errno here? */
 #endif
-		*errp = NETDB_INTERNAL;
-		return NS_UNAVAIL;
+			*errp = NETDB_INTERNAL;
+			err = NS_UNAVAIL;
+			continue;
+		}
+		hp = getanswer(buf, n, qbuf, T_PTR, &hbuf, errp);
+		if (!hp) {
+			err = NS_NOTFOUND;
+			continue;
+		}
+		free(buf);
+		hbuf.h_addrtype = af;
+		hbuf.h_length = addrlen;
+		hbuf.h_addr_list = hlist;
+		hlist[0] = (char *)addr;
+		hlist[1] = NULL;
+		*(struct hostent **)rval = _hpcopy(&hbuf, errp);
+		return NS_SUCCESS;
 	}
-	hp = getanswer(buf, n, qbuf, T_PTR, &hbuf, errp);
 	free(buf);
-	if (!hp)
-		return NS_NOTFOUND;
-	hbuf.h_addrtype = af;
-	hbuf.h_length = addrlen;
-	hbuf.h_addr_list = hlist;
-	hlist[0] = (char *)addr;
-	hlist[1] = NULL;
-	*(struct hostent **)rval = _hpcopy(&hbuf, errp);
-	return NS_SUCCESS;
+	return err;
 }
 
 static void

==== //depot/projects/trustedbsd/base/lib/libc/string/strcpy.3#8 (text+ko) ====

@@ -34,7 +34,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)strcpy.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/string/strcpy.3,v 1.20 2002/10/10 14:16:08 robert Exp $
+.\" $FreeBSD: src/lib/libc/string/strcpy.3,v 1.21 2002/10/23 08:55:14 des Exp $
 .\"
 .Dd August 9, 2001
 .Dt STRCPY 3
@@ -54,36 +54,41 @@
 .Fn strncpy "char * restrict dst" "const char * restrict src" "size_t len"
 .Sh DESCRIPTION
 The
-.Fn stpcpy ,
+.Fn stpcpy
+and
 .Fn strcpy
-function
-copies the string
+functions
+copy the string
 .Fa src
 to
 .Fa dst
 (including the terminating
 .Ql \e0
-character).
+character.)
 .Pp
 The
 .Fn strncpy
-function copies not more than
+function copies at most
 .Fa len
 characters from
 .Fa src
 into
-.Fa dst ,
-appending
-.Ql \e0
-characters if
+.Fa dst .
+If
 .Fa src
 is less than
 .Fa len
-characters long, and
+characters long,
+the remainder of
+.Fa dst
+is filled with
+.Ql \e0
+characters.
+Otherwise,
+.Fa dst
+is
 .Em not
-terminating
-.Fa dst
-otherwise.
+terminated.
 .Sh RETURN VALUES
 The
 .Fn strcpy

==== //depot/projects/trustedbsd/base/lib/libc/string/strerror.3#5 (text+ko) ====

@@ -34,9 +34,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)strerror.3	8.1 (Berkeley) 6/9/93
-.\" $FreeBSD: src/lib/libc/string/strerror.3,v 1.18 2002/01/31 13:32:14 jedgar Exp $
+.\" $FreeBSD: src/lib/libc/string/strerror.3,v 1.19 2002/10/23 10:16:21 tjr Exp $
 .\"
-.Dd November 26, 2001
+.Dd October 22, 2002
 .Dt STRERROR 3
 .Os
 .Sh NAME
@@ -150,6 +150,14 @@
 .Sh SEE ALSO
 .Xr intro 2 ,
 .Xr psignal 3
+.Sh STANDARDS
+The
+.Fn perror ,
+.Fn strerror
+and
+.Fn strerror_r
+functions conform to
+.St -p1003.1-2001 .
 .Sh HISTORY
 The
 .Fn strerror
@@ -169,6 +177,14 @@
 function will return its result in a static buffer which
 may be overwritten by subsequent calls.
 .Pp
+The
+.Fn perror
+function is implemented in terms of
+.Fn strerror ,
+hence it uses the same static buffer.
+This behaviour is forbidden by
+.St -isoC-99 .
+.Pp
 Programs that use the deprecated
 .Va sys_errlist
 variable often fail to compile because they declare it

==== //depot/projects/trustedbsd/base/lib/libc/string/wcschr.c#5 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c)1999 Citrus Project,
+ * Copyright (c) 2002 Tim J. Robbins
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -22,34 +22,20 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
- *	citrus Id: wcschr.c,v 1.2 2000/12/21 05:07:25 itojun Exp
  */
 
 #include <sys/cdefs.h>
-#if 0
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: wcschr.c,v 1.1 2000/12/23 23:14:36 itojun Exp $");
-#endif /* LIBC_SCCS and not lint */
-#endif
-__FBSDID("$FreeBSD: src/lib/libc/string/wcschr.c,v 1.6 2002/09/21 00:29:23 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/string/wcschr.c,v 1.7 2002/10/23 10:47:47 tjr Exp $");
 
 #include <wchar.h>
 
 wchar_t *
-wcschr(s, c)
-	const wchar_t *s;
-	wchar_t c;
+wcschr(const wchar_t *s, wchar_t c)
 {
-	const wchar_t *p;
 
-	p = s;
-	while (*p) {
-		if (*p == c) {
-			/* LINTED interface specification */
-			return (wchar_t *)p;
-		}
-		p++;
-	}
-	return NULL;
+	while (*s != c && *s != L'\0')
+		s++;
+	if (*s == c)
+		return ((wchar_t *)s);
+	return (NULL);
 }

==== //depot/projects/trustedbsd/base/lib/libc/string/wcscmp.c#5 (text+ko) ====

@@ -38,10 +38,10 @@
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)strcmp.c	8.1 (Berkeley) 6/4/93";
 #if 0
-__RCSID("$NetBSD$");
+__RCSID("$NetBSD: wcscmp.c,v 1.3 2001/01/05 12:13:12 itojun Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
-__FBSDID("$FreeBSD: src/lib/libc/string/wcscmp.c,v 1.6 2002/09/21 00:29:23 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/string/wcscmp.c,v 1.7 2002/10/23 11:08:40 tjr Exp $");
 
 #include <wchar.h>
 

==== //depot/projects/trustedbsd/base/lib/libc/string/wcsncmp.c#5 (text+ko) ====

@@ -35,10 +35,10 @@
 #if 0
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)strncmp.c	8.1 (Berkeley) 6/4/93";
-__RCSID("$NetBSD$");
+__RCSID("$NetBSD: wcsncmp.c,v 1.3 2001/01/05 12:13:13 itojun Exp $");
 #endif /* LIBC_SCCS and not lint */
 #endif
-__FBSDID("$FreeBSD: src/lib/libc/string/wcsncmp.c,v 1.6 2002/09/21 00:29:23 tjr Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/string/wcsncmp.c,v 1.7 2002/10/23 11:08:40 tjr Exp $");
 
 #include <wchar.h>
 

==== //depot/projects/trustedbsd/base/lib/libc/string/wcsncpy.c#6 (text+ko) ====

@@ -1,6 +1,9 @@
 /*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -10,11 +13,18 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
  *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

>>> TRUNCATED FOR MAIL (1000 lines) <<<
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list