PERFORCE change 18825 for review

Robert Watson rwatson at freebsd.org
Mon Oct 7 02:43:57 GMT 2002


http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18825

Change 18825 by rwatson at rwatson_paprika on 2002/10/06 19:43:31

	IFC TrustedBSD base to TrustedBSD MAC.  Loop back the socket
	access control changes.

Affected files ...

.. //depot/projects/trustedbsd/mac/bin/rcp/rcp.c#8 integrate
.. //depot/projects/trustedbsd/mac/etc/periodic/daily/110.clean-tmps#2 integrate
.. //depot/projects/trustedbsd/mac/include/signal.h#6 integrate
.. //depot/projects/trustedbsd/mac/include/stdio.h#8 integrate
.. //depot/projects/trustedbsd/mac/sbin/reboot/reboot.c#4 integrate
.. //depot/projects/trustedbsd/mac/sys/alpha/include/stdarg.h#5 integrate
.. //depot/projects/trustedbsd/mac/sys/alpha/include/varargs.h#4 integrate
.. //depot/projects/trustedbsd/mac/sys/compat/svr4/svr4_stream.c#10 integrate
.. //depot/projects/trustedbsd/mac/sys/i386/include/stdarg.h#6 integrate
.. //depot/projects/trustedbsd/mac/sys/i386/include/varargs.h#4 integrate
.. //depot/projects/trustedbsd/mac/sys/ia64/include/stdarg.h#6 integrate
.. //depot/projects/trustedbsd/mac/sys/ia64/include/varargs.h#4 integrate
.. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#303 edit
.. //depot/projects/trustedbsd/mac/sys/kern/sys_socket.c#17 integrate
.. //depot/projects/trustedbsd/mac/sys/kern/uipc_syscalls.c#26 integrate
.. //depot/projects/trustedbsd/mac/sys/net/bridge.c#12 integrate
.. //depot/projects/trustedbsd/mac/sys/powerpc/include/stdarg.h#5 integrate
.. //depot/projects/trustedbsd/mac/sys/powerpc/include/varargs.h#4 integrate
.. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#129 integrate
.. //depot/projects/trustedbsd/mac/sys/sparc64/include/stdarg.h#5 integrate
.. //depot/projects/trustedbsd/mac/sys/sparc64/include/varargs.h#4 integrate
.. //depot/projects/trustedbsd/mac/sys/sys/mac.h#174 integrate
.. //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#136 integrate
.. //depot/projects/trustedbsd/mac/sys/x86_64/include/stdarg.h#4 integrate
.. //depot/projects/trustedbsd/mac/usr.bin/ktrdump/ktrdump.c#3 integrate
.. //depot/projects/trustedbsd/mac/usr.bin/truss/main.c#7 integrate
.. //depot/projects/trustedbsd/mac/usr.bin/truss/syscalls.c#6 integrate
.. //depot/projects/trustedbsd/mac/usr.sbin/rpcbind/rpcbind.c#4 integrate
.. //depot/projects/trustedbsd/mac/usr.sbin/rpcbind/security.c#2 integrate
.. //depot/projects/trustedbsd/mac/usr.sbin/rpcbind/warmstart.c#2 integrate
.. //depot/projects/trustedbsd/mac/usr.sbin/setfmac/setfmac.8#2 edit
.. //depot/projects/trustedbsd/mac/usr.sbin/syslogd/syslogd.c#14 integrate

Differences ...

==== //depot/projects/trustedbsd/mac/bin/rcp/rcp.c#8 (text+ko) ====

