From owner-p4-projects Wed Oct 23 16:50:41 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 00BF137B404; Wed, 23 Oct 2002 16:50:06 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9ACFB37B401 for ; Wed, 23 Oct 2002 16:50:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89BCF43E6E for ; Wed, 23 Oct 2002 16:50:05 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9NNnOmV043130 for ; Wed, 23 Oct 2002 16:49:24 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9NNnNrg043112 for perforce@freebsd.org; Wed, 23 Oct 2002 16:49:23 -0700 (PDT) Date: Wed, 23 Oct 2002 16:49:23 -0700 (PDT) Message-Id: <200210232349.g9NNnNrg043112@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 20000 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=20000 Change 20000 by rwatson@rwatson_tislabs on 2002/10/23 16:48:45 Loop back more MAC stuff (et al) from TrustedBSD base to TrustedBSD MAC tree, including user MAC utilities, login.conf processing in libutil, su, ifconfig, and more. Affected files ... .. //depot/projects/trustedbsd/mac/bin/cat/cat.c#8 integrate .. //depot/projects/trustedbsd/mac/bin/df/df.c#11 integrate .. //depot/projects/trustedbsd/mac/bin/ls/lomac.c#8 branch .. //depot/projects/trustedbsd/mac/bin/ls/lomac.h#4 branch .. //depot/projects/trustedbsd/mac/bin/ls/print.c#11 integrate .. //depot/projects/trustedbsd/mac/contrib/groff/tmac/troffrc#5 integrate .. //depot/projects/trustedbsd/mac/contrib/openpam/lib/openpam_ttyconv.c#8 integrate .. //depot/projects/trustedbsd/mac/crypto/kerberosIV/kadmin/kadm_ser_wrap.c#2 integrate .. //depot/projects/trustedbsd/mac/gnu/usr.bin/groff/src/roff/groff/Makefile#4 integrate .. //depot/projects/trustedbsd/mac/gnu/usr.bin/groff/tmac/Makefile#5 integrate .. //depot/projects/trustedbsd/mac/include/pthread_np.h#4 integrate .. //depot/projects/trustedbsd/mac/include/stdlib.h#13 integrate .. //depot/projects/trustedbsd/mac/kerberos5/include/version.h#5 integrate .. //depot/projects/trustedbsd/mac/kerberosIV/include/version.h#2 integrate .. //depot/projects/trustedbsd/mac/lib/libc/gen/getbsize.3#2 integrate .. //depot/projects/trustedbsd/mac/lib/libc/gen/getbsize.c#3 integrate .. //depot/projects/trustedbsd/mac/lib/libc/net/name6.c#7 integrate .. //depot/projects/trustedbsd/mac/lib/libc/string/strcpy.3#8 integrate .. //depot/projects/trustedbsd/mac/lib/libc/string/strerror.3#5 integrate .. //depot/projects/trustedbsd/mac/lib/libc/string/wcschr.c#4 integrate .. //depot/projects/trustedbsd/mac/lib/libc/string/wcscmp.c#4 integrate .. //depot/projects/trustedbsd/mac/lib/libc/string/wcsncmp.c#4 integrate .. //depot/projects/trustedbsd/mac/lib/libc/string/wcsncpy.c#5 integrate .. //depot/projects/trustedbsd/mac/lib/libc/string/wcsrchr.c#4 integrate .. //depot/projects/trustedbsd/mac/lib/libc/sys/aio_cancel.2#2 integrate .. //depot/projects/trustedbsd/mac/lib/libc/sys/aio_error.2#2 integrate .. //depot/projects/trustedbsd/mac/lib/libc/sys/aio_read.2#2 integrate .. //depot/projects/trustedbsd/mac/lib/libc/sys/aio_return.2#2 integrate .. //depot/projects/trustedbsd/mac/lib/libc/sys/aio_suspend.2#2 integrate .. //depot/projects/trustedbsd/mac/lib/libc/sys/aio_waitcomplete.2#2 integrate .. //depot/projects/trustedbsd/mac/lib/libc/sys/aio_write.2#2 integrate .. //depot/projects/trustedbsd/mac/lib/libc_r/uthread/pthread_private.h#10 integrate .. //depot/projects/trustedbsd/mac/lib/libdisk/Makefile#4 integrate .. //depot/projects/trustedbsd/mac/lib/libdisk/blocks.c#4 integrate .. //depot/projects/trustedbsd/mac/lib/libdisk/chunk.c#6 integrate .. //depot/projects/trustedbsd/mac/lib/libdisk/create_chunk.c#9 integrate .. //depot/projects/trustedbsd/mac/lib/libdisk/disk.c#11 integrate .. //depot/projects/trustedbsd/mac/lib/libdisk/libdisk.h#7 integrate .. //depot/projects/trustedbsd/mac/lib/libdisk/tst01.c#4 integrate .. //depot/projects/trustedbsd/mac/lib/libdisk/write_alpha_disk.c#1 branch .. //depot/projects/trustedbsd/mac/lib/libdisk/write_disk.c#6 integrate .. //depot/projects/trustedbsd/mac/lib/libdisk/write_i386_disk.c#1 branch .. //depot/projects/trustedbsd/mac/lib/libdisk/write_pc98_disk.c#1 branch .. //depot/projects/trustedbsd/mac/lib/libufs/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/lib/libufs/block.c#2 integrate .. //depot/projects/trustedbsd/mac/lib/libufs/error.c#1 branch .. //depot/projects/trustedbsd/mac/lib/libufs/libufs.h#3 integrate .. //depot/projects/trustedbsd/mac/lib/libufs/sblock.c#2 integrate .. //depot/projects/trustedbsd/mac/lib/libufs/type.c#3 integrate .. //depot/projects/trustedbsd/mac/lib/libutil/login_class.c#10 integrate .. //depot/projects/trustedbsd/mac/lib/msun/src/math.h#6 integrate .. //depot/projects/trustedbsd/mac/libexec/rtld-elf/map_object.c#2 integrate .. //depot/projects/trustedbsd/mac/libexec/rtld-elf/rtld.c#9 integrate .. //depot/projects/trustedbsd/mac/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#26 integrate .. //depot/projects/trustedbsd/mac/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#39 integrate .. //depot/projects/trustedbsd/mac/sbin/Makefile#11 integrate .. //depot/projects/trustedbsd/mac/sbin/dumpfs/dumpfs.c#7 integrate .. //depot/projects/trustedbsd/mac/sbin/gpt/map.c#2 integrate .. //depot/projects/trustedbsd/mac/sbin/ifconfig/Makefile#6 integrate .. //depot/projects/trustedbsd/mac/sbin/ifconfig/ifconfig.c#12 integrate .. //depot/projects/trustedbsd/mac/sbin/ifconfig/ifconfig.h#4 integrate .. //depot/projects/trustedbsd/mac/sbin/ifconfig/ifmac.c#10 integrate .. //depot/projects/trustedbsd/mac/share/man/man7/firewall.7#5 integrate .. //depot/projects/trustedbsd/mac/share/man/man7/ports.7#5 integrate .. //depot/projects/trustedbsd/mac/share/man/man7/release.7#7 integrate .. //depot/projects/trustedbsd/mac/sys/conf/files#65 integrate .. //depot/projects/trustedbsd/mac/sys/conf/files.i386#18 integrate .. //depot/projects/trustedbsd/mac/sys/conf/majors#13 integrate .. //depot/projects/trustedbsd/mac/sys/dev/ata/ata-all.c#16 integrate .. //depot/projects/trustedbsd/mac/sys/dev/ata/atapi-all.h#8 integrate .. //depot/projects/trustedbsd/mac/sys/dev/ata/atapi-cam.c#5 integrate .. //depot/projects/trustedbsd/mac/sys/dev/firewire/sbp.c#3 integrate .. //depot/projects/trustedbsd/mac/sys/dev/ic/cd180.h#1 branch .. //depot/projects/trustedbsd/mac/sys/dev/rc/rc.c#1 branch .. //depot/projects/trustedbsd/mac/sys/dev/rc/rcreg.h#1 branch .. //depot/projects/trustedbsd/mac/sys/i386/conf/GENERIC.hints#3 integrate .. //depot/projects/trustedbsd/mac/sys/i386/conf/NOTES#26 integrate .. //depot/projects/trustedbsd/mac/sys/i386/include/speaker.h#2 integrate .. //depot/projects/trustedbsd/mac/sys/i386/isa/ic/cd180.h#2 delete .. //depot/projects/trustedbsd/mac/sys/i386/isa/pmtimer.c#2 integrate .. //depot/projects/trustedbsd/mac/sys/i386/isa/rc.c#7 delete .. //depot/projects/trustedbsd/mac/sys/i386/isa/rcreg.h#2 delete .. //depot/projects/trustedbsd/mac/sys/kern/imgact_elf.c#17 integrate .. //depot/projects/trustedbsd/mac/sys/kern/kern_mutex.c#17 integrate .. //depot/projects/trustedbsd/mac/sys/kern/subr_mchain.c#10 integrate .. //depot/projects/trustedbsd/mac/sys/modules/Makefile#46 integrate .. //depot/projects/trustedbsd/mac/sys/modules/mac_biba/Makefile#3 integrate .. //depot/projects/trustedbsd/mac/sys/modules/mac_ifoff/Makefile#3 integrate .. //depot/projects/trustedbsd/mac/sys/modules/mac_mls/Makefile#3 integrate .. //depot/projects/trustedbsd/mac/sys/modules/mac_none/Makefile#3 integrate .. //depot/projects/trustedbsd/mac/sys/modules/mac_test/Makefile#3 integrate .. //depot/projects/trustedbsd/mac/sys/modules/rc/Makefile#1 branch .. //depot/projects/trustedbsd/mac/sys/net/if_tun.c#14 integrate .. //depot/projects/trustedbsd/mac/sys/netinet/in.c#8 integrate .. //depot/projects/trustedbsd/mac/sys/netinet/ip_fw2.c#9 integrate .. //depot/projects/trustedbsd/mac/sys/pc98/conf/GENERIC.hints#3 integrate .. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#155 integrate .. //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#132 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/conf/GENERIC#21 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/include/frame.h#6 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/include/reg.h#7 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/include/ucontext.h#3 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/sparc64/exception.S#7 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/sparc64/genassym.c#16 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/sparc64/intr_machdep.c#11 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/sparc64/machdep.c#21 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/sparc64/swtch.S#3 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/sparc64/tick.c#6 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/sparc64/trap.c#15 integrate .. //depot/projects/trustedbsd/mac/sys/sys/mac.h#190 integrate .. //depot/projects/trustedbsd/mac/sys/sys/signalvar.h#9 integrate .. //depot/projects/trustedbsd/mac/sys/sys/unistd.h#10 integrate .. //depot/projects/trustedbsd/mac/sys/ufs/ffs/ffs_softdep.c#13 integrate .. //depot/projects/trustedbsd/mac/usr.bin/du/du.c#6 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/arch.c#8 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/compat.c#6 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/cond.c#6 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/job.c#8 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/main.c#12 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/make.c#6 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/nonints.h#6 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/parse.c#10 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/str.c#6 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/suff.c#5 integrate .. //depot/projects/trustedbsd/mac/usr.bin/make/targ.c#5 integrate .. //depot/projects/trustedbsd/mac/usr.bin/su/su.1#5 integrate .. //depot/projects/trustedbsd/mac/usr.bin/su/su.c#14 integrate .. //depot/projects/trustedbsd/mac/usr.bin/systat/swap.c#4 integrate .. //depot/projects/trustedbsd/mac/usr.bin/xlint/lint1/Makefile#5 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/Makefile#17 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/getfmac/Makefile#4 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/getfmac/getfmac.8#2 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/getfmac/getfmac.c#8 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/getpmac/Makefile#3 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/getpmac/getpmac.c#5 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/pstat/pstat.c#6 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/setfmac/Makefile#4 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/setfmac/setfmac.8#3 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/setfmac/setfmac.c#8 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/setpmac/Makefile#2 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/setpmac/setpmac.c#7 integrate .. //depot/projects/trustedbsd/mac/usr.sbin/sysinstall/install.c#11 integrate Differences ... ==== //depot/projects/trustedbsd/mac/bin/cat/cat.c#8 (text+ko) ==== @@ -46,7 +46,7 @@ #endif #endif /* not lint */ #include -__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 #include @@ -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/mac/bin/df/df.c#11 (text+ko) ==== @@ -48,7 +48,7 @@ #endif #endif /* not lint */ #include -__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 #include @@ -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/mac/bin/ls/print.c#11 (text+ko) ==== @@ -40,7 +40,7 @@ #endif /* not lint */ #endif #include -__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 #include @@ -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 */ @@ -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/mac/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/mac/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/mac/contrib/openpam/lib/openpam_ttyconv.c#7 $ - * $FreeBSD$ + * $P4: //depot/projects/trustedbsd/mac/contrib/openpam/lib/openpam_ttyconv.c#8 $ */ #include ==== //depot/projects/trustedbsd/mac/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/mac/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 ==== //depot/projects/trustedbsd/mac/gnu/usr.bin/groff/tmac/Makefile#5 (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/mac/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/mac/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/mac/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/mac/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/mac/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/mac/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 -__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 #include @@ -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/mac/lib/libc/net/name6.c#7 (text+ko) ==== @@ -94,7 +94,7 @@ */ #include -__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 @@ -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/mac/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/mac/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/mac/lib/libc/string/wcschr.c#4 (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 -#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_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/mac/lib/libc/string/wcscmp.c#4 (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 ==== //depot/projects/trustedbsd/mac/lib/libc/string/wcsncmp.c#4 (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 ==== //depot/projects/trustedbsd/mac/lib/libc/string/wcsncpy.c#5 (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) @@ -22,37 +32,33 @@ * 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: wcsncpy.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp */ #include -#if 0 -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: wcsncpy.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/wcsncpy.c,v 1.7 2002/09/21 00:29:23 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/string/wcsncpy.c,v 1.8 2002/10/23 04:35:25 tjr Exp $"); #include +/* + * Copy src to dst, truncating or null-padding to always copy n bytes. + * Return dst. + */ wchar_t * -wcsncpy(s1, s2, n) - wchar_t * __restrict s1; - const wchar_t * __restrict s2; - size_t n; +wcsncpy(wchar_t * __restrict dst, const wchar_t * __restrict src, size_t n) { - wchar_t *p; - const wchar_t *q; + if (n != 0) { + wchar_t *d = dst; + const wchar_t *s = src; >>> TRUNCATED FOR MAIL (1000 lines) <<< To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message