CVS commit: src/usr.sbin/cpuctl/arch
Module Name:src Committed By: msaitoh Date: Fri Dec 4 05:34:59 UTC 2015 Modified Files: src/usr.sbin/cpuctl/arch: i386.c Log Message: Model 0x5e is also 6th gen Core or Xeon E3-1500 v5 like model 0x4e. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/usr.sbin/cpuctl/arch/i386.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/cpuctl/arch/i386.c diff -u src/usr.sbin/cpuctl/arch/i386.c:1.68 src/usr.sbin/cpuctl/arch/i386.c:1.69 --- src/usr.sbin/cpuctl/arch/i386.c:1.68 Mon Oct 19 02:47:05 2015 +++ src/usr.sbin/cpuctl/arch/i386.c Fri Dec 4 05:34:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: i386.c,v 1.68 2015/10/19 02:47:05 msaitoh Exp $ */ +/* $NetBSD: i386.c,v 1.69 2015/12/04 05:34:59 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include #ifndef lint -__RCSID("$NetBSD: i386.c,v 1.68 2015/10/19 02:47:05 msaitoh Exp $"); +__RCSID("$NetBSD: i386.c,v 1.69 2015/12/04 05:34:59 msaitoh Exp $"); #endif /* not lint */ #include @@ -373,7 +373,7 @@ const struct cpu_cpuid_nameclass i386_cp [0x57] = "Next gen Xeon Phi", [0x5a] = "Atom E3500", [0x5d] = "Atom X3-C3000 (Silvermont)", -[0x5e] = "Next gen Core (Skylake)", +[0x5e] = "6th gen Core, Xeon E3-1500 v5 (Skylake)", }, "Pentium Pro, II or III", /* Default */ NULL,
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Dec 3 11:31:05 UTC 2015 Modified Files: src/sys/compat/netbsd32: netbsd32_compat_14.c Log Message: Strange patch(1) behavior got me three copies of the code. One is sufficient so remove the excess. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/compat/netbsd32/netbsd32_compat_14.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_compat_14.c diff -u src/sys/compat/netbsd32/netbsd32_compat_14.c:1.24 src/sys/compat/netbsd32/netbsd32_compat_14.c:1.25 --- src/sys/compat/netbsd32/netbsd32_compat_14.c:1.24 Thu Dec 3 11:28:35 2015 +++ src/sys/compat/netbsd32/netbsd32_compat_14.c Thu Dec 3 11:31:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_14.c,v 1.24 2015/12/03 11:28:35 pgoyette Exp $ */ +/* $NetBSD: netbsd32_compat_14.c,v 1.25 2015/12/03 11:31:05 pgoyette Exp $ */ /* * Copyright (c) 1999 Eduardo E. Horvath @@ -29,17 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.24 2015/12/03 11:28:35 pgoyette Exp $"); - -#ifdef _KERNEL_OPT -#include "opt_sysv.h" -#include "opt_compat_netbsd.h" -#endif - -#ifdef _KERNEL_OPT -#include "opt_sysv.h" -#include "opt_compat_netbsd.h" -#endif +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.25 2015/12/03 11:31:05 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_sysv.h"
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Dec 3 11:25:45 UTC 2015 Modified Files: src/sys/compat/netbsd32: files.netbsd32 netbsd32_compat_14.c Log Message: Missed these. Only include the compat_14 sys calls if this being compiled as part of the compat_netbsd32_sysvipc module. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/compat/netbsd32/files.netbsd32 cvs rdiff -u -r1.22 -r1.23 src/sys/compat/netbsd32/netbsd32_compat_14.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/files.netbsd32 diff -u src/sys/compat/netbsd32/files.netbsd32:1.37 src/sys/compat/netbsd32/files.netbsd32:1.38 --- src/sys/compat/netbsd32/files.netbsd32:1.37 Tue Dec 1 23:38:34 2015 +++ src/sys/compat/netbsd32/files.netbsd32 Thu Dec 3 11:25:45 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.netbsd32,v 1.37 2015/12/01 23:38:34 pgoyette Exp $ +# $NetBSD: files.netbsd32,v 1.38 2015/12/03 11:25:45 pgoyette Exp $ # # config file description for machine-independent netbsd32 compat code. # included by ports that need it. @@ -40,4 +40,6 @@ file compat/netbsd32/netbsd32_compat_20. file compat/netbsd32/netbsd32_compat_30.c compat_netbsd32 & compat_30 file compat/netbsd32/netbsd32_compat_43.c compat_netbsd32 & (compat_43 | compat_sunos | compat_linux32) file compat/netbsd32/netbsd32_compat_50.c compat_netbsd32 & compat_50 +file compat/netbsd32/netbsd32_compat_50_sysv.c compat_netbsd32 & compat_50 & + (sysvmsg | sysvsem | sysvshm) file compat/netbsd32/netbsd32_compat_60.c compat_netbsd32 & compat_60 Index: src/sys/compat/netbsd32/netbsd32_compat_14.c diff -u src/sys/compat/netbsd32/netbsd32_compat_14.c:1.22 src/sys/compat/netbsd32/netbsd32_compat_14.c:1.23 --- src/sys/compat/netbsd32/netbsd32_compat_14.c:1.22 Thu Dec 3 10:38:21 2015 +++ src/sys/compat/netbsd32/netbsd32_compat_14.c Thu Dec 3 11:25:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_14.c,v 1.22 2015/12/03 10:38:21 pgoyette Exp $ */ +/* $NetBSD: netbsd32_compat_14.c,v 1.23 2015/12/03 11:25:45 pgoyette Exp $ */ /* * Copyright (c) 1999 Eduardo E. Horvath @@ -29,7 +29,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.22 2015/12/03 10:38:21 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.23 2015/12/03 11:25:45 pgoyette Exp $"); + +#ifdef _KERNEL_OPT +#include "opt_sysv.h" +#include "opt_compat_netbsd.h" +#endif #ifdef _KERNEL_OPT #include "opt_sysv.h"
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Dec 3 11:28:35 UTC 2015 Modified Files: src/sys/compat/netbsd32: netbsd32_compat_14.c Log Message: If compiling as part of a built-in kernel module, make sure we include the relevant opt_sysv.h file To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/compat/netbsd32/netbsd32_compat_14.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_compat_14.c diff -u src/sys/compat/netbsd32/netbsd32_compat_14.c:1.23 src/sys/compat/netbsd32/netbsd32_compat_14.c:1.24 --- src/sys/compat/netbsd32/netbsd32_compat_14.c:1.23 Thu Dec 3 11:25:45 2015 +++ src/sys/compat/netbsd32/netbsd32_compat_14.c Thu Dec 3 11:28:35 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_14.c,v 1.23 2015/12/03 11:25:45 pgoyette Exp $ */ +/* $NetBSD: netbsd32_compat_14.c,v 1.24 2015/12/03 11:28:35 pgoyette Exp $ */ /* * Copyright (c) 1999 Eduardo E. Horvath @@ -29,7 +29,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.23 2015/12/03 11:25:45 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.24 2015/12/03 11:28:35 pgoyette Exp $"); + +#ifdef _KERNEL_OPT +#include "opt_sysv.h" +#include "opt_compat_netbsd.h" +#endif #ifdef _KERNEL_OPT #include "opt_sysv.h"
CVS commit: src/doc
Module Name:src Committed By: taca Date: Thu Dec 3 10:42:12 UTC 2015 Modified Files: src/doc: 3RDPARTY Log Message: root.cache is 2015120100 (December 01, 2015) now. To generate a diff of this commit: cvs rdiff -u -r1.1264 -r1.1265 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1264 src/doc/3RDPARTY:1.1265 --- src/doc/3RDPARTY:1.1264 Tue Dec 1 10:36:15 2015 +++ src/doc/3RDPARTY Thu Dec 3 10:42:12 2015 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1264 2015/12/01 10:36:15 roy Exp $ +# $NetBSD: 3RDPARTY,v 1.1265 2015/12/03 10:42:12 taca Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1191,8 +1191,8 @@ Notes: Old versions are available from Purdue (ftp.cs.purdue.edu:/pub/RCS). Package: root.cache -Version: 2014060201 (June 2, 2014) -Current Vers: 2014060201 (June 2, 2014) +Version: 2015120100 (December 01, 2015) +Current Vers: 2015120100 (December 01, 2015) Maintainer: InterNIC Archive Site: ftp://ftp.internic.net/domain/named.root Home Page: ftp://ftp.internic.net/domain/named.root
CVS commit: src/etc/namedb
Module Name:src Committed By: taca Date: Thu Dec 3 10:41:22 UTC 2015 Modified Files: src/etc/namedb: root.cache Log Message: Update to 2015120100. * Addresses of H.ROOT-SERVERS.NET has updated. * Make IPv6 address lower case. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/etc/namedb/root.cache Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/namedb/root.cache diff -u src/etc/namedb/root.cache:1.18 src/etc/namedb/root.cache:1.19 --- src/etc/namedb/root.cache:1.18 Tue Jul 1 03:33:28 2014 +++ src/etc/namedb/root.cache Thu Dec 3 10:41:22 2015 @@ -1,4 +1,4 @@ -; $NetBSD: root.cache,v 1.18 2014/07/01 03:33:28 taca Exp $ +; $NetBSD: root.cache,v 1.19 2015/12/03 10:41:22 taca Exp $ ; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache . " @@ -10,32 +10,32 @@ ; on server FTP.INTERNIC.NET ; -OR-RS.INTERNIC.NET ; -; last update:June 2, 2014 -; related version of root zone: 2014060201 +; last update:December 01, 2015 +; related version of root zone: 2015120100 ; ; formerly NS.INTERNIC.NET ; -.360 IN NSA.ROOT-SERVERS.NET. +.360 NSA.ROOT-SERVERS.NET. A.ROOT-SERVERS.NET. 360 A 198.41.0.4 -A.ROOT-SERVERS.NET. 360 2001:503:BA3E::2:30 +A.ROOT-SERVERS.NET. 360 2001:503:ba3e::2:30 ; ; FORMERLY NS1.ISI.EDU ; .360 NSB.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 360 A 192.228.79.201 -B.ROOT-SERVERS.NET. 360 2001:500:84::B +B.ROOT-SERVERS.NET. 360 2001:500:84::b ; ; FORMERLY C.PSI.NET ; .360 NSC.ROOT-SERVERS.NET. C.ROOT-SERVERS.NET. 360 A 192.33.4.12 -C.ROOT-SERVERS.NET. 360 2001:500:2::C +C.ROOT-SERVERS.NET. 360 2001:500:2::c ; ; FORMERLY TERP.UMD.EDU ; .360 NSD.ROOT-SERVERS.NET. D.ROOT-SERVERS.NET. 360 A 199.7.91.13 -D.ROOT-SERVERS.NET. 360 2001:500:2D::D +D.ROOT-SERVERS.NET. 360 2001:500:2d::d ; ; FORMERLY NS.NASA.GOV ; @@ -46,7 +46,7 @@ E.ROOT-SERVERS.NET. 360 A ; .360 NSF.ROOT-SERVERS.NET. F.ROOT-SERVERS.NET. 360 A 192.5.5.241 -F.ROOT-SERVERS.NET. 360 2001:500:2F::F +F.ROOT-SERVERS.NET. 360 2001:500:2f::f ; ; FORMERLY NS.NIC.DDN.MIL ; @@ -56,26 +56,26 @@ G.ROOT-SERVERS.NET. 360 A ; FORMERLY AOS.ARL.ARMY.MIL ; .360 NSH.ROOT-SERVERS.NET. -H.ROOT-SERVERS.NET. 360 A 128.63.2.53 -H.ROOT-SERVERS.NET. 360 2001:500:1::803F:235 +H.ROOT-SERVERS.NET. 360 A 198.97.190.53 +H.ROOT-SERVERS.NET. 360 2001:500:1::53 ; ; FORMERLY NIC.NORDU.NET ; .360 NSI.ROOT-SERVERS.NET. I.ROOT-SERVERS.NET. 360 A 192.36.148.17 -I.ROOT-SERVERS.NET. 360 2001:7FE::53 +I.ROOT-SERVERS.NET. 360 2001:7fe::53 ; ; OPERATED BY VERISIGN, INC. ; .360 NSJ.ROOT-SERVERS.NET. J.ROOT-SERVERS.NET. 360 A 192.58.128.30 -J.ROOT-SERVERS.NET. 360 2001:503:C27::2:30 +J.ROOT-SERVERS.NET. 360 2001:503:c27::2:30 ; ; OPERATED BY RIPE NCC ; .360 NSK.ROOT-SERVERS.NET. K.ROOT-SERVERS.NET. 360 A 193.0.14.129 -K.ROOT-SERVERS.NET. 360 2001:7FD::1 +K.ROOT-SERVERS.NET. 360 2001:7fd::1 ; ; OPERATED BY ICANN ; @@ -87,5 +87,5 @@ L.ROOT-SERVERS.NET. 360 AA ; .360 NSM.ROOT-SERVERS.NET. M.ROOT-SERVERS.NET. 360 A 202.12.27.33 -M.ROOT-SERVERS.NET. 360 2001:DC3::35 -; End of File +M.ROOT-SERVERS.NET. 360 2001:dc3::35 +; End of file
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: pgoyette Date: Thu Dec 3 10:39:50 UTC 2015 Modified Files: src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_syscalls_autoload.c netbsd32_sysent.c netbsd32_systrace_args.c Log Message: Regen syscall definitions - the compat_netbsd32 sysv-ipc stuff is now modular and can be autoloaded when needed To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.120 -r1.121 src/sys/compat/netbsd32/netbsd32_syscalls.c \ src/sys/compat/netbsd32/netbsd32_sysent.c cvs rdiff -u -r1.3 -r1.4 src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c cvs rdiff -u -r1.11 -r1.12 src/sys/compat/netbsd32/netbsd32_systrace_args.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_syscall.h diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.121 src/sys/compat/netbsd32/netbsd32_syscall.h:1.122 --- src/sys/compat/netbsd32/netbsd32_syscall.h:1.121 Tue Dec 1 23:57:19 2015 +++ src/sys/compat/netbsd32/netbsd32_syscall.h Thu Dec 3 10:39:50 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.121 2015/12/01 23:57:19 pgoyette Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.122 2015/12/03 10:39:50 pgoyette Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.111 2015/12/01 23:56:43 pgoyette Exp + * created from NetBSD: syscalls.master,v 1.112 2015/12/03 10:38:21 pgoyette Exp */ #ifndef _NETBSD32_SYS_SYSCALL_H_ @@ -468,27 +468,15 @@ /* syscall: "netbsd32_sysarch" ret: "int" args: "int" "netbsd32_voidp" */ #define NETBSD32_SYS_netbsd32_sysarch 165 -#if defined(SYSVSEM) || !defined(_KERNEL_OPT) /* syscall: "compat_10_osemsys" ret: "int" args: "int" "int" "int" "int" "int" */ #define NETBSD32_SYS_compat_10_osemsys 169 -#else -/* 169 is excluded netbsd32_semsys */ -#endif -#if defined(SYSVMSG) || !defined(_KERNEL_OPT) /* syscall: "compat_10_omsgsys" ret: "int" args: "int" "int" "int" "int" "int" "int" */ #define NETBSD32_SYS_compat_10_omsgsys 170 -#else -/* 170 is excluded netbsd32_msgsys */ -#endif -#if defined(SYSVSHM) || !defined(_KERNEL_OPT) /* syscall: "compat_10_oshmsys" ret: "int" args: "int" "int" "int" "int" */ #define NETBSD32_SYS_compat_10_oshmsys 171 -#else -/* 171 is excluded netbsd32_shmsys */ -#endif /* syscall: "netbsd32_pread" ret: "netbsd32_ssize_t" args: "int" "netbsd32_voidp" "netbsd32_size_t" "int" "netbsd32_off_t" */ #define NETBSD32_SYS_netbsd32_pread 173 @@ -582,7 +570,6 @@ /* syscall: "netbsd32_poll" ret: "int" args: "netbsd32_pollfdp_t" "u_int" "int" */ #define NETBSD32_SYS_netbsd32_poll 209 -#if defined(SYSVSEM) || !defined(_KERNEL_OPT) /* syscall: "compat_14_netbsd32___semctl" ret: "int" args: "int" "int" "int" "netbsd32_semunu_t" */ #define NETBSD32_SYS_compat_14_netbsd32___semctl 220 @@ -595,13 +582,6 @@ /* syscall: "netbsd32_semconfig" ret: "int" args: "int" */ #define NETBSD32_SYS_netbsd32_semconfig 223 -#else -/* 220 is excluded compat_14_netbsd32_semctl */ -/* 221 is excluded netbsd32_semget */ -/* 222 is excluded netbsd32_semop */ -/* 223 is excluded netbsd32_semconfig */ -#endif -#if defined(SYSVMSG) || !defined(_KERNEL_OPT) /* syscall: "compat_14_netbsd32_msgctl" ret: "int" args: "int" "int" "netbsd32_msqid_ds14p_t" */ #define NETBSD32_SYS_compat_14_netbsd32_msgctl 224 @@ -614,13 +594,6 @@ /* syscall: "netbsd32_msgrcv" ret: "netbsd32_ssize_t" args: "int" "netbsd32_voidp" "netbsd32_size_t" "netbsd32_long" "int" */ #define NETBSD32_SYS_netbsd32_msgrcv 227 -#else -/* 224 is excluded compat_14_netbsd32_msgctl */ -/* 225 is excluded netbsd32_msgget */ -/* 226 is excluded netbsd32_msgsnd */ -/* 227 is excluded netbsd32_msgrcv */ -#endif -#if defined(SYSVSHM) || !defined(_KERNEL_OPT) /* syscall: "netbsd32_shmat" ret: "netbsd32_voidp" args: "int" "netbsd32_voidp" "int" */ #define NETBSD32_SYS_netbsd32_shmat 228 @@ -633,12 +606,6 @@ /* syscall: "netbsd32_shmget" ret: "int" args: "netbsd32_key_t" "netbsd32_size_t" "int" */ #define NETBSD32_SYS_netbsd32_shmget 231 -#else -/* 228 is excluded netbsd32_shmat */ -/* 229 is excluded compat_14_netbsd32_shmctl */ -/* 230 is excluded netbsd32_shmdt */ -/* 231 is excluded netbsd32_shmget */ -#endif /* syscall: "compat_50_netbsd32_clock_gettime" ret: "int" args: "netbsd32_clockid_t" "netbsd32_timespec50p_t" */ #define NETBSD32_SYS_compat_50_netbsd32_clock_gettime 232 @@ -837,27 +804,15 @@ /* syscall: "compat_20_netbsd32_fhstatfs" ret: "int" args: "netbsd32_fhandlep_t" "netbsd32_stat50p_t" */ #define NETBSD32_SYS_compat_20_netbsd32_fhstatfs 300 -#if defined(SYSVSEM) || !defined(_KERNEL_OPT) /* syscall:
CVS commit: src
Module Name:src Committed By: pgoyette Date: Thu Dec 3 10:38:21 UTC 2015 Modified Files: src/distrib/sets/lists/modules: ad.arm ad.mips md.amd64 src/sys/compat/netbsd32: netbsd32_compat_10.c netbsd32_compat_14.c netbsd32_compat_50.c netbsd32_ipc.c syscalls.master src/sys/modules: Makefile src/sys/modules/compat_netbsd32: Makefile Added Files: src/sys/compat/netbsd32: netbsd32_compat_50_sysv.c src/sys/modules/compat_netbsd32_sysvipc: Makefile Log Message: Split out the SYSV IPC stuff into its own compat_netbsd32_sysvipc module. Adjust dependencies as needed. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/modules/ad.arm \ src/distrib/sets/lists/modules/ad.mips cvs rdiff -u -r1.65 -r1.66 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.24 -r1.25 src/sys/compat/netbsd32/netbsd32_compat_10.c cvs rdiff -u -r1.21 -r1.22 src/sys/compat/netbsd32/netbsd32_compat_14.c cvs rdiff -u -r1.31 -r1.32 src/sys/compat/netbsd32/netbsd32_compat_50.c cvs rdiff -u -r0 -r1.1 src/sys/compat/netbsd32/netbsd32_compat_50_sysv.c cvs rdiff -u -r1.17 -r1.18 src/sys/compat/netbsd32/netbsd32_ipc.c cvs rdiff -u -r1.111 -r1.112 src/sys/compat/netbsd32/syscalls.master cvs rdiff -u -r1.161 -r1.162 src/sys/modules/Makefile cvs rdiff -u -r1.17 -r1.18 src/sys/modules/compat_netbsd32/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_netbsd32_sysvipc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/ad.arm diff -u src/distrib/sets/lists/modules/ad.arm:1.7 src/distrib/sets/lists/modules/ad.arm:1.8 --- src/distrib/sets/lists/modules/ad.arm:1.7 Tue Dec 1 23:59:16 2015 +++ src/distrib/sets/lists/modules/ad.arm Thu Dec 3 10:38:21 2015 @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.7 2015/12/01 23:59:16 pgoyette Exp $ +# $NetBSD: ad.arm,v 1.8 2015/12/03 10:38:21 pgoyette Exp $ ./@MODULEDIR@/compat_netbsd32 base-kernel-modules kmod ./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod base-kernel-modules kmod @@ -6,5 +6,7 @@ ./@MODULEDIR@/compat_netbsd32_mqueue/compat_netbsd32_mqueue.kmod base-kernel-modules kmod ./@MODULEDIR@/compat_netbsd32_nfssrv base-kernel-modules kmod ./@MODULEDIR@/compat_netbsd32_nfssrv/compat_netbsd32_nfssrv.kmod base-kernel-modules kmod +./@MODULEDIR@/compat_netbsd32_sysvipc base-kernel-modules kmod +./@MODULEDIR@/compat_netbsd32_sysvipc/compat_netbsd32_sysvipc.kmod base-kernel-modules kmod ./@MODULEDIR@/exec_elf32 base-kernel-modules kmod ./@MODULEDIR@/exec_elf32/exec_elf32.kmod base-kernel-modules kmod Index: src/distrib/sets/lists/modules/ad.mips diff -u src/distrib/sets/lists/modules/ad.mips:1.7 src/distrib/sets/lists/modules/ad.mips:1.8 --- src/distrib/sets/lists/modules/ad.mips:1.7 Tue Dec 1 23:59:16 2015 +++ src/distrib/sets/lists/modules/ad.mips Thu Dec 3 10:38:21 2015 @@ -1,9 +1,11 @@ -# $NetBSD: ad.mips,v 1.7 2015/12/01 23:59:16 pgoyette Exp $ +# $NetBSD: ad.mips,v 1.8 2015/12/03 10:38:21 pgoyette Exp $ ./@MODULEDIR@/compat_netbsd32 base-kernel-modules kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod base-kernel-modules kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32_mqueue base-kernel-modules kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32_mqueue/compat_netbsd32_mqueue.kmod base-kernel-modules kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32_nfssrv base-kernel-modules kmod,arch64,nocompatmodules ./@MODULEDIR@/compat_netbsd32_nfssrv/compat_netbsd32_nfssrv.kmod base-kernel-modules kmod,arch64,nocompatmodules +./@MODULEDIR@/compat_netbsd32_sysvipc base-kernel-modules kmod,arch64,nocompatmodules +./@MODULEDIR@/compat_netbsd32_sysvipc/compat_netbsd32_sysvipc.kmod base-kernel-modules kmod,arch64,nocompatmodules ./@MODULEDIR@/exec_elf32 base-kernel-modules kmod ./@MODULEDIR@/exec_elf32/exec_elf32.kmod base-kernel-modules kmod Index: src/distrib/sets/lists/modules/md.amd64 diff -u src/distrib/sets/lists/modules/md.amd64:1.65 src/distrib/sets/lists/modules/md.amd64:1.66 --- src/distrib/sets/lists/modules/md.amd64:1.65 Tue Dec 1 23:59:16 2015 +++ src/distrib/sets/lists/modules/md.amd64 Thu Dec 3 10:38:21 2015 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.65 2015/12/01 23:59:16 pgoyette Exp $ +# $NetBSD: md.amd64,v 1.66 2015/12/03 10:38:21 pgoyette Exp $ # # NOTE that there are two sets of files here: # @MODULEDIR@ and amd64-xen @@ -55,6 +55,8 @@ ./@MODULEDIR@/compat_netbsd32_mqueue/compat_netbsd32_mqueue.kmod base-kernel-modules kmod ./@MODULEDIR@/compat_netbsd32_nfssrv base-kernel-modules kmod ./@MODULEDIR@/compat_netbsd32_nfssrv/compat_netbsd32_nfssrv.kmod base-kernel-modules kmod +./@MODULEDIR@/compat_netbsd32_sysvipc base-kernel-modules kmod +./@MODULEDIR@/compat_netbsd32_sysvipc/compat_netbsd32_sysvipc.kmod base-kernel-modules kmod ./@MODULEDIR@/corambase-kernel-modules
CVS commit: src/lib/libc/ssp
Module Name:src Committed By: christos Date: Thu Dec 3 13:11:45 UTC 2015 Modified Files: src/lib/libc/ssp: ssp.3 Log Message: It is wrong to -I/usr/include/ssp To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/ssp/ssp.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/ssp/ssp.3 diff -u src/lib/libc/ssp/ssp.3:1.8 src/lib/libc/ssp/ssp.3:1.9 --- src/lib/libc/ssp/ssp.3:1.8 Wed Nov 6 21:01:42 2013 +++ src/lib/libc/ssp/ssp.3 Thu Dec 3 08:11:45 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: ssp.3,v 1.8 2013/11/07 02:01:42 christos Exp $ +.\" $NetBSD: ssp.3,v 1.9 2015/12/03 13:11:45 christos Exp $ .\" .\" Copyright (c) 2007 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd November 6, 2013 +.Dd December 3, 2015 .Dt SSP 3 .Os .Sh NAME @@ -96,8 +96,6 @@ If an overflow is detected, the routines To enable these function overrides the following should be added to the .Xr gcc 1 command line: -.Dq \-I/usr/include/ssp -to override the standard include files and .Dq \-D_FORTIFY_SOURCE=1 or .Dq \-D_FORTIFY_SOURCE=2 .
CVS commit: src/usr.bin/unzip
Module Name:src Committed By: christos Date: Thu Dec 3 20:00:12 UTC 2015 Modified Files: src/usr.bin/unzip: unzip.c Log Message: PR/50496: Alex Kozlov: teach unzip to extract symlinks Our libarchive does not handle symliks yet, but later versions do. Set mode and times for symlinks. Finally handle hardlinks for completion although they are not handled yet by librarchive. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/unzip/unzip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/unzip/unzip.c diff -u src/usr.bin/unzip/unzip.c:1.19 src/usr.bin/unzip/unzip.c:1.20 --- src/usr.bin/unzip/unzip.c:1.19 Tue Sep 6 14:43:41 2011 +++ src/usr.bin/unzip/unzip.c Thu Dec 3 15:00:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: unzip.c,v 1.19 2011/09/06 18:43:41 joerg Exp $ */ +/* $NetBSD: unzip.c,v 1.20 2015/12/03 20:00:12 christos Exp $ */ /*- * Copyright (c) 2009, 2010 Joerg Sonnenberger@@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: unzip.c,v 1.19 2011/09/06 18:43:41 joerg Exp $"); +__RCSID("$NetBSD: unzip.c,v 1.20 2015/12/03 20:00:12 christos Exp $"); #include #include @@ -131,7 +131,6 @@ errorx(const char *fmt, ...) exit(1); } -#if 0 /* non-fatal error message + errno */ __printflike(1, 2) static void warning(const char *fmt, ...) @@ -147,7 +146,7 @@ warning(const char *fmt, ...) va_end(ap); fprintf(stderr, ": %s\n", strerror(errno)); } -#endif + /* non-fatal error message, no errno */ __printflike(1, 2) static void warningx(const char *fmt, ...) @@ -499,6 +498,7 @@ extract_file(struct archive *a, struct a int cr, fd, text, warn, check; ssize_t len; unsigned char *p, *q, *end; + const char *linkname; mode = archive_entry_mode(e) & 0777; if (mode == 0) @@ -531,6 +531,32 @@ recheck: return; } + /* process symlinks */ + linkname = archive_entry_symlink(e); + if (linkname != NULL) { + if (symlink(linkname, *path) == -1) + error("symlink('%s', '%s')", linkname, *path); + info(" extracting: %s -> %s\n", *path, linkname); + if (lchmod(*path, mode) == -1) + warning("Cannot set mode for '%s'", *path); + tv[0].tv_sec = now; + tv[0].tv_usec = 0; + tv[1].tv_sec = mtime; + tv[1].tv_usec = 0; + if (lutimes(*path, tv) == -1) + warning("utimes('%s')", *path); + return; + } + + /* process hardlinks */ + linkname = archive_entry_hardlink(e); + if (linkname != NULL) { + if (link(linkname, *path) == -1) + error("link('%s', '%s')", linkname, *path); + info(" extracting: %s link to %s\n", *path, linkname); + return; + } + if ((fd = open(*path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0) error("open('%s')", *path); @@ -658,7 +684,7 @@ extract(struct archive *a, struct archiv } /* I don't think this can happen in a zipfile.. */ - if (!S_ISDIR(filetype) && !S_ISREG(filetype)) { + if (!S_ISDIR(filetype) && !S_ISREG(filetype) && !S_ISLNK(filetype)) { warningx("skipping non-regular entry '%s'", pathname); ac(archive_read_data_skip(a)); free(pathname); @@ -714,7 +740,7 @@ extract_stdout(struct archive *a, struct filetype = archive_entry_filetype(e); /* I don't think this can happen in a zipfile.. */ - if (!S_ISDIR(filetype) && !S_ISREG(filetype)) { + if (!S_ISDIR(filetype) && !S_ISREG(filetype) && !S_ISLNK(filetype)) { warningx("skipping non-regular entry '%s'", pathname); ac(archive_read_data_skip(a)); free(pathname);
CVS commit: src/usr.bin/unzip
Module Name:src Committed By: christos Date: Thu Dec 3 20:01:19 UTC 2015 Modified Files: src/usr.bin/unzip: unzip.c Log Message: simplify. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/unzip/unzip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/unzip/unzip.c diff -u src/usr.bin/unzip/unzip.c:1.20 src/usr.bin/unzip/unzip.c:1.21 --- src/usr.bin/unzip/unzip.c:1.20 Thu Dec 3 15:00:12 2015 +++ src/usr.bin/unzip/unzip.c Thu Dec 3 15:01:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: unzip.c,v 1.20 2015/12/03 20:00:12 christos Exp $ */ +/* $NetBSD: unzip.c,v 1.21 2015/12/03 20:01:19 christos Exp $ */ /*- * Copyright (c) 2009, 2010 Joerg Sonnenberger@@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: unzip.c,v 1.20 2015/12/03 20:00:12 christos Exp $"); +__RCSID("$NetBSD: unzip.c,v 1.21 2015/12/03 20:01:19 christos Exp $"); #include #include @@ -531,6 +531,11 @@ recheck: return; } + tv[0].tv_sec = now; + tv[0].tv_usec = 0; + tv[1].tv_sec = mtime; + tv[1].tv_usec = 0; + /* process symlinks */ linkname = archive_entry_symlink(e); if (linkname != NULL) { @@ -539,10 +544,6 @@ recheck: info(" extracting: %s -> %s\n", *path, linkname); if (lchmod(*path, mode) == -1) warning("Cannot set mode for '%s'", *path); - tv[0].tv_sec = now; - tv[0].tv_usec = 0; - tv[1].tv_sec = mtime; - tv[1].tv_usec = 0; if (lutimes(*path, tv) == -1) warning("utimes('%s')", *path); return; @@ -638,10 +639,6 @@ recheck: info("\n"); /* set access and modification time */ - tv[0].tv_sec = now; - tv[0].tv_usec = 0; - tv[1].tv_sec = mtime; - tv[1].tv_usec = 0; if (futimes(fd, tv) != 0) error("utimes('%s')", *path); if (close(fd) != 0)
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: christos Date: Thu Dec 3 21:04:06 UTC 2015 Modified Files: src/external/bsd/dhcpcd/dist: common.c Log Message: CID 1341552: Fix NULL deref. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/common.c diff -u src/external/bsd/dhcpcd/dist/common.c:1.15 src/external/bsd/dhcpcd/dist/common.c:1.16 --- src/external/bsd/dhcpcd/dist/common.c:1.15 Mon Nov 30 11:33:00 2015 +++ src/external/bsd/dhcpcd/dist/common.c Thu Dec 3 16:04:06 2015 @@ -1,5 +1,5 @@ #include - __RCSID("$NetBSD: common.c,v 1.15 2015/11/30 16:33:00 roy Exp $"); + __RCSID("$NetBSD: common.c,v 1.16 2015/12/03 21:04:06 christos Exp $"); /* * dhcpcd - DHCP client daemon @@ -167,7 +167,7 @@ logger(struct dhcpcd_ctx *ctx, int pri, #endif if ((ctx == NULL || !(ctx->options & DHCPCD_QUIET)) && - (pri < LOG_DEBUG || (ctx->options & DHCPCD_DEBUG))) + (pri < LOG_DEBUG || (ctx && ctx->options & DHCPCD_DEBUG))) { va_list vac;
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Thu Dec 3 21:30:54 UTC 2015 Modified Files: src/sbin/gpt: create.c gpt.c map.c map.h recover.c resizedisk.c Log Message: CID 1341556: Don't leak map info To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sbin/gpt/create.c cvs rdiff -u -r1.60 -r1.61 src/sbin/gpt/gpt.c cvs rdiff -u -r1.12 -r1.13 src/sbin/gpt/map.c cvs rdiff -u -r1.5 -r1.6 src/sbin/gpt/map.h cvs rdiff -u -r1.13 -r1.14 src/sbin/gpt/recover.c cvs rdiff -u -r1.14 -r1.15 src/sbin/gpt/resizedisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/create.c diff -u src/sbin/gpt/create.c:1.18 src/sbin/gpt/create.c:1.19 --- src/sbin/gpt/create.c:1.18 Wed Dec 2 21:02:43 2015 +++ src/sbin/gpt/create.c Thu Dec 3 16:30:54 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/create.c,v 1.11 2005/08/31 01:47:19 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: create.c,v 1.18 2015/12/03 02:02:43 christos Exp $"); +__RCSID("$NetBSD: create.c,v 1.19 2015/12/03 21:30:54 christos Exp $"); #endif #include @@ -102,7 +102,7 @@ create(gpt_t gpt, u_int parts, int force mbr->mbr_sig = htole16(MBR_SIG); gpt_create_pmbr_part(mbr->mbr_part, last); - map = map_add(gpt, 0LL, 1LL, MAP_TYPE_PMBR, mbr); + map = map_add(gpt, 0LL, 1LL, MAP_TYPE_PMBR, mbr, 1); if (gpt_write(gpt, map) == -1) { gpt_warn(gpt, "Can't write PMBR"); return -1; Index: src/sbin/gpt/gpt.c diff -u src/sbin/gpt/gpt.c:1.60 src/sbin/gpt/gpt.c:1.61 --- src/sbin/gpt/gpt.c:1.60 Wed Dec 2 21:16:00 2015 +++ src/sbin/gpt/gpt.c Thu Dec 3 16:30:54 2015 @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: gpt.c,v 1.60 2015/12/03 02:16:00 christos Exp $"); +__RCSID("$NetBSD: gpt.c,v 1.61 2015/12/03 21:30:54 christos Exp $"); #endif #include @@ -308,7 +308,7 @@ gpt_mbr(gpt_t gpt, off_t lba) (uintmax_t)lba); else if (gpt->verbose > 1) gpt_msg(gpt, "PMBR at sector %ju", (uintmax_t)lba); - p = map_add(gpt, lba, 1LL, MAP_TYPE_PMBR, mbr); + p = map_add(gpt, lba, 1LL, MAP_TYPE_PMBR, mbr, 1); goto out; } if (pmbr) @@ -316,7 +316,7 @@ gpt_mbr(gpt_t gpt, off_t lba) else if (gpt->verbose > 1) gpt_msg(gpt, "MBR at sector %ju", (uintmax_t)lba); - p = map_add(gpt, lba, 1LL, MAP_TYPE_MBR, mbr); + p = map_add(gpt, lba, 1LL, MAP_TYPE_MBR, mbr, 1); if (p == NULL) goto out; @@ -340,8 +340,7 @@ gpt_mbr(gpt_t gpt, off_t lba) mbr->mbr_part[i].part_typ, (uintmax_t)start, (uintmax_t)size); if (mbr->mbr_part[i].part_typ != MBR_PTYPE_EXT_LBA) { - // XXX: map add with non-allocated memory - m = map_add(gpt, start, size, MAP_TYPE_MBR_PART, p); + m = map_add(gpt, start, size, MAP_TYPE_MBR_PART, p, 0); if (m == NULL) return -1; m->map_index = i + 1; @@ -415,13 +414,13 @@ gpt_gpt(gpt_t gpt, off_t lba, int found) (lba == 1) ? "Pri" : "Sec", (uintmax_t)lba); m = map_add(gpt, lba, 1, (lba == 1) - ? MAP_TYPE_PRI_GPT_HDR : MAP_TYPE_SEC_GPT_HDR, hdr); + ? MAP_TYPE_PRI_GPT_HDR : MAP_TYPE_SEC_GPT_HDR, hdr, 1); if (m == NULL) return (-1); m = map_add(gpt, (off_t)le64toh((uint64_t)hdr->hdr_lba_table), (off_t)blocks, - lba == 1 ? MAP_TYPE_PRI_GPT_TBL : MAP_TYPE_SEC_GPT_TBL, p); + lba == 1 ? MAP_TYPE_PRI_GPT_TBL : MAP_TYPE_SEC_GPT_TBL, p, 1); if (m == NULL) return (-1); @@ -444,9 +443,8 @@ gpt_gpt(gpt_t gpt, off_t lba, int found) (uintmax_t)le64toh(ent->ent_lba_start), (uintmax_t)size); } - // XXX: map add with not allocated memory. m = map_add(gpt, (off_t)le64toh((uint64_t)ent->ent_lba_start), - size, MAP_TYPE_GPT_PART, ent); + size, MAP_TYPE_GPT_PART, ent, 0); if (m == NULL) return (-1); m->map_index = i + 1; @@ -835,7 +833,7 @@ gpt_create(gpt_t gpt, off_t last, u_int return -1; } if ((gpt->gpt = map_add(gpt, 1LL, 1LL, - MAP_TYPE_PRI_GPT_HDR, p)) == NULL) { + MAP_TYPE_PRI_GPT_HDR, p, 1)) == NULL) { free(p); gpt_warnx(gpt, "Can't add the primary GPT"); return -1; @@ -846,7 +844,7 @@ gpt_create(gpt_t gpt, off_t last, u_int return -1; } if ((gpt->tbl = map_add(gpt, 2LL, blocks, - MAP_TYPE_PRI_GPT_TBL, p)) == NULL) { + MAP_TYPE_PRI_GPT_TBL, p, 1)) == NULL) { free(p); gpt_warnx(gpt, "Can't add the primary GPT table"); return -1; @@ -892,13 +890,13 @@ gpt_create(gpt_t gpt, off_t last, u_int } if ((gpt->tpg = map_add(gpt, last, 1LL, - MAP_TYPE_SEC_GPT_HDR, p)) == NULL) { + MAP_TYPE_SEC_GPT_HDR, p, 1)) == NULL) { gpt_warnx(gpt, "Can't add the secondary GPT"); return -1; } if ((gpt->lbt = map_add(gpt, last - blocks, blocks, - MAP_TYPE_SEC_GPT_TBL, gpt->tbl->map_data)) == NULL) { + MAP_TYPE_SEC_GPT_TBL, gpt->tbl->map_data, 0)) == NULL) { gpt_warnx(gpt, "Can't add the secondary GPT table");
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Thu Dec 3 20:58:08 UTC 2015 Modified Files: src/sbin/gpt: add.c Log Message: CID 1341548: Check error returns To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sbin/gpt/add.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/add.c diff -u src/sbin/gpt/add.c:1.39 src/sbin/gpt/add.c:1.40 --- src/sbin/gpt/add.c:1.39 Wed Dec 2 21:02:43 2015 +++ src/sbin/gpt/add.c Thu Dec 3 15:58:08 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: add.c,v 1.39 2015/12/03 02:02:43 christos Exp $"); +__RCSID("$NetBSD: add.c,v 1.40 2015/12/03 20:58:08 christos Exp $"); #endif #include @@ -139,11 +139,13 @@ add(gpt_t gpt, off_t alignment, off_t bl } ent_set(ent, map, type, name); - gpt_write_primary(gpt); + if (gpt_write_primary(gpt) == -1) + return -1; ent = gpt_ent_backup(gpt, i); ent_set(ent, map, type, name); - gpt_write_backup(gpt); + if (gpt_write_backup(gpt) == -1) + return -1; gpt_uuid_snprintf(buf, sizeof(buf), "%d", type); gpt_msg(gpt, "Partition %d added: %s %" PRIu64 " %" PRIu64, i + 1,
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: christos Date: Thu Dec 3 21:01:50 UTC 2015 Modified Files: src/usr.sbin/makemandb: apropos-utils.c Log Message: CID 1341551: Don't bother formatting if ti == NULL To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/makemandb/apropos-utils.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/apropos-utils.c diff -u src/usr.sbin/makemandb/apropos-utils.c:1.18 src/usr.sbin/makemandb/apropos-utils.c:1.19 --- src/usr.sbin/makemandb/apropos-utils.c:1.18 Mon Nov 23 17:34:00 2015 +++ src/usr.sbin/makemandb/apropos-utils.c Thu Dec 3 16:01:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: apropos-utils.c,v 1.18 2015/11/23 22:34:00 christos Exp $ */ +/* $NetBSD: apropos-utils.c,v 1.19 2015/12/03 21:01:50 christos Exp $ */ /*- * Copyright (c) 2011 Abhinav Upadhyay* All rights reserved. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: apropos-utils.c,v 1.18 2015/11/23 22:34:00 christos Exp $"); +__RCSID("$NetBSD: apropos-utils.c,v 1.19 2015/12/03 21:01:50 christos Exp $"); #include #include @@ -910,6 +910,9 @@ term_fix_seq(TERMINAL *ti, const char *s char *res = estrdup(seq); struct nv nv; + if (ti == NULL) + return res; + nv.s = res; nv.l = 0; ti_puts(ti, seq, 1, term_putc, );
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: christos Date: Thu Dec 3 21:04:59 UTC 2015 Modified Files: src/external/bsd/dhcpcd/dist: common.c Log Message: CID 1341552: Fix NULL deref To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/common.c diff -u src/external/bsd/dhcpcd/dist/common.c:1.16 src/external/bsd/dhcpcd/dist/common.c:1.17 --- src/external/bsd/dhcpcd/dist/common.c:1.16 Thu Dec 3 16:04:06 2015 +++ src/external/bsd/dhcpcd/dist/common.c Thu Dec 3 16:04:59 2015 @@ -1,5 +1,5 @@ #include - __RCSID("$NetBSD: common.c,v 1.16 2015/12/03 21:04:06 christos Exp $"); + __RCSID("$NetBSD: common.c,v 1.17 2015/12/03 21:04:59 christos Exp $"); /* * dhcpcd - DHCP client daemon @@ -181,7 +181,7 @@ logger(struct dhcpcd_ctx *ctx, int pri, } /* Don't send to syslog if dumping leases or testing */ - if (ctx->options & (DHCPCD_DUMPLEASE | DHCPCD_TEST)) + if (ctx && ctx->options & (DHCPCD_DUMPLEASE | DHCPCD_TEST)) goto out; if (ctx && ctx->log_fd != -1) {
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Thu Dec 3 21:51:02 UTC 2015 Modified Files: src/sbin/gpt: label.c Log Message: CID 1341564: Arg memory leak To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sbin/gpt/label.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/label.c diff -u src/sbin/gpt/label.c:1.26 src/sbin/gpt/label.c:1.27 --- src/sbin/gpt/label.c:1.26 Thu Dec 3 16:48:12 2015 +++ src/sbin/gpt/label.c Thu Dec 3 16:51:02 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/label.c,v 1.3 2006/10/04 18:20:25 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: label.c,v 1.26 2015/12/03 21:48:12 christos Exp $"); +__RCSID("$NetBSD: label.c,v 1.27 2015/12/03 21:51:02 christos Exp $"); #endif #include @@ -135,21 +135,24 @@ cmd_label(gpt_t gpt, int argc, char *arg switch(ch) { case 'f': if (name_from_file(gpt, ) == -1) -return usage(); +goto usage; break; case 'l': if (gpt_name_get(gpt, ) == -1) -return usage(); +goto usage; break; default: if (gpt_add_find(gpt, , ch) == -1) -return usage(); +goto usage; break; } } if (name == NULL || argc != optind) - return usage(); + goto usage; return gpt_change_ent(gpt, , change, name); +usage: + free(name); + return -1; }
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Thu Dec 3 21:40:32 UTC 2015 Modified Files: src/sbin/gpt: backup.c Log Message: CID 1341558: Fix proplib memory leaks To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sbin/gpt/backup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/backup.c diff -u src/sbin/gpt/backup.c:1.15 src/sbin/gpt/backup.c:1.16 --- src/sbin/gpt/backup.c:1.15 Wed Dec 2 23:39:41 2015 +++ src/sbin/gpt/backup.c Thu Dec 3 16:40:32 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/show.c,v 1.14 2006/06/22 22:22:32 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: backup.c,v 1.15 2015/12/03 04:39:41 christos Exp $"); +__RCSID("$NetBSD: backup.c,v 1.16 2015/12/03 21:40:32 christos Exp $"); #endif #include @@ -66,10 +66,7 @@ struct gpt_cmd c_backup = { #define usage() gpt_usage(NULL, _backup) -#define PROP_ERR(x) if (!(x)) { \ - gpt_warnx(gpt, "proplib failure"); \ - return -1;\ - } +#define PROP_ERR(x) if (!(x)) goto cleanup #define prop_uint(a) prop_number_create_unsigned_integer(a) @@ -145,6 +142,11 @@ store_mbr(gpt_t gpt, unsigned int i, con rc = prop_array_add(*mbr_array, mbr_dict); PROP_ERR(rc); return 0; +cleanup: + if (mbr_dict) + prop_object_release(mbr_dict); + gpt_warnx(gpt, "proplib failure"); + return -1; } static int @@ -171,6 +173,10 @@ store_gpt(gpt_t gpt, const struct gpt_hd rc = prop_dictionary_set(*type_dict, "entries", propnum); PROP_ERR(rc); return 0; +cleanup: + if (*type_dict) + prop_object_release(*type_dict); + return -1; } static int @@ -186,12 +192,15 @@ store_tbl(gpt_t gpt, const map_t m, prop uint8_t utfbuf[__arraycount(ent->ent_name) * 3 + 1]; bool rc; + *type_dict = NULL; + + gpt_array = prop_array_create(); + PROP_ERR(gpt_array); + *type_dict = prop_dictionary_create(); PROP_ERR(*type_dict); ent = m->map_data; - gpt_array = prop_array_create(); - PROP_ERR(gpt_array); for (i = 1, ent = m->map_data; (const char *)ent < (const char *)(m->map_data) + m->map_size * gpt->secsz; i++, ent++) { @@ -236,6 +245,12 @@ store_tbl(gpt_t gpt, const map_t m, prop PROP_ERR(rc); prop_object_release(gpt_array); return 0; +cleanup: + if (*type_dict) + prop_object_release(*type_dict); + if (gpt_array) + prop_object_release(gpt_array); + return -1; } static int @@ -274,7 +289,7 @@ backup(gpt_t gpt, const char *outfile) mbr_array = NULL; for (i = 0; i < 4; i++) { if (store_mbr(gpt, i, mbr, _array) == -1) - return -1; + goto cleanup; } if (mbr_array != NULL) { rc = prop_dictionary_set(type_dict, @@ -288,7 +303,7 @@ backup(gpt_t gpt, const char *outfile) break; case MAP_TYPE_PRI_GPT_HDR: if (store_gpt(gpt, m->map_data, _dict) == -1) -return -1; +goto cleanup; rc = prop_dictionary_set(props, "GPT_HDR", type_dict); PROP_ERR(rc); @@ -296,7 +311,7 @@ backup(gpt_t gpt, const char *outfile) break; case MAP_TYPE_PRI_GPT_TBL: if (store_tbl(gpt, m, _dict) == -1) -return -1; +goto cleanup; rc = prop_dictionary_set(props, "GPT_TBL", type_dict); PROP_ERR(rc); prop_object_release(type_dict); @@ -310,13 +325,18 @@ backup(gpt_t gpt, const char *outfile) fp = strcmp(outfile, "-") == 0 ? stdout : fopen(outfile, "w"); if (fp == NULL) { gpt_warn(gpt, "Can't open `%s'", outfile); - return -1; + free(propext); + goto cleanup; } fputs(propext, fp); if (fp != stdout) fclose(fp); free(propext); return 0; +cleanup: + if (props) + prop_object_release(props); + return -1; } static int
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Thu Dec 3 21:46:22 UTC 2015 Modified Files: src/sbin/gpt: add.c Log Message: CID 1341561: Argument memory leak To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sbin/gpt/add.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/add.c diff -u src/sbin/gpt/add.c:1.41 src/sbin/gpt/add.c:1.42 --- src/sbin/gpt/add.c:1.41 Thu Dec 3 16:43:25 2015 +++ src/sbin/gpt/add.c Thu Dec 3 16:46:22 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: add.c,v 1.41 2015/12/03 21:43:25 christos Exp $"); +__RCSID("$NetBSD: add.c,v 1.42 2015/12/03 21:46:22 christos Exp $"); #endif #include @@ -200,10 +200,9 @@ cmd_add(gpt_t gpt, int argc, char *argv[ goto cleanup; return add(gpt, alignment, block, sectors, size, entry, name, type); +usage: + return usage(); cleanup: free(name); return -1; -usage: - free(name); - return usage(); }
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Thu Dec 3 21:48:12 UTC 2015 Modified Files: src/sbin/gpt: label.c Log Message: CID 1341563: fix leak To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sbin/gpt/label.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/label.c diff -u src/sbin/gpt/label.c:1.25 src/sbin/gpt/label.c:1.26 --- src/sbin/gpt/label.c:1.25 Wed Dec 2 20:07:28 2015 +++ src/sbin/gpt/label.c Thu Dec 3 16:48:12 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/label.c,v 1.3 2006/10/04 18:20:25 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: label.c,v 1.25 2015/12/03 01:07:28 christos Exp $"); +__RCSID("$NetBSD: label.c,v 1.26 2015/12/03 21:48:12 christos Exp $"); #endif #include @@ -98,13 +98,12 @@ name_from_file(gpt_t gpt, void *v) if ((*name = malloc(maxlen)) == NULL) { gpt_warn(gpt, "Can't copy string"); - return -1; + goto cleanup; } len = fread(*name, 1, maxlen - 1, f); if (ferror(f)) { - free(*name); gpt_warn(gpt, "Can't label from `%s'", fn); - return -1; + goto cleanup; } if (f != stdin) fclose(f); @@ -114,6 +113,11 @@ name_from_file(gpt_t gpt, void *v) if (p != NULL) *p = '\0'; return 0; +cleanup: + free(*name); + if (f != stdin) + fclose(f); + return -1; } static int
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Thu Dec 3 21:49:51 UTC 2015 Modified Files: src/sbin/gpt: biosboot.c Log Message: more leak To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sbin/gpt/biosboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/biosboot.c diff -u src/sbin/gpt/biosboot.c:1.22 src/sbin/gpt/biosboot.c:1.23 --- src/sbin/gpt/biosboot.c:1.22 Wed Dec 2 21:02:43 2015 +++ src/sbin/gpt/biosboot.c Thu Dec 3 16:49:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: biosboot.c,v 1.22 2015/12/03 02:02:43 christos Exp $ */ +/* $NetBSD: biosboot.c,v 1.23 2015/12/03 21:49:51 christos Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include #ifdef __RCSID -__RCSID("$NetBSD: biosboot.c,v 1.22 2015/12/03 02:02:43 christos Exp $"); +__RCSID("$NetBSD: biosboot.c,v 1.23 2015/12/03 21:49:51 christos Exp $"); #endif #include @@ -257,24 +257,24 @@ cmd_biosboot(gpt_t gpt, int argc, char * uint64_t size = 0; unsigned int entry = 0; uint8_t *label = NULL; - const char *bootpath = NULL; + char *bootpath = NULL; while ((ch = getopt(argc, argv, "c:i:L:")) != -1) { switch(ch) { case 'c': if (gpt_name_get(gpt, ) == -1) -return usage(); +goto usage; break; case 'i': if (gpt_uint_get() == -1) -return usage(); +goto usage; break; case 'L': if (gpt_name_get(gpt, ) == -1) -return usage(); +goto usage; break; default: - return usage(); + goto usage; } } @@ -286,18 +286,26 @@ cmd_biosboot(gpt_t gpt, int argc, char * ioctl(gpt->fd, DIOCGWEDGEINFO, ) != -1) { if (entry > 0) /* wedges and indexes are mutually exclusive */ - return usage(); + goto usage; start = dkw.dkw_offset; size = dkw.dkw_size; ngpt = gpt_open(dkw.dkw_parent, gpt->flags, gpt->verbose, gpt->mediasz, gpt->secsz); if (ngpt == NULL) - return -1; + goto cleanup; } #endif - biosboot(ngpt, start, size, entry, label, bootpath); + if (biosboot(ngpt, start, size, entry, label, bootpath) == -1) + goto cleanup; if (ngpt != gpt) gpt_close(ngpt); - return 0; +usage: + usage(); +cleanup: + if (ngpt != gpt) + gpt_close(ngpt); + free(bootpath); + free(label); + return -1; }
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Thu Dec 3 21:43:25 UTC 2015 Modified Files: src/sbin/gpt: add.c Log Message: CID 1341560: Free arg. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sbin/gpt/add.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/add.c diff -u src/sbin/gpt/add.c:1.40 src/sbin/gpt/add.c:1.41 --- src/sbin/gpt/add.c:1.40 Thu Dec 3 15:58:08 2015 +++ src/sbin/gpt/add.c Thu Dec 3 16:43:25 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: add.c,v 1.40 2015/12/03 20:58:08 christos Exp $"); +__RCSID("$NetBSD: add.c,v 1.41 2015/12/03 21:43:25 christos Exp $"); #endif #include @@ -168,20 +168,20 @@ cmd_add(gpt_t gpt, int argc, char *argv[ switch(ch) { case 'b': if (gpt_human_get() == -1) -return usage(); +goto usage; break; case 'l': if (gpt_name_get(gpt, ) == -1) -return usage(); +goto usage; break; case 't': if (gpt_uuid_get(gpt, ) == -1) -return usage(); +goto usage; break; default: if (gpt_add_ais(gpt, , , , ch) == -1) -return usage(); +goto usage; break; } } @@ -194,10 +194,16 @@ cmd_add(gpt_t gpt, int argc, char *argv[ gpt_uuid_create(GPT_TYPE_NETBSD_FFS, type, NULL, 0); if (optind != argc) - return usage(); + goto cleanup; if ((sectors = gpt_check_ais(gpt, alignment, ~0U, size)) == -1) - return -1; + goto cleanup; return add(gpt, alignment, block, sectors, size, entry, name, type); +cleanup: + free(name); + return -1; +usage: + free(name); + return usage(); }
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: pgoyette Date: Thu Dec 3 23:51:24 UTC 2015 Modified Files: src/sys/compat/linux32/common: linux32_mod.c Log Message: Update dependencies - compat_linux32 requires compat_netbsd32_sysvipc To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux32/common/linux32_mod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux32/common/linux32_mod.c diff -u src/sys/compat/linux32/common/linux32_mod.c:1.6 src/sys/compat/linux32/common/linux32_mod.c:1.7 --- src/sys/compat/linux32/common/linux32_mod.c:1.6 Tue Jul 22 08:18:33 2014 +++ src/sys/compat/linux32/common/linux32_mod.c Thu Dec 3 23:51:24 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_mod.c,v 1.6 2014/07/22 08:18:33 maxv Exp $ */ +/* $NetBSD: linux32_mod.c,v 1.7 2015/12/03 23:51:24 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.6 2014/07/22 08:18:33 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_mod.c,v 1.7 2015/12/03 23:51:24 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_execfmt.h" @@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_mod. #include #if defined(EXEC_ELF32) -# define MD1 ",exec_elf32,compat_netbsd32" +# define MD1 ",exec_elf32,compat_netbsd32,compat_netbsd32_sysvipc" #else # define MD1 "" #endif
CVS commit: src/tests/sbin/gpt
Module Name:src Committed By: christos Date: Fri Dec 4 01:06:17 UTC 2015 Added Files: src/tests/sbin/gpt: Makefile gpt.2disk.show.guid gpt.2part.show.normal gpt.backup gpt.empty.show.normal t_gpt.sh Log Message: Add some gpt tests To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tests/sbin/gpt/Makefile \ src/tests/sbin/gpt/gpt.2disk.show.guid \ src/tests/sbin/gpt/gpt.2part.show.normal src/tests/sbin/gpt/gpt.backup \ src/tests/sbin/gpt/gpt.empty.show.normal src/tests/sbin/gpt/t_gpt.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/tests/sbin/gpt/Makefile diff -u /dev/null src/tests/sbin/gpt/Makefile:1.1 --- /dev/null Thu Dec 3 20:06:17 2015 +++ src/tests/sbin/gpt/Makefile Thu Dec 3 20:06:17 2015 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2015/12/04 01:06:17 christos Exp $ + +.include + +TESTSDIR= ${TESTSBASE}/sbin/gpt + +TESTS_SH= t_gpt + +FILESDIR= ${TESTSDIR} +FILES= gpt.2disk.guid gpt.2part gpt.backup gpt.empty + +.include Index: src/tests/sbin/gpt/gpt.2disk.show.guid diff -u /dev/null src/tests/sbin/gpt/gpt.2disk.show.guid:1.1 --- /dev/null Thu Dec 3 20:06:17 2015 +++ src/tests/sbin/gpt/gpt.2disk.show.guid Thu Dec 3 20:06:17 2015 @@ -0,0 +1,8 @@ + start size index contents + 0 1 PMBR + 1 1 Pri GPT header + 2 32 Pri GPT table + 34 1024 1 GPT part - 14a91fdb-6cc2-43a5-8921-af015f62afa2 + 1058 9150 2 GPT part - a375ee9c-e829-4980-a239-6784f039c7f1 + 10208 32 Sec GPT table + 10240 1 Sec GPT header Index: src/tests/sbin/gpt/gpt.2part.show.normal diff -u /dev/null src/tests/sbin/gpt/gpt.2part.show.normal:1.1 --- /dev/null Thu Dec 3 20:06:17 2015 +++ src/tests/sbin/gpt/gpt.2part.show.normal Thu Dec 3 20:06:17 2015 @@ -0,0 +1,8 @@ + start size index contents + 0 1 PMBR + 1 1 Pri GPT header + 2 32 Pri GPT table + 34 1024 1 GPT part - EFI System + 1058 9150 2 GPT part - NetBSD FFSv1/FFSv2 + 10208 32 Sec GPT table + 10240 1 Sec GPT header Index: src/tests/sbin/gpt/gpt.backup diff -u /dev/null src/tests/sbin/gpt/gpt.backup:1.1 --- /dev/null Thu Dec 3 20:06:17 2015 +++ src/tests/sbin/gpt/gpt.backup Thu Dec 3 20:06:17 2015 @@ -0,0 +1,1851 @@ + +http://www.apple.com/DTDs/PropertyList-1.0.dtd;> + + + GPT_HDR + + entries + 128 + guid + ---- + revision + 0x1 + + GPT_TBL + + gpt_array + + +attributes +0x0 +end +0x421 +guid +---- +index +1 +start +0x22 +type +---- + + +attributes +0x0 +end +0x27df +guid +---- +index +2 +start +0x422 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +3 +start +0x0 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +4 +start +0x0 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +5 +start +0x0 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +6 +start +0x0 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +7 +start +0x0 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +8 +start +0x0 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +9 +start +0x0 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +10 +start +0x0 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +11 +start +0x0 +type +---- + + +attributes +0x0 +end +0x0 +guid +---- +index +12 +start +0x0 +type +
CVS commit: src/tests/sbin/gpt
Module Name:src Committed By: christos Date: Fri Dec 4 01:06:43 UTC 2015 Modified Files: src/tests/sbin/gpt: t_gpt.sh Log Message: I wrote that To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/gpt/t_gpt.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sbin/gpt/t_gpt.sh diff -u src/tests/sbin/gpt/t_gpt.sh:1.1 src/tests/sbin/gpt/t_gpt.sh:1.2 --- src/tests/sbin/gpt/t_gpt.sh:1.1 Thu Dec 3 20:06:17 2015 +++ src/tests/sbin/gpt/t_gpt.sh Thu Dec 3 20:06:43 2015 @@ -1,11 +1,11 @@ #!/bin/sh -# $NetBSD: t_gpt.sh,v 1.1 2015/12/04 01:06:17 christos Exp $ +# $NetBSD: t_gpt.sh,v 1.2 2015/12/04 01:06:43 christos Exp $ # -# Copyright (c) 2011 The NetBSD Foundation, Inc. +# Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. # # This code is derived from software contributed to The NetBSD Foundation -# by Jukka Ruohonen. +# by Christos Zoulas # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions
CVS commit: src/tests/sbin/gpt
Module Name:src Committed By: christos Date: Fri Dec 4 01:21:12 UTC 2015 Modified Files: src/tests/sbin/gpt: Makefile t_gpt.sh Log Message: checking multiple things does not work! atf-bug! To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/gpt/Makefile cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/gpt/t_gpt.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sbin/gpt/Makefile diff -u src/tests/sbin/gpt/Makefile:1.1 src/tests/sbin/gpt/Makefile:1.2 --- src/tests/sbin/gpt/Makefile:1.1 Thu Dec 3 20:06:17 2015 +++ src/tests/sbin/gpt/Makefile Thu Dec 3 20:21:12 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2015/12/04 01:06:17 christos Exp $ +# $NetBSD: Makefile,v 1.2 2015/12/04 01:21:12 christos Exp $ .include @@ -7,6 +7,7 @@ TESTSDIR= ${TESTSBASE}/sbin/gpt TESTS_SH= t_gpt FILESDIR= ${TESTSDIR} -FILES= gpt.2disk.guid gpt.2part gpt.backup gpt.empty +FILES= gpt.2disk.show.guid gpt.2part.show.normal gpt.empty.show.normal +FILES+= gpt.backup .include Index: src/tests/sbin/gpt/t_gpt.sh diff -u src/tests/sbin/gpt/t_gpt.sh:1.2 src/tests/sbin/gpt/t_gpt.sh:1.3 --- src/tests/sbin/gpt/t_gpt.sh:1.2 Thu Dec 3 20:06:43 2015 +++ src/tests/sbin/gpt/t_gpt.sh Thu Dec 3 20:21:12 2015 @@ -1,5 +1,4 @@ -#!/bin/sh -# $NetBSD: t_gpt.sh,v 1.2 2015/12/04 01:06:43 christos Exp $ +# $NetBSD: t_gpt.sh,v 1.3 2015/12/04 01:21:12 christos Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,11 +48,12 @@ prepare_2part() { gpt add $disk } +# Calling this from tests does not work. BUG! check_2part() { - atf_check -s exit:0 -o file:gpt.2part.show.normal \ - -e empty gpt show $disk - atf_check -s exit:0 -o file:gpt.2part.show.guid \ - -e empty gpt show -g $disk +# atf_check -s exit:0 -o file:gpt.2part.show.normal \ +# -e empty gpt show $disk +# atf_check -s exit:0 -o file:gpt.2part.show.guid \ +# -e empty gpt show -g $disk } partmsg() {
CVS commit: src/tests/sbin/gpt
Module Name:src Committed By: christos Date: Fri Dec 4 01:42:47 UTC 2015 Modified Files: src/tests/sbin/gpt: Makefile t_gpt.sh Added Files: src/tests/sbin/gpt: gpt.2part.show.uuid Log Message: Make the test work To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/gpt/Makefile cvs rdiff -u -r0 -r1.1 src/tests/sbin/gpt/gpt.2part.show.uuid cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/gpt/t_gpt.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sbin/gpt/Makefile diff -u src/tests/sbin/gpt/Makefile:1.2 src/tests/sbin/gpt/Makefile:1.3 --- src/tests/sbin/gpt/Makefile:1.2 Thu Dec 3 20:21:12 2015 +++ src/tests/sbin/gpt/Makefile Thu Dec 3 20:42:47 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2015/12/04 01:21:12 christos Exp $ +# $NetBSD: Makefile,v 1.3 2015/12/04 01:42:47 christos Exp $ .include @@ -7,7 +7,7 @@ TESTSDIR= ${TESTSBASE}/sbin/gpt TESTS_SH= t_gpt FILESDIR= ${TESTSDIR} -FILES= gpt.2disk.show.guid gpt.2part.show.normal gpt.empty.show.normal +FILES= gpt.2part.show.uuid gpt.2part.show.normal gpt.empty.show.normal FILES+= gpt.backup .include Index: src/tests/sbin/gpt/t_gpt.sh diff -u src/tests/sbin/gpt/t_gpt.sh:1.3 src/tests/sbin/gpt/t_gpt.sh:1.4 --- src/tests/sbin/gpt/t_gpt.sh:1.3 Thu Dec 3 20:21:12 2015 +++ src/tests/sbin/gpt/t_gpt.sh Thu Dec 3 20:42:47 2015 @@ -1,4 +1,4 @@ -# $NetBSD: t_gpt.sh,v 1.3 2015/12/04 01:21:12 christos Exp $ +# $NetBSD: t_gpt.sh,v 1.4 2015/12/04 01:42:47 christos Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -33,6 +33,7 @@ shdr=34 disk=gpt.disk uuid="----" zero="----" +src=$(atf_get_srcdir) prepare() { rm -f $disk @@ -50,10 +51,10 @@ prepare_2part() { # Calling this from tests does not work. BUG! check_2part() { -# atf_check -s exit:0 -o file:gpt.2part.show.normal \ -# -e empty gpt show $disk -# atf_check -s exit:0 -o file:gpt.2part.show.guid \ -# -e empty gpt show -g $disk + atf_check -s exit:0 -o file:"$src/gpt.2part.show.normal" \ + -e empty gpt show $disk + atf_check -s exit:0 -o file:"$src/gpt.2part.show.uuid" \ + -e empty gpt show -u $disk } partmsg() { @@ -72,7 +73,7 @@ create_empty_head() { create_empty_body() { prepare atf_check -s exit:0 -o empty -e empty gpt create $disk - atf_check -s exit:0 -o file:gpt.empty.show.normal \ + atf_check -s exit:0 -o file:"$src/gpt.empty.show.normal" \ -e empty gpt show $disk } @@ -94,8 +95,8 @@ backup_2part_head() { backup_2part_body() { prepare_2part atf_check -s exit:0 -o save:test.backup -e empty gpt backup $disk - atf_check -s exit:0 -o file:gpt.backup -e empty \ - sed -e "s/$uuid/$zero/g" test.backup + atf_check -s exit:0 -o file:"$src/gpt.backup" -e empty \ + sed -e "s/$uuid/$zero/g" "test.backup" } atf_test_case restore_2part Added files: Index: src/tests/sbin/gpt/gpt.2part.show.uuid diff -u /dev/null src/tests/sbin/gpt/gpt.2part.show.uuid:1.1 --- /dev/null Thu Dec 3 20:42:47 2015 +++ src/tests/sbin/gpt/gpt.2part.show.uuid Thu Dec 3 20:42:47 2015 @@ -0,0 +1,8 @@ + start size index contents + 0 1 PMBR + 1 1 Pri GPT header + 2 32 Pri GPT table + 34 1024 1 GPT part - c12a7328-f81f-11d2-ba4b-00a0c93ec93b + 1058 9150 2 GPT part - 49f48d5a-b10e-11dc-b99b-0019d1879648 + 10208 32 Sec GPT table + 10240 1 Sec GPT header
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Fri Dec 4 01:47:48 UTC 2015 Modified Files: src/sbin/gpt: label.c Log Message: put back usage from kre To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sbin/gpt/label.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/label.c diff -u src/sbin/gpt/label.c:1.27 src/sbin/gpt/label.c:1.28 --- src/sbin/gpt/label.c:1.27 Thu Dec 3 16:51:02 2015 +++ src/sbin/gpt/label.c Thu Dec 3 20:47:48 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/label.c,v 1.3 2006/10/04 18:20:25 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: label.c,v 1.27 2015/12/03 21:51:02 christos Exp $"); +__RCSID("$NetBSD: label.c,v 1.28 2015/12/04 01:47:48 christos Exp $"); #endif #include @@ -153,6 +153,7 @@ cmd_label(gpt_t gpt, int argc, char *arg return gpt_change_ent(gpt, , change, name); usage: + usage(); free(name); return -1; }
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Fri Dec 4 01:46:32 UTC 2015 Modified Files: src/sbin/gpt: gpt.c gpt.h Log Message: don't print dkctl message for files fix typo To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sbin/gpt/gpt.c cvs rdiff -u -r1.28 -r1.29 src/sbin/gpt/gpt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/gpt.c diff -u src/sbin/gpt/gpt.c:1.61 src/sbin/gpt/gpt.c:1.62 --- src/sbin/gpt/gpt.c:1.61 Thu Dec 3 16:30:54 2015 +++ src/sbin/gpt/gpt.c Thu Dec 3 20:46:32 2015 @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: gpt.c,v 1.61 2015/12/03 21:30:54 christos Exp $"); +__RCSID("$NetBSD: gpt.c,v 1.62 2015/12/04 01:46:32 christos Exp $"); #endif #include @@ -518,6 +518,7 @@ gpt_open(const char *dev, int flags, int } } } else { + gpt->flags |= GPT_FILE; if (gpt->secsz == 0) gpt->secsz = 512; /* Fixed size for files. */ if (gpt->mediasz == 0) { @@ -538,7 +539,7 @@ gpt_open(const char *dev, int flags, int */ devsz = gpt->mediasz / gpt->secsz; if (devsz < 6) { - gpt_warnx(gpt, "Need 6 sectorso, we have %ju", + gpt_warnx(gpt, "Need 6 sectors, we have %ju", (uintmax_t)devsz); goto close; } @@ -583,8 +584,9 @@ gpt_close(gpt_t gpt) goto out; #endif } - gpt_msg(gpt, "You need to run \"dkctl %s makewedges\"" - " for the changes to take effect\n", gpt->device_name); + if (!(gpt->flags & GPT_FILE)) + gpt_msg(gpt, "You need to run \"dkctl %s makewedges\"" + " for the changes to take effect\n", gpt->device_name); out: close(gpt->fd); @@ -715,7 +717,6 @@ gpt_create_pmbr_part(struct mbr_part *pa } } - struct gpt_ent * gpt_ent(map_t map, map_t tbl, unsigned int i) { Index: src/sbin/gpt/gpt.h diff -u src/sbin/gpt/gpt.h:1.28 src/sbin/gpt/gpt.h:1.29 --- src/sbin/gpt/gpt.h:1.28 Wed Dec 2 21:02:43 2015 +++ src/sbin/gpt/gpt.h Thu Dec 3 20:46:32 2015 @@ -75,10 +75,11 @@ uint32_t crc32(const void *, size_t); void gpt_close(gpt_t); int gpt_gpt(gpt_t, off_t, int); gpt_t gpt_open(const char *, int, int, off_t, u_int); -#define GPT_READONLY 1 -#define GPT_MODIFIED 2 -#define GPT_QUIET 4 -#define GPT_NOSYNC 8 +#define GPT_READONLY 0x01 +#define GPT_MODIFIED 0x02 +#define GPT_QUIET 0x04 +#define GPT_NOSYNC 0x08 +#define GPT_FILE 0x10 void* gpt_read(gpt_t, off_t, size_t); off_t gpt_last(gpt_t);
CVS commit: src/external/bsd/atf/dist/atf-sh
Module Name:src Committed By: christos Date: Fri Dec 4 01:43:58 UTC 2015 Modified Files: src/external/bsd/atf/dist/atf-sh: atf-check.cpp Log Message: fix the open error messages to include the right file and strerror To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/atf/dist/atf-sh/atf-check.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-sh/atf-check.cpp diff -u src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.9 src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.10 --- src/external/bsd/atf/dist/atf-sh/atf-check.cpp:1.9 Sat Feb 8 14:13:44 2014 +++ src/external/bsd/atf/dist/atf-sh/atf-check.cpp Thu Dec 3 20:43:58 2015 @@ -359,11 +359,20 @@ execute_with_shell(char* const* argv) static void +open_error(const atf::fs::path& path) +{ +throw std::runtime_error("Failed to open " + path.str() + " " + + ::strerror(errno)); +} + + +static +void cat_file(const atf::fs::path& path) { std::ifstream stream(path.c_str()); if (!stream) -throw std::runtime_error("Failed to open " + path.str()); + open_error(path); stream >> std::noskipws; std::istream_iterator< char > begin(stream), end; @@ -379,7 +388,7 @@ grep_file(const atf::fs::path& path, con { std::ifstream stream(path.c_str()); if (!stream) -throw std::runtime_error("Failed to open " + path.str()); + open_error(path); bool found = false; @@ -410,11 +419,11 @@ compare_files(const atf::fs::path& p1, c std::ifstream f1(p1.c_str()); if (!f1) -throw std::runtime_error("Failed to open " + p1.str()); + open_error(p1); std::ifstream f2(p2.c_str()); if (!f2) -throw std::runtime_error("Failed to open " + p1.str()); + open_error(p2); for (;;) { char buf1[512], buf2[512];
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Fri Dec 4 01:46:12 UTC 2015 Modified Files: src/sbin/gpt: show.c Log Message: fix label printing. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sbin/gpt/show.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/show.c diff -u src/sbin/gpt/show.c:1.29 src/sbin/gpt/show.c:1.30 --- src/sbin/gpt/show.c:1.29 Wed Dec 2 21:02:43 2015 +++ src/sbin/gpt/show.c Thu Dec 3 20:46:12 2015 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/show.c,v 1.14 2006/06/22 22:22:32 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: show.c,v 1.29 2015/12/03 02:02:43 christos Exp $"); +__RCSID("$NetBSD: show.c,v 1.30 2015/12/04 01:46:12 christos Exp $"); #endif #include @@ -137,7 +137,7 @@ show(gpt_t gpt, int show) if (show & SHOW_LABEL) { utf16_to_utf8(ent->ent_name, utfbuf, sizeof(utfbuf)); -b = (char *)buf; +b = (char *)utfbuf; } else if (show & SHOW_GUID) { gpt_uuid_snprintf( buf, sizeof(buf), "%d", ent->ent_guid);
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Fri Dec 4 02:26:12 UTC 2015 Modified Files: src/sys/net: if_gif.c Log Message: gif(4): Infinite recursion calls prevention code works again now. The prevention code haven't worked since gif(4) was changed to use softint(9). To work this prevention, git_output uses m_tag(9) like FreeBSD and OpenBSD. I tested with following code. # ifconfig gif0 create # ifconfig gif0 tunnel 10.1.1.1 10.1.1.2 # ifconfig gif0 inet 192.168.100.1 192.168.100.100 # ifconfig gif1 create # ifconfig gif1 tunnel 192.168.100.1 192.168.100.100 # ifconfig gif1 inet 192.168.101.1 192.168.101.101 # ifconfig gif2 create # ifconfig gif2 tunnel 192.168.101.1 192.168.101.101 # ifconfig gif2 inet 192.168.102.1 192.168.102.102 # ping -w 1 -c 1 192.168.102.102 # dmesg | tail -n 1 gif0: recursively called too many times(2) To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/net/if_gif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_gif.c diff -u src/sys/net/if_gif.c:1.94 src/sys/net/if_gif.c:1.95 --- src/sys/net/if_gif.c:1.94 Thu Dec 3 03:03:58 2015 +++ src/sys/net/if_gif.c Fri Dec 4 02:26:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gif.c,v 1.94 2015/12/03 03:03:58 knakahara Exp $ */ +/* $NetBSD: if_gif.c,v 1.95 2015/12/04 02:26:11 knakahara Exp $ */ /* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.94 2015/12/03 03:03:58 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.95 2015/12/04 02:26:11 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -94,6 +94,7 @@ LIST_HEAD(, gif_softc) gif_softc_list; / static int gif_clone_create(struct if_clone *, int); static int gif_clone_destroy(struct ifnet *); +static int gif_check_nesting(struct ifnet *, struct mbuf *); static struct if_clone gif_cloner = IF_CLONE_INITIALIZER("gif", gif_clone_create, gif_clone_destroy); @@ -233,31 +234,56 @@ gif_encapcheck(struct mbuf *m, int off, } #endif +/* + * gif may cause infinite recursion calls when misconfigured. + * We'll prevent this by introducing upper limit. + */ +static int +gif_check_nesting(struct ifnet *ifp, struct mbuf *m) +{ + struct m_tag *mtag; + int *count; + + mtag = m_tag_find(m, PACKET_TAG_TUNNEL_INFO, NULL); + if (mtag != NULL) { + count = (int *)(mtag + 1); + if (++(*count) > max_gif_nesting) { + log(LOG_NOTICE, + "%s: recursively called too many times(%d)\n", + if_name(ifp), + *count); + return EIO; + } + } else { + mtag = m_tag_get(PACKET_TAG_TUNNEL_INFO, sizeof(*count), + M_NOWAIT); + if (mtag != NULL) { + m_tag_prepend(m, mtag); + count = (int *)(mtag + 1); + *count = 0; + } else { + log(LOG_DEBUG, + "%s: m_tag_get() failed, recursion calls are not prevented.\n", + if_name(ifp)); + } + } + + return 0; +} + int gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, struct rtentry *rt) { struct gif_softc *sc = ifp->if_softc; int error = 0; - static int called = 0; /* XXX: MUTEX */ ALTQ_DECL(struct altq_pktattr pktattr;) int s; IFQ_CLASSIFY(>if_snd, m, dst->sa_family, ); - /* - * gif may cause infinite recursion calls when misconfigured. - * We'll prevent this by introducing upper limit. - * XXX: this mechanism may introduce another problem about - * mutual exclusion of the variable CALLED, especially if we - * use kernel thread. - */ - if (++called > max_gif_nesting) { - log(LOG_NOTICE, - "gif_output: recursively called too many times(%d)\n", - called); - m_freem(m); - error = EIO; /* is there better errno? */ + if ((error = gif_check_nesting(ifp, m)) != 0) { + m_free(m); goto end; } @@ -295,7 +321,6 @@ gif_output(struct ifnet *ifp, struct mbu error = 0; end: - called = 0; /* reset recursion counter */ if (error) ifp->if_oerrors++; return error;