@@ -51,7 +51,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/rcp/rcp.c,v 1.37 2002/10/06 09:09:27 charnier Exp $");
+__FBSDID("$FreeBSD: src/bin/rcp/rcp.c,v 1.38 2002/10/06 11:14:21 tjr Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -926,19 +926,23 @@
 {
 	static FILE *fp;
 	va_list ap;
-	va_start(ap, fmt);
 
 	++errs;
 	if (fp == NULL && !(fp = fdopen(rem, "w")))
 		return;
 	(void)fprintf(fp, "%c", 0x01);
 	(void)fprintf(fp, "rcp: ");
+	va_start(ap, fmt);
 	(void)vfprintf(fp, fmt, ap);
+	va_end(ap);
 	(void)fprintf(fp, "\n");
 	(void)fflush(fp);
 
-	if (!iamremote)
+	if (!iamremote) {
+		va_start(ap, fmt);
 		vwarnx(fmt, ap);
+		va_end(ap);
+	}
 
 	va_end(ap);
 }

==== //depot/projects/trustedbsd/mac/etc/periodic/daily/110.clean-tmps#2 (text+ko) ====

@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/periodic/daily/110.clean-tmps,v 1.11 2001/07/19 12:08:24 brian Exp $
+# $FreeBSD: src/etc/periodic/daily/110.clean-tmps,v 1.12 2002/10/06 18:48:20 joerg Exp $
 #
 # Perform temporary directory cleaning so that long-lived systems
 # don't end up with excessively old files there.
@@ -27,6 +27,7 @@
 
 	    set -f noglob
 	    args="-atime +$daily_clean_tmps_days -mtime +$daily_clean_tmps_days"
+	    args="${args} -ctime +$daily_clean_tmps_days"
 	    [ -n "$daily_clean_tmps_ignore" ] &&
 		args="$args "`echo " ${daily_clean_tmps_ignore% }" |
 		    sed 's/[ 	][ 	]*/ ! -name /g'`

==== //depot/projects/trustedbsd/mac/include/signal.h#6 (text+ko) ====

@@ -32,27 +32,35 @@
  *
  *	@(#)signal.h	8.3 (Berkeley) 3/30/94
  *
- * $FreeBSD: src/include/signal.h,v 1.18 2002/10/02 10:53:44 robert Exp $
+ * $FreeBSD: src/include/signal.h,v 1.19 2002/10/06 21:54:08 mike Exp $
  */
 
 #ifndef _SIGNAL_H_
 #define	_SIGNAL_H_
 
 #include <sys/cdefs.h>
-#include <sys/_posix.h>
 #include <sys/_types.h>
 #include <sys/signal.h>
-#include <sys/time.h>
 
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#if __BSD_VISIBLE
 extern __const char *__const sys_signame[NSIG];
 extern __const char *__const sys_siglist[NSIG];
 extern __const int sys_nsig;
 #endif
 
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
+#ifndef _PID_T_DECLARED
+typedef	__pid_t		pid_t;
+#define	_PID_T_DECLARED
+#endif
+#endif
+
 __BEGIN_DECLS
+struct timespec;
+
 int	raise(int);
-#ifndef	_ANSI_SOURCE
+
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE
 int	kill(__pid_t, int);
 int	sigaction(int, const struct sigaction * __restrict,
 	    struct sigaction * __restrict);
@@ -64,31 +72,32 @@
 int	sigpending(sigset_t *);
 int	sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
 int	sigsuspend(const sigset_t *);
+/* XXX missing restrict qualifier. */
 int	sigwait(const sigset_t *, int *);
+#endif
 
-#ifdef _P1003_1B_VISIBLE
-
-__BEGIN_DECLS
-int sigqueue(__pid_t, int, const union sigval);
-int sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict,
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600
+int	sigqueue(__pid_t, int, const union sigval);
+int	sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict,
 	    const struct timespec * __restrict);
-int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict);
-__END_DECLS
+int	sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict);
+#endif
 
-#endif
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
 int	killpg(__pid_t, int);
 int	sigaltstack(const stack_t * __restrict, stack_t * __restrict); 
-int	sigblock(int);
 int	siginterrupt(int, int);
 int	sigpause(int);
+#endif
+
+#if __BSD_VISIBLE
+int	sigblock(int);
 int	sigreturn(const struct __ucontext *);
 int	sigsetmask(int);
 int	sigstack(const struct sigstack *, struct sigstack *);
 int	sigvec(int, struct sigvec *, struct sigvec *);
 void	psignal(unsigned int, const char *);
-#endif /* !_POSIX_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#endif
 __END_DECLS
 
 #endif /* !_SIGNAL_H_ */

==== //depot/projects/trustedbsd/mac/include/stdio.h#8 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)stdio.h	8.5 (Berkeley) 4/29/95
- * $FreeBSD: src/include/stdio.h,v 1.46 2002/09/06 11:23:32 tjr Exp $
+ * $FreeBSD: src/include/stdio.h,v 1.47 2002/10/06 22:16:12 mike Exp $
  */
 
 #ifndef	_STDIO_H_
@@ -43,17 +43,24 @@
 #include <sys/cdefs.h>
 #include <sys/_types.h>
 
+typedef	__off_t		fpos_t;
+
 #ifndef _SIZE_T_DECLARED
 typedef	__size_t	size_t;
 #define	_SIZE_T_DECLARED
 #endif
 
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
+#ifndef _VA_LIST_DECLARED
+typedef	__va_list	va_list;
+#define	_VA_LIST_DECLARED
+#endif
+#endif
+
 #ifndef NULL
 #define	NULL	0
 #endif
 
-typedef	__off_t		fpos_t;
-
 #define	_FSTDIO			/* Define for new stdio with functions. */
 
 /*
@@ -211,6 +218,10 @@
 __BEGIN_DECLS
 /*
  * Functions defined in ANSI C standard.
+ *
+ * XXX fgetpos(), fgets(), fopen(), fputs(), fread(), freopen(), fscanf(),
+ * fwrite(), scanf(), sscanf(), vscanf(), and vsscanf() are missing the
+ * restrict type-qualifier.
  */
 void	 clearerr(FILE *);
 int	 fclose(FILE *);
@@ -259,17 +270,31 @@
 #if __ISO_C_VISIBLE >= 1999
 int	 snprintf(char * __restrict, size_t, const char * __restrict,
 	    ...) __printflike(3, 4);
+int	 vscanf(const char *, __va_list) __scanflike(1, 0);
 int	 vsnprintf(char * __restrict, size_t, const char * __restrict,
 	    __va_list) __printflike(3, 0);
+int	 vsscanf(const char *, const char *, __va_list)
+	    __scanflike(2, 0);
+
+/*
+ * This is a #define because the function is used internally and
+ * (unlike vfscanf) the name __vfscanf is guaranteed not to collide
+ * with a user function when _ANSI_SOURCE or _POSIX_SOURCE is defined.
+ *
+ * XXX missing a backing function (weak alias?) for this.
+ */
+#define	 vfscanf	__vfscanf
 #endif
 
 /*
  * Functions defined in all versions of POSIX 1003.1.
  */
-#if __POSIX_VISIBLE
+#if __BSD_VISIBLE || __POSIX_VISIBLE <= 199506
 /* size for cuserid(3); UT_NAMESIZE + 1, see <utmp.h> */
-#define	L_cuserid	17
+#define	L_cuserid	17	/* legacy */
+#endif
 
+#if __POSIX_VISIBLE
 #define	L_ctermid	1024	/* size for ctermid(3); PATH_MAX */
 
 char	*ctermid(char *);
@@ -329,9 +354,6 @@
 int	 setlinebuf(FILE *);
 int	 vasprintf(char **, const char *, __va_list)
 	    __printflike(2, 0);
-int	 vscanf(const char *, __va_list) __scanflike(1, 0);
-int	 vsscanf(const char *, const char *, __va_list)
-	    __scanflike(2, 0);
 
 /*
  * The system error table contains messages for the first sys_nerr
@@ -342,13 +364,6 @@
 extern __const char *__const sys_errlist[];
 
 /*
- * This is a #define because the function is used internally and
- * (unlike vfscanf) the name __vfscanf is guaranteed not to collide
- * with a user function when _ANSI_SOURCE or _POSIX_SOURCE is defined.
- */
-#define	 vfscanf	__vfscanf
-
-/*
  * Stdio function-access interface.
  */
 FILE	*funopen(const void *,
@@ -419,6 +434,7 @@
 #define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF)))
 #define	__sfileno(p)	((p)->_file)
 
+#if __BSD_VISIBLE
 /*
  * See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12
  * B.8.2.7 for the rationale behind the *_unlocked() macros.
@@ -427,11 +443,14 @@
 #define	ferror_unlocked(p)	__sferror(p)
 #define	clearerr_unlocked(p)	__sclearerr(p)
 #define	fileno_unlocked(p)	__sfileno(p)
+#endif
+#if __POSIX_VISIBLE >= 199506
 #define	getc_unlocked(fp)	__sgetc(fp)
 #define	putc_unlocked(x, fp)	__sputc(x, fp)
 
 #define	getchar_unlocked()	getc_unlocked(stdin)
 #define	putchar_unlocked(x)	putc_unlocked(x, stdout)
+#endif
 
 __END_DECLS
 #endif /* !_STDIO_H_ */

==== //depot/projects/trustedbsd/mac/sbin/reboot/reboot.c#4 (text+ko) ====

@@ -42,7 +42,7 @@
 static char sccsid[] = "@(#)reboot.c	8.1 (Berkeley) 6/5/93";
 #endif
 static const char rcsid[] =
-  "$FreeBSD: src/sbin/reboot/reboot.c,v 1.16 2002/05/28 21:15:49 gordon Exp $";
+  "$FreeBSD: src/sbin/reboot/reboot.c,v 1.17 2002/10/06 16:24:36 thomas Exp $";
 #endif /* not lint */
 
 #include <sys/reboot.h>
@@ -98,7 +98,7 @@
 			break;
 		case 'p':
 			pflag = 1;
-			howto |= (RB_POWEROFF | RB_HALT);
+			howto |= RB_POWEROFF;
 			break;
 		case 'q':
 			qflag = 1;

==== //depot/projects/trustedbsd/mac/sys/alpha/include/stdarg.h#5 (text+ko) ====

@@ -33,15 +33,19 @@
  *
  *	@(#)stdarg.h	8.1 (Berkeley) 6/10/93
  *	$NetBSD: stdarg.h,v 1.7 1997/04/06 08:47:44 cgd Exp $
- * $FreeBSD: src/sys/alpha/include/stdarg.h,v 1.5 2002/09/18 07:33:15 mike Exp $
+ * $FreeBSD: src/sys/alpha/include/stdarg.h,v 1.6 2002/10/06 22:01:06 mike Exp $
  */
 
-#ifndef _ALPHA_STDARG_H_
-#define	_ALPHA_STDARG_H_
+#ifndef _MACHINE_STDARG_H_
+#define	_MACHINE_STDARG_H_
 
+#include <sys/cdefs.h>
 #include <sys/_types.h>
 
-typedef __va_list	va_list;
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
+typedef	__va_list	va_list;
+#endif
 
 #if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
 
@@ -51,8 +55,10 @@
 #define	va_arg(ap, type) \
 	__builtin_va_arg((ap), type)
 
+#if __ISO_C_VISIBLE >= 1999
 #define	va_copy(dest, src) \
 	__builtin_va_copy((dest), (src))
+#endif
 
 #define	va_end(ap) \
 	__builtin_va_end(ap)
@@ -83,4 +89,4 @@
 
 #endif /* __GNUC__ post GCC 2.95 */
 
-#endif /* !_ALPHA_STDARG_H_ */
+#endif /* !_MACHINE_STDARG_H_ */

==== //depot/projects/trustedbsd/mac/sys/alpha/include/varargs.h#4 (text+ko) ====

@@ -38,7 +38,7 @@
  *
  *	@(#)varargs.h	8.2 (Berkeley) 3/22/94
  *	$NetBSD: varargs.h,v 1.7 1997/04/06 08:47:46 cgd Exp $
- * $FreeBSD: src/sys/alpha/include/varargs.h,v 1.4 2002/08/21 16:19:58 mike Exp $
+ * $FreeBSD: src/sys/alpha/include/varargs.h,v 1.5 2002/10/06 22:02:06 mike Exp $
  */
 
 #ifndef _ALPHA_VARARGS_H_
@@ -48,7 +48,11 @@
 
 #include <sys/_types.h>
 
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
 typedef	__va_list	va_list;
+#endif
+
 typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
 
 #define	va_alist		__builtin_va_alist

==== //depot/projects/trustedbsd/mac/sys/compat/svr4/svr4_stream.c#10 (text+ko) ====

@@ -27,7 +27,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.35 2002/09/24 07:02:57 mini Exp $
+ * $FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.36 2002/10/06 14:39:14 rwatson Exp $
  */
 
 /*

==== //depot/projects/trustedbsd/mac/sys/i386/include/stdarg.h#6 (text+ko) ====

@@ -32,15 +32,19 @@
  * SUCH DAMAGE.
  *
  *	@(#)stdarg.h	8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/i386/include/stdarg.h,v 1.16 2002/09/18 07:33:15 mike Exp $
+ * $FreeBSD: src/sys/i386/include/stdarg.h,v 1.17 2002/10/06 22:01:06 mike Exp $
  */
 
-#ifndef _STDARG_H_
-#define	_STDARG_H_
+#ifndef _MACHINE_STDARG_H_
+#define	_MACHINE_STDARG_H_
 
+#include <sys/cdefs.h>
 #include <sys/_types.h>
 
-typedef __va_list	va_list;
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
+typedef	__va_list	va_list;
+#endif
 
 #if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
 
@@ -50,8 +54,10 @@
 #define	va_arg(ap, type) \
 	__builtin_va_arg((ap), type)
 
+#if __ISO_C_VISIBLE >= 1999
 #define	va_copy(dest, src) \
 	__builtin_va_copy((dest), (src))
+#endif
 
 #define	va_end(ap) \
 	__builtin_va_end(ap)
@@ -77,4 +83,4 @@
 
 #endif /* __GNUC__ post GCC 2.95 */
 
-#endif /* !_STDARG_H_ */
+#endif /* !_MACHINE_STDARG_H_ */

==== //depot/projects/trustedbsd/mac/sys/i386/include/varargs.h#4 (text+ko) ====

@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)varargs.h	8.2 (Berkeley) 3/22/94
- * $FreeBSD: src/sys/i386/include/varargs.h,v 1.10 2002/08/21 16:19:58 mike Exp $
+ * $FreeBSD: src/sys/i386/include/varargs.h,v 1.11 2002/10/06 22:02:06 mike Exp $
  */
 
 #ifndef _VARARGS_H_
@@ -47,7 +47,11 @@
 
 #include <sys/_types.h>
 
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
 typedef	__va_list	va_list;
+#endif
+
 typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
 
 #define	va_alist		__builtin_va_alist

==== //depot/projects/trustedbsd/mac/sys/ia64/include/stdarg.h#6 (text+ko) ====

@@ -32,15 +32,19 @@
  * SUCH DAMAGE.
  *
  *	@(#)stdarg.h	8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/ia64/include/stdarg.h,v 1.6 2002/09/18 07:33:15 mike Exp $
+ * $FreeBSD: src/sys/ia64/include/stdarg.h,v 1.7 2002/10/06 22:01:06 mike Exp $
  */
 
 #ifndef _MACHINE_STDARG_H_
 #define	_MACHINE_STDARG_H_
 
+#include <sys/cdefs.h>
 #include <sys/_types.h>
 
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
 typedef	__va_list	va_list;
+#endif
 
 #if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
 
@@ -50,8 +54,10 @@
 #define	va_arg(ap, type) \
 	__builtin_va_arg((ap), type)
 
+#if __ISO_C_VISIBLE >= 1999
 #define	va_copy(dest, src) \
 	__builtin_va_copy((dest), (src))
+#endif
 
 #define	va_end(ap) \
 	__builtin_va_end(ap)

==== //depot/projects/trustedbsd/mac/sys/ia64/include/varargs.h#4 (text+ko) ====

@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)varargs.h	8.2 (Berkeley) 3/22/94
- * $FreeBSD: src/sys/ia64/include/varargs.h,v 1.3 2002/08/21 16:19:59 mike Exp $
+ * $FreeBSD: src/sys/ia64/include/varargs.h,v 1.4 2002/10/06 22:02:06 mike Exp $
  */
 
 #ifndef _MACHINE_VARARGS_H_
@@ -45,7 +45,11 @@
 
 #include <sys/_types.h>
 
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
 typedef	__va_list	va_list;
+#endif
+
 typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
 
 #define	va_alist		__builtin_va_alist

==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#303 (text+ko) ====

@@ -36,7 +36,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.40 2002/10/06 02:46:25 rwatson Exp $
+ * $FreeBSD: src/sys/kern/kern_mac.c,v 1.41 2002/10/06 14:39:14 rwatson Exp $
  */
 /*
  * Developed by the TrustedBSD Project.
@@ -3344,10 +3344,6 @@
 	return (error);
 }
 
-/*
- * XXXMAC: It might eventually be desirable to pass in address information
- * to the send and possibly receive calls.
- */
 int
 mac_check_socket_send(struct ucred *cred, struct socket *so)
 {

==== //depot/projects/trustedbsd/mac/sys/kern/sys_socket.c#17 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)sys_socket.c	8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/kern/sys_socket.c,v 1.45 2002/10/03 02:12:58 truckman Exp $
+ * $FreeBSD: src/sys/kern/sys_socket.c,v 1.46 2002/10/06 14:39:14 rwatson Exp $
  */
 
 #include "opt_mac.h"

==== //depot/projects/trustedbsd/mac/sys/kern/uipc_syscalls.c#26 (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.131 2002/10/03 02:12:58 truckman Exp $
+ * $FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.132 2002/10/06 14:39:14 rwatson Exp $
  */
 
 #include "opt_compat.h"

==== //depot/projects/trustedbsd/mac/sys/net/bridge.c#12 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net/bridge.c,v 1.55 2002/09/12 01:05:46 luigi Exp $
+ * $FreeBSD: src/sys/net/bridge.c,v 1.56 2002/10/06 14:02:35 mux Exp $
  */
 
 /*
@@ -845,7 +845,7 @@
 	ifp = dst ;
 	once = 1 ;
     }
-    if ( (u_int)(ifp) <= (u_int)BDG_FORWARD )
+    if ((uintptr_t)(ifp) <= (u_int)BDG_FORWARD)
 	panic("bdg_forward: bad dst");
 
     /*

==== //depot/projects/trustedbsd/mac/sys/powerpc/include/stdarg.h#5 (text+ko) ====

@@ -25,15 +25,19 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *	$NetBSD: stdarg.h,v 1.5 2000/02/27 17:50:21 tsubai Exp $
- * $FreeBSD: src/sys/powerpc/include/stdarg.h,v 1.6 2002/09/18 07:33:16 mike Exp $
+ * $FreeBSD: src/sys/powerpc/include/stdarg.h,v 1.7 2002/10/06 22:01:07 mike Exp $
  */
 
-#ifndef _POWERPC_STDARG_H_
-#define	_POWERPC_STDARG_H_
+#ifndef _MACHINE_STDARG_H_
+#define	_MACHINE_STDARG_H_
 
+#include <sys/cdefs.h>
 #include <sys/_types.h>
 
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
 typedef	__va_list	va_list;
+#endif
 
 #if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
 
@@ -43,8 +47,10 @@
 #define	va_arg(ap, type) \
 	__builtin_va_arg((ap), type)
 
+#if __ISO_C_VISIBLE >= 1999
 #define	va_copy(dest, src) \
 	__builtin_va_copy((dest), (src))
+#endif
 
 #define	va_end(ap) \
 	__builtin_va_end(ap)
@@ -127,13 +133,15 @@
 
 #define	va_end(ap)	
 
+#if __ISO_C_VISIBLE >= 1999
 #if !defined(_ANSI_SOURCE) &&						\
     (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) ||		\
      defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
 #define	va_copy(dest, src)						\
 	((dest) = (src))
 #endif
+#endif
 
 #endif /* __GNUC__ post GCC 2.95 */
 
-#endif /* _POWERPC_STDARG_H_ */
+#endif /* _MACHINE_STDARG_H_ */

==== //depot/projects/trustedbsd/mac/sys/powerpc/include/varargs.h#4 (text+ko) ====

@@ -25,7 +25,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
  *	$NetBSD: varargs.h,v 1.5 2000/02/27 17:50:22 tsubai Exp $
- * $FreeBSD: src/sys/powerpc/include/varargs.h,v 1.3 2002/08/21 16:19:59 mike Exp $
+ * $FreeBSD: src/sys/powerpc/include/varargs.h,v 1.4 2002/10/06 22:02:06 mike Exp $
  */
 
 #ifndef _POWERPC_VARARGS_H_
@@ -35,7 +35,11 @@
 
 #include <sys/_types.h>
 
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
 typedef	__va_list	va_list;
+#endif
+
 typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
 
 #define	va_alist		__builtin_va_alist

==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#129 (text+ko) ====

@@ -34,7 +34,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/security/mac_biba/mac_biba.c,v 1.17 2002/10/06 02:46:25 rwatson Exp $
+ * $FreeBSD: src/sys/security/mac_biba/mac_biba.c,v 1.18 2002/10/06 13:11:01 rwatson Exp $
  */
 
 /*

==== //depot/projects/trustedbsd/mac/sys/sparc64/include/stdarg.h#5 (text+ko) ====

@@ -35,15 +35,19 @@
  *
  *	@(#)stdarg.h	8.2 (Berkeley) 9/27/93
  *	$NetBSD: stdarg.h,v 1.11 2000/07/23 21:36:56 mycroft Exp $
- * $FreeBSD: src/sys/sparc64/include/stdarg.h,v 1.5 2002/09/18 07:33:16 mike Exp $
+ * $FreeBSD: src/sys/sparc64/include/stdarg.h,v 1.6 2002/10/06 22:01:07 mike Exp $
  */
 
 #ifndef _MACHINE_STDARG_H_
 #define	_MACHINE_STDARG_H_
 
+#include <sys/cdefs.h>
 #include <sys/_types.h>
 
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
 typedef	__va_list	va_list;
+#endif
 
 #if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
 
@@ -53,8 +57,10 @@
 #define	va_arg(ap, type) \
 	__builtin_va_arg((ap), type)
 
+#if __ISO_C_VISIBLE >= 1999
 #define	va_copy(dest, src) \
 	__builtin_va_copy((dest), (src))
+#endif
 
 #define	va_end(ap) \
 	__builtin_va_end(ap)

==== //depot/projects/trustedbsd/mac/sys/sparc64/include/varargs.h#4 (text+ko) ====

@@ -46,14 +46,18 @@
  * SUCH DAMAGE.
  *
  *	@(#)varargs.h	8.3 (Berkeley) 3/22/94
- * $FreeBSD: src/sys/sparc64/include/varargs.h,v 1.4 2002/08/21 16:20:00 mike Exp $
+ * $FreeBSD: src/sys/sparc64/include/varargs.h,v 1.5 2002/10/06 22:02:06 mike Exp $
  */
 
 #if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
 
 #include <sys/_types.h>
 
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
 typedef	__va_list	va_list;
+#endif
+
 typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
 
 #define	va_alist		__builtin_va_alist

==== //depot/projects/trustedbsd/mac/sys/sys/mac.h#174 (text+ko) ====

@@ -34,7 +34,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sys/mac.h,v 1.13 2002/10/06 02:46:26 rwatson Exp $
+ * $FreeBSD: src/sys/sys/mac.h,v 1.14 2002/10/06 14:39:15 rwatson Exp $
  */
 /*
  * Userland/kernel interface for Mandatory Access Control.

==== //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#136 (text+ko) ====

@@ -34,7 +34,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sys/mac_policy.h,v 1.15 2002/10/06 02:46:26 rwatson Exp $
+ * $FreeBSD: src/sys/sys/mac_policy.h,v 1.16 2002/10/06 14:39:15 rwatson Exp $
  */
 /*
  * Kernel interface for MAC policy modules.

==== //depot/projects/trustedbsd/mac/sys/x86_64/include/stdarg.h#4 (text+ko) ====

@@ -25,15 +25,19 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/x86_64/include/stdarg.h,v 1.3 2002/09/18 07:33:16 mike Exp $
+ * $FreeBSD: src/sys/x86_64/include/stdarg.h,v 1.4 2002/10/06 22:01:07 mike Exp $
  */
 
 #ifndef _MACHINE_STDARG_H_
 #define	_MACHINE_STDARG_H_
 
+#include <sys/cdefs.h>
 #include <sys/_types.h>
 
+#ifndef _VA_LIST_DECLARED
+#define	_VA_LIST_DECLARED
 typedef	__va_list	va_list;
+#endif
 
 #define	va_start(ap, last) \
 	__builtin_stdarg_start((ap), (last))
@@ -41,8 +45,10 @@
 #define	va_arg(ap, type) \
 	__builtin_va_arg((ap), type)
 
+#if __ISO_C_VISIBLE >= 1999
 #define	va_copy(dest, src) \
 	__builtin_va_copy((dest), (src))
+#endif
 
 #define	va_end(ap) \
 	__builtin_va_end(ap)

==== //depot/projects/trustedbsd/mac/usr.bin/ktrdump/ktrdump.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/ktrdump/ktrdump.c,v 1.3 2002/09/22 07:21:28 jeff Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/ktrdump/ktrdump.c,v 1.4 2002/10/06 23:52:06 kris Exp $");
 
 #include <sys/types.h>
 #include <sys/ktr.h>
@@ -107,7 +107,9 @@
 			cflag = 1;
 			break;
 		case 'e':
-			strcpy(execfile, optarg);
+			if (strlcpy(execfile, optarg, sizeof(execfile))
+			    >= sizeof(execfile))
+				errx(1, "%s: File name too long", optarg);
 			eflag = 1;
 			break;
 		case 'f':
@@ -119,7 +121,9 @@
 				err(1, "%s", optarg);
 			break;
 		case 'm':
-			strcpy(corefile, optarg);
+			if (strlcpy(corefile, optarg, sizeof(corefile))
+			    >= sizeof(corefile))
+				errx(1, "%s: File name too long", optarg);
 			mflag = 1;
 			break;
 		case 'o':

==== //depot/projects/trustedbsd/mac/usr.bin/truss/main.c#7 (text+ko) ====

@@ -31,7 +31,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$FreeBSD: src/usr.bin/truss/main.c,v 1.31 2002/08/06 12:46:14 mdodd Exp $";
+  "$FreeBSD: src/usr.bin/truss/main.c,v 1.32 2002/10/06 21:46:04 mike Exp $";
 #endif /* not lint */
 
 /*
@@ -43,6 +43,7 @@
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/pioctl.h>
+#include <sys/time.h>
 
 #include <err.h>
 #include <errno.h>

==== //depot/projects/trustedbsd/mac/usr.bin/truss/syscalls.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-  "$FreeBSD: src/usr.bin/truss/syscalls.c,v 1.25 2002/08/07 11:35:18 mdodd Exp $";
+  "$FreeBSD: src/usr.bin/truss/syscalls.c,v 1.26 2002/10/06 21:46:04 mike Exp $";
 #endif /* not lint */
 
 /*
@@ -41,6 +41,7 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <sys/time.h>
 #include <sys/un.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>

==== //depot/projects/trustedbsd/mac/usr.sbin/rpcbind/rpcbind.c#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*	$NetBSD: rpcbind.c,v 1.1 2000/06/02 23:15:42 fvdl Exp $	*/
-/*	$FreeBSD: src/usr.sbin/rpcbind/rpcbind.c,v 1.4 2002/07/22 15:22:53 ume Exp $ */
+/*	$FreeBSD: src/usr.sbin/rpcbind/rpcbind.c,v 1.6 2002/10/07 01:19:56 alfred Exp $ */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -254,7 +254,8 @@
 	 */
 	if (nconf->nc_semantics != NC_TPI_CLTS) {
 		if ((fd = __rpc_nconf2fd(nconf)) < 0) {
-			syslog(LOG_ERR, "cannot create socket for %s", nconf->nc_netid);
+			syslog(LOG_ERR, "cannot create socket for %s",
+			    nconf->nc_netid);
 			return (1);
 		}
 	}
@@ -311,24 +312,27 @@
 			 * XXX - using RPC library internal functions.
 			 */
 			if ((fd = __rpc_nconf2fd(nconf)) < 0) {
-				syslog(LOG_ERR, "cannot create socket for %s", nconf->nc_netid);
+				syslog(LOG_ERR, "cannot create socket for %s",
+				    nconf->nc_netid);
 				return (1);
 			}
 			switch (hints.ai_family) {
 			case AF_INET:
-				if (inet_pton(AF_INET, hosts[nhostsbak], host_addr) == 1) {
+				if (inet_pton(AF_INET, hosts[nhostsbak],
+				    host_addr) == 1) {
 					hints.ai_flags &= AI_NUMERICHOST;
 				} else {
 					/*
 					 * Skip if we have a AF_INET6 adress
 					 */
-					if (inet_pton(AF_INET6, hosts[nhostsbak],
-					    host_addr) == 1)
+					if (inet_pton(AF_INET6,
+					    hosts[nhostsbak], host_addr) == 1)
 						continue;
 				}
 				break;
 			case AF_INET6:
-				if (inet_pton(AF_INET6, hosts[nhostsbak], host_addr) == 1) {
+				if (inet_pton(AF_INET6, hosts[nhostsbak],
+				    host_addr) == 1) {
 					hints.ai_flags &= AI_NUMERICHOST;
 				} else {
 					/*
@@ -340,7 +344,8 @@
 				}
 				if (setsockopt(fd, IPPROTO_IPV6,
                                     IPV6_V6ONLY, &on, sizeof on) < 0) {
-                                        syslog(LOG_ERR, "can't set v6-only binding for "
+                                        syslog(LOG_ERR,
+					    "can't set v6-only binding for "
                                             "udp6 socket: %m");
 					continue;
 				}
@@ -357,7 +362,8 @@
 
 			if ((aicode = getaddrinfo(hosts[nhostsbak],
 			    servname, &hints, &res)) != 0) {
-				syslog(LOG_ERR, "cannot get local address for %s: %s",
+				syslog(LOG_ERR,
+				    "cannot get local address for %s: %s",
 				    nconf->nc_netid, gai_strerror(aicode));
 				continue;
 			}
@@ -366,6 +372,7 @@
 			oldmask = umask(S_IXUSR|S_IXGRP|S_IXOTH);
 			if (bind(fd, sa, addrlen) != 0) {
 				syslog(LOG_ERR, "cannot bind %s on %s: %m",
+					(hosts[nhostsbak] == NULL) ? "*" :
 					hosts[nhostsbak], nconf->nc_netid);
 				if (res != NULL)
 					freeaddrinfo(res);
@@ -378,7 +385,8 @@
 			taddr.addr.len = taddr.addr.maxlen = addrlen;
 			taddr.addr.buf = malloc(addrlen);
 			if (taddr.addr.buf == NULL) {
-				syslog(LOG_ERR, "cannot allocate memory for %s address",
+				syslog(LOG_ERR,
+				    "cannot allocate memory for %s address",
 				    nconf->nc_netid);
 				if (res != NULL)
 					freeaddrinfo(res);
@@ -387,14 +395,18 @@
 			memcpy(taddr.addr.buf, sa, addrlen);
 #ifdef ND_DEBUG
 			if (debugging) {
-				/* for debugging print out our universal address */
+				/*
+				 * for debugging print out our universal
+				 * address
+				 */
 				char *uaddr;
 				struct netbuf nb;
 
 				nb.buf = sa;
 				nb.len = nb.maxlen = sa->sa_len;

>>> 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