svn commit: r278180 - stable/10/usr.sbin/portsnap/phttpget

2015-02-03 Thread Xin LI
Author: delphij
Date: Wed Feb  4 00:56:55 2015
New Revision: 278180
URL: https://svnweb.freebsd.org/changeset/base/278180

Log:
  MFC r276571: Add a manual page for phttpget(8).

Added:
  stable/10/usr.sbin/portsnap/phttpget/phttpget.8
 - copied unchanged from r276571, head/usr.sbin/portsnap/phttpget/phttpget.8
Modified:
  stable/10/usr.sbin/portsnap/phttpget/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/portsnap/phttpget/Makefile
==
--- stable/10/usr.sbin/portsnap/phttpget/Makefile   Wed Feb  4 00:52:58 
2015(r278179)
+++ stable/10/usr.sbin/portsnap/phttpget/Makefile   Wed Feb  4 00:56:55 
2015(r278180)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PROG=  phttpget
-MAN=
+MAN=   phttpget.8
 
 BINDIR=${LIBEXECDIR}
 

Copied: stable/10/usr.sbin/portsnap/phttpget/phttpget.8 (from r276571, 
head/usr.sbin/portsnap/phttpget/phttpget.8)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/usr.sbin/portsnap/phttpget/phttpget.8 Wed Feb  4 00:56:55 
2015(r278180, copy of r276571, 
head/usr.sbin/portsnap/phttpget/phttpget.8)
@@ -0,0 +1,88 @@
+.\-
+.\ Copyright (c) 2015 Xin Li delp...@freebsd.org
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\ ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.\ $FreeBSD$
+.\
+.Dd January 3, 2015
+.Dt PHTTPGET 8
+.Os
+.Sh NAME
+.Nm phttpget
+.Nd retrieve multiple files via pipelined HTTP
+.Sh SYNOPSIS
+.Nm
+.Ar server
+.Ar file ...
+.Sh DESCRIPTION
+The
+.Nm
+utility is a minimalist pipelined HTTP client,
+which is used to retrieve multiple
+.Ar file Ns s
+from one
+.Ar server ,
+and saves the downloaded files in the current working directory,
+using the last portion of their download path as file names.
+.Pp
+By making several in flight HTTP requests,
+it can dramatically increase performance when a large number of
+small files need to be downloaded.
+.Pp
+The
+.Xr freebsd-update 8
+and
+.Xr portnap 8
+tools use
+.Nm
+to download binary patch files.
+.Sh ENVIRONMENT
+.Bl -tag -width HTTP_PROXY_AUTH
+.It Ev HTTP_PROXY
+URL of the proxy to use for HTTP requests.
+.It Ev HTTP_PROXY_AUTH
+Authorization parameters for the HTTP proxy.
+.It Ev HTTP_USER_AGENT
+The User-Agent string to use for HTTP requests.
+The default is
+.Dq phttpget/0.1 .
+.It Ev HTTP_TIMEOUT
+Timeout for HTTP request in seconds.
+.El
+.Sh SEE ALSO
+.Xr fetch 1 ,
+.Xr freebsd-update 8 ,
+.Xr portsnap 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+utility was written by
+.An Colin Percival Aq Mt cperc...@freebsd.org
+for use with
+.Xr portsnap 8
+and later with
+.Xr freebsd-update 8 .
+This manual page was written by
+.An Xin LI Aq Mt delp...@freebsd.org .
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r284879 - stable/10/sys/dev/hpt27xx

2015-06-26 Thread Xin LI
Author: delphij
Date: Fri Jun 26 19:55:01 2015
New Revision: 284879
URL: https://svnweb.freebsd.org/changeset/base/284879

Log:
  MFC r267386,269611,284730:
  
  Update vendor driver to 1.2.7.  This update improves driver reliability and
  adds support of 4Kn drives and report LUNs command.
  
  Many thanks to HighPoint for providing this driver update.

Modified:
  stable/10/sys/dev/hpt27xx/README
  stable/10/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu   (contents, props 
changed)
  stable/10/sys/dev/hpt27xx/array.h
  stable/10/sys/dev/hpt27xx/him.h
  stable/10/sys/dev/hpt27xx/himfuncs.h
  stable/10/sys/dev/hpt27xx/hpt27xx_config.c
  stable/10/sys/dev/hpt27xx/hpt27xx_config.h
  stable/10/sys/dev/hpt27xx/hpt27xx_os_bsd.c
  stable/10/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
  stable/10/sys/dev/hpt27xx/hptintf.h
  stable/10/sys/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu
  stable/10/sys/dev/hpt27xx/ldm.h
  stable/10/sys/dev/hpt27xx/list.h
  stable/10/sys/dev/hpt27xx/os_bsd.h
  stable/10/sys/dev/hpt27xx/osm.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hpt27xx/README
==
--- stable/10/sys/dev/hpt27xx/READMEFri Jun 26 18:03:19 2015
(r284878)
+++ stable/10/sys/dev/hpt27xx/READMEFri Jun 26 19:55:01 2015
(r284879)
@@ -1,10 +1,34 @@
 RocketRAID Controller Driver for FreeBSD
-Copyright (C) 2011 HighPoint Technologies, Inc. All rights reserved.
+Copyright (C) 2005-2015 HighPoint Technologies, Inc. All rights reserved.
 
 #
 Revision History:
-   v1.0 2011-12-27
-First source code release
+   v1.2.7.1 06/08/2015
+   * Add 10.x comment and correct file name in readme.
+   
+   v1.2.7 05/22/2015
+   * Support Report Luns command.
+   
+   v1.2.6 04/13/2015
+   * Fix a bug that some disks will be dropped when data integrity test over
+ one hour on 32bit system.
+  
+   v1.2.5 01/26/2015
+* Fix a bug that failed to verify controller by retrying 8 times.
+* Supported 4Kn drive.
+
+   v1.2.4 09/29/2014
+* Fix a bug that memory would be corrupted and caused strange system
+  behavior when running IO and WebGUI
+
+   v1.2.3 01/24/2014
+* fixup system crash while write date to raid5.
+
+   v1.1   07/01/2013
+* Fix 2nd RAID controller can not load as multipath issue.
+
+   v1.0   12/13/2011
+* First source code release
 
 #
 
@@ -40,7 +64,7 @@ Revision History:
   2) Extract the driver files under the kernel source tree:
 
  # cd /usr/src/sys/
- # tar xvzf /your/path/to/hpt27xx-freebsd-src-v1.0-111227.tgz
+ # tar xvzf /your/path/to/HPT27xx_FreeBSD_Src_v1.2.7.1_15_06_08.tgz
 
   3) Update the kernel configuration file to include the HighPoint source.
  Assume the configure file is GENERIC, and new kernel configure file is 
@@ -62,8 +86,8 @@ Revision History:
   compile-withuudecode  
$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu \
   no-implicit-rule
 
-  dev/hpt27xx/os_bsd.c  optionalhpt27xx
-  dev/hpt27xx/osm_bsd.c optionalhpt27xx
+  dev/hpt27xx/hpt27xx_os_bsd.c  optionalhpt27xx
+  dev/hpt27xx/hpt27xx_osm_bsd.c optionalhpt27xx
   dev/hpt27xx/hpt27xx_config.c  optionalhpt27xx
 
  For amd64 system, edit /usr/src/sys/conf/files.amd64 and append the lines
@@ -74,13 +98,13 @@ Revision History:
   compile-withuudecode  
$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu \
   no-implicit-rule
 
-  dev/hpt27xx/os_bsd.c  optionalhpt27xx
-  dev/hpt27xx/osm_bsd.c optionalhpt27xx
+  dev/hpt27xx/hpt27xx_os_bsd.c  optionalhpt27xx
+  dev/hpt27xx/hpt27xx_osm_bsd.c optionalhpt27xx
   dev/hpt27xx/hpt27xx_config.c  optionalhpt27xx
 
   6) Rebuild and install the kernel:
 
- a) for FreeBSD 5.x-i386/6.x-i386/7.x-i386/8.x-i386/9.x-i386:
+ a) for FreeBSD 5.x-i386/6.x-i386/7.x-i386/8.x-i386/9.x-i386/10.x-i386:
  
 # cd /usr/src/sys/i386/conf/
 # /usr/sbin/config MYKERNEL
@@ -89,7 +113,7 @@ Revision History:
 # make 
 # make install
 
- b) for FreeBSD 5.x-amd64/6.x-amd64/7.x-amd64/8.x-amd64/9.x-amd64:
+ b) for FreeBSD 
5.x-amd64/6.x-amd64/7.x-amd64/8.x-amd64/9.x-amd64/10.x-amd64:
 
 # cd /usr/src/sys/amd64/conf/
 # /usr/sbin/config MYKERNEL
@@ -122,7 +146,7 @@ Revision History:
   2) Extract the driver files under the kernel source tree:
 
  # cd /usr/src/sys/
- # tar xvzf /your/path/to/hpt27xx-freebsd-src-v1.0-111227.tgz
+ # tar xvzf /your/path/to/HPT27xx_FreeBSD_Src_v1.2.7.1_15_06_08.tgz
 
 
   4) Build the driver module:
@@ -136,7 +160,7 @@ Revision History:
  
  # cp hpt27xx.ko 

svn commit: r284778 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic

2015-06-24 Thread Xin LI
Author: delphij
Date: Wed Jun 24 19:58:14 2015
New Revision: 284778
URL: https://svnweb.freebsd.org/changeset/base/284778

Log:
  MFC r284237,284277:
  
  file 5.23.
  
  Relnotes: yes

Added:
  stable/10/contrib/file/magic/Magdir/cbor
 - copied unchanged from r284237, head/contrib/file/magic/Magdir/cbor
  stable/10/contrib/file/magic/Magdir/nasa
 - copied unchanged from r284237, head/contrib/file/magic/Magdir/nasa
  stable/10/contrib/file/src/gmtime_r.c
 - copied unchanged from r284237, head/contrib/file/src/gmtime_r.c
  stable/10/contrib/file/src/localtime_r.c
 - copied unchanged from r284237, head/contrib/file/src/localtime_r.c
Modified:
  stable/10/contrib/file/ChangeLog
  stable/10/contrib/file/Makefile.in
  stable/10/contrib/file/TODO
  stable/10/contrib/file/aclocal.m4
  stable/10/contrib/file/compile
  stable/10/contrib/file/config.h.in
  stable/10/contrib/file/configure
  stable/10/contrib/file/configure.ac
  stable/10/contrib/file/depcomp
  stable/10/contrib/file/doc/Makefile.in
  stable/10/contrib/file/doc/file.man
  stable/10/contrib/file/doc/libmagic.man
  stable/10/contrib/file/ltmain.sh
  stable/10/contrib/file/magic/Magdir/android
  stable/10/contrib/file/magic/Magdir/apple
  stable/10/contrib/file/magic/Magdir/archive
  stable/10/contrib/file/magic/Magdir/audio
  stable/10/contrib/file/magic/Magdir/cafebabe
  stable/10/contrib/file/magic/Magdir/commands
  stable/10/contrib/file/magic/Magdir/compress
  stable/10/contrib/file/magic/Magdir/console
  stable/10/contrib/file/magic/Magdir/dyadic
  stable/10/contrib/file/magic/Magdir/filesystems
  stable/10/contrib/file/magic/Magdir/gnu
  stable/10/contrib/file/magic/Magdir/images
  stable/10/contrib/file/magic/Magdir/jpeg
  stable/10/contrib/file/magic/Magdir/linux
  stable/10/contrib/file/magic/Magdir/mach
  stable/10/contrib/file/magic/Magdir/mathematica
  stable/10/contrib/file/magic/Magdir/misctools
  stable/10/contrib/file/magic/Magdir/modem
  stable/10/contrib/file/magic/Magdir/mozilla
  stable/10/contrib/file/magic/Magdir/os2
  stable/10/contrib/file/magic/Magdir/pdf
  stable/10/contrib/file/magic/Magdir/perl
  stable/10/contrib/file/magic/Magdir/riff
  stable/10/contrib/file/magic/Magdir/sereal
  stable/10/contrib/file/magic/Magdir/sgml
  stable/10/contrib/file/magic/Magdir/varied.script
  stable/10/contrib/file/magic/Magdir/vorbis
  stable/10/contrib/file/magic/Makefile.am
  stable/10/contrib/file/magic/Makefile.in
  stable/10/contrib/file/missing
  stable/10/contrib/file/python/Makefile.in
  stable/10/contrib/file/src/Makefile.in
  stable/10/contrib/file/src/apprentice.c
  stable/10/contrib/file/src/ascmagic.c
  stable/10/contrib/file/src/cdf.c
  stable/10/contrib/file/src/cdf.h
  stable/10/contrib/file/src/compress.c
  stable/10/contrib/file/src/encoding.c
  stable/10/contrib/file/src/file.c
  stable/10/contrib/file/src/file.h
  stable/10/contrib/file/src/file_opts.h
  stable/10/contrib/file/src/fsmagic.c
  stable/10/contrib/file/src/funcs.c
  stable/10/contrib/file/src/is_tar.c
  stable/10/contrib/file/src/magic.c
  stable/10/contrib/file/src/magic.h
  stable/10/contrib/file/src/magic.h.in
  stable/10/contrib/file/src/print.c
  stable/10/contrib/file/src/readcdf.c
  stable/10/contrib/file/src/readelf.c
  stable/10/contrib/file/src/softmagic.c
  stable/10/contrib/file/tests/Makefile.in
  stable/10/lib/libmagic/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/file/ChangeLog
==
--- stable/10/contrib/file/ChangeLogWed Jun 24 19:16:41 2015
(r284777)
+++ stable/10/contrib/file/ChangeLogWed Jun 24 19:58:14 2015
(r284778)
@@ -1,3 +1,56 @@
+2015-06-11   8:52  Christos Zoulas chris...@zoulas.com
+
+   * redo long option encoding to fix off-by-one in 5.23
+
+2015-06-10  13:50  Christos Zoulas chris...@zoulas.com
+
+   * release 5.23
+
+2015-06-09  16:10  Christos Zoulas chris...@zoulas.com
+   
+   * Fix issue with regex range for magic with offset
+   * Always return true from mget with USE (success to mget not match
+ indication). Fixes mime evaluation after USE magic
+   * PR/459: Don't insert magic entries to the list if there are parsing
+ errors for them.
+
+2015-06-03  16:00  Christos Zoulas chris...@zoulas.com
+
+   * PR/455: Add utf-7 encoding
+
+2015-06-03  14:30  Christos Zoulas chris...@zoulas.com
+
+   * PR/455: Implement -Z, look inside, but don't report on compression
+   * PR/454: Fix allocation error on bad magic.
+
+2015-05-29  10:30  Christos Zoulas chris...@zoulas.com
+
+   * handle MAGIC_CONTINUE everywhere, not just in softmagic
+
+2015-05-21  14:30  Christos Zoulas chris...@zoulas.com
+
+   * don't print descriptions for NAME types when mime.
+
+2015-04-09  15:59  Christos Zoulas chris...@zoulas.com
+
+   * Add --extension to list the known extensions for this file type
+ Idea by Andrew J 

svn commit: r284418 - in stable/10/sys: fs/procfs kern

2015-06-15 Thread Xin LI
Author: delphij
Date: Mon Jun 15 18:16:23 2015
New Revision: 284418
URL: https://svnweb.freebsd.org/changeset/base/284418

Log:
  MFC r283889,r283891:
  
  Clear p_stops when doing PT_DETACH and PROCFS_CTL_DETACH.
  
  Without this, if a process was being traced by truss(1), which
  uses different p_stops bits than gdb(1), the latter would
  misbehave because of the unexpected bits.
  
  Reported by:  jceel
  Submitted by: sef
  Sponsored by: iXsystems, Inc.

Modified:
  stable/10/sys/fs/procfs/procfs_ctl.c
  stable/10/sys/kern/sys_process.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/procfs/procfs_ctl.c
==
--- stable/10/sys/fs/procfs/procfs_ctl.cMon Jun 15 15:34:20 2015
(r284417)
+++ stable/10/sys/fs/procfs/procfs_ctl.cMon Jun 15 18:16:23 2015
(r284418)
@@ -235,6 +235,7 @@ out:
} else
PROC_LOCK(p);
p-p_oppid = 0;
+   p-p_stops = 0;
p-p_flag = ~P_WAITED; /* XXX ? */
sx_xunlock(proctree_lock);
 

Modified: stable/10/sys/kern/sys_process.c
==
--- stable/10/sys/kern/sys_process.cMon Jun 15 15:34:20 2015
(r284417)
+++ stable/10/sys/kern/sys_process.cMon Jun 15 18:16:23 2015
(r284418)
@@ -963,6 +963,7 @@ kern_ptrace(struct thread *td, int req, 
CTR1(KTR_PTRACE, PT_DETACH: pid %d, p-p_pid);
p-p_oppid = 0;
p-p_flag = ~(P_TRACED | P_WAITED | P_FOLLOWFORK);
+   p-p_stops = 0;
 
/* should we send SIGCHLD? */
/* childproc_continued(p); */
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r284938 - stable/10/usr.sbin/freebsd-update

2015-06-29 Thread Xin LI
Author: delphij
Date: Mon Jun 29 18:56:53 2015
New Revision: 284938
URL: https://svnweb.freebsd.org/changeset/base/284938

Log:
  MFC r274630,r274653 (feld):
  
  Add logic for detecting non-persistent filesystems being utilized by
  workdir which would break the upgrade process upon reboot.
  
  Currently we check for tmpfs and md.

Modified:
  stable/10/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh
==
--- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 18:51:08 
2015(r284937)
+++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 18:56:53 
2015(r284938)
@@ -603,6 +603,7 @@ fetchupgrade_check_params () {
_KEYPRINT_z=Key must be given via -k option or configuration file.
_KEYPRINT_bad=Invalid key fingerprint: 
_WORKDIR_bad=Directory does not exist or is not writable: 
+   _WORKDIR_bad2=Directory is not on a persistent filesystem: 
 
if [ -z ${SERVERNAME} ]; then
echo -n `basename $0`: 
@@ -626,6 +627,13 @@ fetchupgrade_check_params () {
echo ${WORKDIR}
exit 1
fi
+   case `df -T ${WORKDIR}` in */dev/md[0-9]* | *tmpfs*)
+   echo -n `basename $0`: 
+   echo -n ${_WORKDIR_bad2}
+   echo ${WORKDIR}
+   exit 1
+   ;;
+   esac
chmod 700 ${WORKDIR}
cd ${WORKDIR} || exit 1
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r284939 - stable/10/usr.sbin/freebsd-update

2015-06-29 Thread Xin LI
Author: delphij
Date: Mon Jun 29 19:02:30 2015
New Revision: 284939
URL: https://svnweb.freebsd.org/changeset/base/284939

Log:
  MFC r256594 (cperciva):
  
  Speed up `freebsd-update IDS` by using IFS to split fields instead of
  forking lots of processes to run echo|cut.  In one test this reduced
  the CPU time from 980s to 134s and the wallclock time from 806s to
  132s.
  
  Submitted by: Oleg Ginzburg

Modified:
  stable/10/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh
==
--- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 18:56:53 
2015(r284938)
+++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 19:02:30 
2015(r284939)
@@ -3099,21 +3099,8 @@ IDS_compare () {
mv INDEX-NOTMATCHING.tmp INDEX-NOTMATCHING
 
# Go through the lines and print warnings.
-   while read LINE; do
-   FPATH=`echo ${LINE} | cut -f 1 -d '|'`
-   TYPE=`echo ${LINE} | cut -f 2 -d '|'`
-   OWNER=`echo ${LINE} | cut -f 3 -d '|'`
-   GROUP=`echo ${LINE} | cut -f 4 -d '|'`
-   PERM=`echo ${LINE} | cut -f 5 -d '|'`
-   HASH=`echo ${LINE} | cut -f 6 -d '|'`
-   LINK=`echo ${LINE} | cut -f 7 -d '|'`
-   P_TYPE=`echo ${LINE} | cut -f 8 -d '|'`
-   P_OWNER=`echo ${LINE} | cut -f 9 -d '|'`
-   P_GROUP=`echo ${LINE} | cut -f 10 -d '|'`
-   P_PERM=`echo ${LINE} | cut -f 11 -d '|'`
-   P_HASH=`echo ${LINE} | cut -f 12 -d '|'`
-   P_LINK=`echo ${LINE} | cut -f 13 -d '|'`
-
+   local IFS='|'
+   while read FPATH TYPE OWNER GROUP PERM HASH LINK P_TYPE P_OWNER P_GROUP 
P_PERM P_HASH P_LINK; do
# Warn about different object types.
if ! [ ${TYPE} = ${P_TYPE} ]; then
echo -n ${FPATH} is a 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r284936 - stable/10/usr.sbin/freebsd-update

2015-06-29 Thread Xin LI
Author: delphij
Date: Mon Jun 29 18:44:15 2015
New Revision: 284936
URL: https://svnweb.freebsd.org/changeset/base/284936

Log:
  MFC r284425:
  
  Skip src component if /usr/src is empty.
  
  Submitted by: kczekirda
  Reviewed by:  cperciva, delphij, nwhitehorn, allanjude

Modified:
  stable/10/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh
==
--- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 18:34:30 
2015(r284935)
+++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 18:44:15 
2015(r284936)
@@ -216,7 +216,15 @@ config_KeepModifiedMetadata () {
 # Add to the list of components which should be kept updated.
 config_Components () {
for C in $@; do
-   COMPONENTS=${COMPONENTS} ${C}
+   if [ $C = src ]; then
+   if [ -e /usr/src/COPYRIGHT ]; then
+   COMPONENTS=${COMPONENTS} ${C}
+   else
+   echo src component not installed, skipped
+   fi
+   else
+   COMPONENTS=${COMPONENTS} ${C}
+   fi
done
 }
 
@@ -2634,10 +2642,10 @@ install_unschg () {
while read F; do
if ! [ -e ${BASEDIR}/${F} ]; then
continue
+   else
+   echo ${BASEDIR}/${F}
fi
-
-   chflags noschg ${BASEDIR}/${F} || return 1
-   done  filelist
+   done  filelist | xargs chflags noschg || return 1
 
# Clean up
rm filelist
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r284935 - stable/10/sys/dev/hptnr

2015-06-29 Thread Xin LI
Author: delphij
Date: Mon Jun 29 18:34:30 2015
New Revision: 284935
URL: https://svnweb.freebsd.org/changeset/base/284935

Log:
  MFC r284792:
  
  Merge changes from vendor driver 1.1.4:
  
v1.1.4 2015-06-09
 * Fix a bug that FailLED was not initialized properly.
v1.1.3 2015-05-19
 * Support Report Luns command.
v1.1.2 2015-05-05
 * Fix a bug that report wrong physical sector size for 512e HDD.
  
  Many thanks to HighPoint for continued support of FreeBSD!
  
  This driver update is intended for 10.2-RELEASE.
  
  Submitted by: Steve Chang

Modified:
  stable/10/sys/dev/hptnr/README
  stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu
  stable/10/sys/dev/hptnr/him.h
  stable/10/sys/dev/hptnr/hptnr_config.c
  stable/10/sys/dev/hptnr/hptnr_osm_bsd.c
  stable/10/sys/dev/hptnr/i386-elf.hptnr_lib.o.uu
  stable/10/sys/dev/hptnr/ldm.h
  stable/10/sys/dev/hptnr/osm.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hptnr/README
==
--- stable/10/sys/dev/hptnr/README  Mon Jun 29 18:11:10 2015
(r284934)
+++ stable/10/sys/dev/hptnr/README  Mon Jun 29 18:34:30 2015
(r284935)
@@ -3,6 +3,16 @@ Copyright (C) 2015 HighPoint Technologie
 
 #
 Revision History:
+
+   v1.1.4 2015-06-09
+ * Fix a bug that FailLED was not initialized properly.
+
+   v1.1.3 2015-05-19
+ * Support Report Luns command.
+
+   v1.1.2 2015-05-05
+ * Fix a bug that report wrong physical sector size for 512e HDD.
+
v1.1.1 2015-03-26
  * Support 4Kn drive.
  * Change the SCSI target ID of the disk to be the index of physical 
connetion to the HBA.
@@ -57,7 +67,7 @@ Revision History:
   2) Extract the driver files under the kernel source tree:
 
  # cd /usr/src/sys/
- # tar xvzf /your/path/to/hptnr-freebsd-src-v1.0-130701.tgz
+ # tar xvzf /your/path/to/HPTNR_FreeBSD_Src_1.x.x_xx_xx_xx.tgz
 
   3) Update the kernel configuration file to include the HighPoint source.
  Assume the configure file is GENERIC, and new kernel configure file is 
@@ -79,8 +89,8 @@ Revision History:
   compile-withuudecode  
$S/dev/hptnr/i386-elf.hptnr_lib.o.uu \
   no-implicit-rule
 
-  dev/hptnr/os_bsd.c  optionalhptnr
-  dev/hptnr/osm_bsd.c optionalhptnr
+  dev/hptnr/hptnr_os_bsd.c  optionalhptnr
+  dev/hptnr/hptnr_osm_bsd.c optionalhptnr
   dev/hptnr/hptnr_config.c  optionalhptnr
 
  For amd64 system, edit /usr/src/sys/conf/files.amd64 and append the lines
@@ -91,13 +101,13 @@ Revision History:
   compile-withuudecode  
$S/dev/hptnr/amd64-elf.hptnr_lib.o.uu \
   no-implicit-rule
 
-  dev/hptnr/os_bsd.c  optionalhptnr
-  dev/hptnr/osm_bsd.c optionalhptnr
+  dev/hptnr/hptnr_os_bsd.c  optionalhptnr
+  dev/hptnr/hptnr_osm_bsd.c optionalhptnr
   dev/hptnr/hptnr_config.c  optionalhptnr
 
   6) Rebuild and install the kernel:
 
- a) for FreeBSD 5.x-i386/6.x-i386/7.x-i386/8.x-i386/9.x-i386:
+ a) for FreeBSD 5.x-i386/6.x-i386/7.x-i386/8.x-i386/9.x-i386/10.x-i386:
  
 # cd /usr/src/sys/i386/conf/
 # /usr/sbin/config MYKERNEL
@@ -106,7 +116,7 @@ Revision History:
 # make 
 # make install
 
- b) for FreeBSD 5.x-amd64/6.x-amd64/7.x-amd64/8.x-amd64/9.x-amd64:
+ b) for FreeBSD 
5.x-amd64/6.x-amd64/7.x-amd64/8.x-amd64/9.x-amd64/10.x-amd64:
 
 # cd /usr/src/sys/amd64/conf/
 # /usr/sbin/config MYKERNEL
@@ -139,7 +149,7 @@ Revision History:
   2) Extract the driver files under the kernel source tree:
 
  # cd /usr/src/sys/
- # tar xvzf /your/path/to/hptnr-freebsd-src-v1.0-111213.tgz
+ # tar xvzf /your/path/to/HPTNR_FreeBSD_Src_1.x.x_xx_xx_xx.tgz
 
 
   4) Build the driver module:
@@ -153,7 +163,7 @@ Revision History:
  
  # cp hptnr.ko /modules/
 
- For FreeBSD 5.x/6.x/7.x/8.x/9.x:
+ For FreeBSD 5.x/6.x/7.x/8.x/9.x/10.x:
 
  # cp hptnr.ko /boot/kernel/
 
@@ -179,7 +189,7 @@ Revision History:
 /modules/hptnr.ko text=0xf571 data=0x2c8+0x254
 ok boot
 
- For FreeBSD 5.x/6.x/7.x/8.x/9.x, you can select 6 on the boot menu to get 
a loader
+ For FreeBSD 5.x/6.x/7.x/8.x/9.x/10.x, you can select 6 on the boot menu 
to get a loader
  prompt.
   
   7) You can add a below line into /boot/defaults/loader.conf to load the

Modified: stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu
==
--- stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uuMon Jun 29 18:11:10 
2015(r284934)
+++ stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uuMon Jun 29 18:34:30 
2015

svn commit: r283270 - stable/10/contrib/netcat

2015-05-21 Thread Xin LI
Author: delphij
Date: Thu May 21 21:45:37 2015
New Revision: 283270
URL: https://svnweb.freebsd.org/changeset/base/283270

Log:
  MFC r282613: MFV r282611: netcat from OpenBSD 5.7.

Modified:
  stable/10/contrib/netcat/netcat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/netcat/netcat.c
==
--- stable/10/contrib/netcat/netcat.c   Thu May 21 20:47:19 2015
(r283269)
+++ stable/10/contrib/netcat/netcat.c   Thu May 21 21:45:37 2015
(r283270)
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.122 2014/07/20 01:38:40 guenther Exp $ */
+/* $OpenBSD: netcat.c,v 1.127 2015/02/14 22:40:22 jca Exp $ */
 /*
  * Copyright (c) 2001 Eric Jackson er...@monkey.org
  *
@@ -42,7 +42,6 @@
 #include sys/un.h
 
 #include netinet/in.h
-#include netinet/in_systm.h
 #ifdef IPSEC
 #include netipsec/ipsec.h
 #endif
@@ -73,6 +72,12 @@
 #define PORT_MAX_LEN   6
 #define UNIX_DG_TMP_SOCKET_SIZE19
 
+#define POLL_STDIN 0
+#define POLL_NETOUT 1
+#define POLL_NETIN 2
+#define POLL_STDOUT 3
+#define BUFSIZE 16384
+
 /* Command Line Options */
 intdflag;  /* detached, no stdin */
 intFflag;  /* fdpass sock to stdout */
@@ -117,10 +122,12 @@ int   udptest(int);
 intunix_bind(char *);
 intunix_connect(char *);
 intunix_listen(char *);
-void   set_common_sockopts(int);
+void   set_common_sockopts(int, int);
 intmap_tos(char *, int *);
 void   report_connect(const struct sockaddr *, socklen_t);
 void   usage(int);
+ssize_t drainbuf(int, unsigned char *, size_t *);
+ssize_t fillbuf(int, unsigned char *, size_t *);
 
 #ifdef IPSEC
 void   add_ipsec_policy(int, char *);
@@ -436,7 +443,7 @@ main(int argc, char *argv[])
len);
if (connfd == -1) {
/* For now, all errnos are fatal */
-   err(1, accept);
+   err(1, accept);
}
if (vflag)
report_connect((struct sockaddr 
*)cliaddr, len);
@@ -663,7 +670,7 @@ remote_connect(const char *host, const c
freeaddrinfo(ares);
}
 
-   set_common_sockopts(s);
+   set_common_sockopts(s, res0-ai_family);
 
if (timeout_connect(s, res0-ai_addr, res0-ai_addrlen) == 0)
break;
@@ -767,6 +774,8 @@ local_listen(char *host, char *port, str
err(1, disable TCP options);
}
 
+   set_common_sockopts(s, res0-ai_family);
+
if (bind(s, (struct sockaddr *)res0-ai_addr,
res0-ai_addrlen) == 0)
break;
@@ -790,68 +799,224 @@ local_listen(char *host, char *port, str
  * Loop that polls on the network file descriptor and stdin.
  */
 void
-readwrite(int nfd)
+readwrite(int net_fd)
 {
-   struct pollfd pfd[2];
-   unsigned char buf[16 * 1024];
-   int n, wfd = fileno(stdin);
-   int lfd = fileno(stdout);
-   int plen;
-
-   plen = sizeof(buf);
-
-   /* Setup Network FD */
-   pfd[0].fd = nfd;
-   pfd[0].events = POLLIN;
-
-   /* Set up STDIN FD. */
-   pfd[1].fd = wfd;
-   pfd[1].events = POLLIN;
+   struct pollfd pfd[4];
+   int stdin_fd = STDIN_FILENO;
+   int stdout_fd = STDOUT_FILENO;
+   unsigned char netinbuf[BUFSIZE];
+   size_t netinbufpos = 0;
+   unsigned char stdinbuf[BUFSIZE];
+   size_t stdinbufpos = 0;
+   int n, num_fds;
+   ssize_t ret;
+
+   /* don't read from stdin if requested */
+   if (dflag)
+   stdin_fd = -1;
+
+   /* stdin */
+   pfd[POLL_STDIN].fd = stdin_fd;
+   pfd[POLL_STDIN].events = POLLIN;
+
+   /* network out */
+   pfd[POLL_NETOUT].fd = net_fd;
+   pfd[POLL_NETOUT].events = 0;
+
+   /* network in */
+   pfd[POLL_NETIN].fd = net_fd;
+   pfd[POLL_NETIN].events = POLLIN;
+
+   /* stdout */
+   pfd[POLL_STDOUT].fd = stdout_fd;
+   pfd[POLL_STDOUT].events = 0;
+
+   while (1) {
+   /* both inputs are gone, buffers are empty, we are done */
+   if (pfd[POLL_STDIN].fd == -1  pfd[POLL_NETIN].fd == -1
+stdinbufpos == 0  netinbufpos == 0) {
+   close(net_fd);
+   return;
+   }
+   /* both outputs are gone, we can't continue */
+   if (pfd[POLL_NETOUT].fd == -1  pfd[POLL_STDOUT].fd == -1) {
+   close(net_fd);
+   return;
+   }
+   /* listen and net in gone, queues empty, done */
+   if (lflag  pfd[POLL_NETIN].fd == -1
+stdinbufpos == 0  

svn commit: r283259 - stable/10/contrib/libarchive/libarchive

2015-05-21 Thread Xin LI
Author: delphij
Date: Thu May 21 19:05:47 2015
New Revision: 283259
URL: https://svnweb.freebsd.org/changeset/base/283259

Log:
  MFC r282932: MFV r282927,r282928,r282930 (kientzle):
  
  Don't segfault when reading malformed cpio archives.

Modified:
  stable/10/contrib/libarchive/libarchive/archive_read.c
  stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/libarchive/libarchive/archive_read.c
==
--- stable/10/contrib/libarchive/libarchive/archive_read.c  Thu May 21 
18:59:11 2015(r283258)
+++ stable/10/contrib/libarchive/libarchive/archive_read.c  Thu May 21 
19:05:47 2015(r283259)
@@ -1395,6 +1395,8 @@ __archive_read_filter_consume(struct arc
 {
int64_t skipped;
 
+   if (request  0)
+   return ARCHIVE_FATAL;
if (request == 0)
return 0;
 

Modified: 
stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
==
--- stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c  
Thu May 21 18:59:11 2015(r283258)
+++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c  
Thu May 21 19:05:47 2015(r283259)
@@ -198,7 +198,7 @@ static int  archive_read_format_cpio_read
 static int archive_read_format_cpio_read_header(struct archive_read *,
struct archive_entry *);
 static int archive_read_format_cpio_skip(struct archive_read *);
-static int be4(const unsigned char *);
+static int64_t be4(const unsigned char *);
 static int find_odc_header(struct archive_read *);
 static int find_newc_header(struct archive_read *);
 static int header_bin_be(struct archive_read *, struct cpio *,
@@ -213,7 +213,7 @@ static int  header_afiol(struct archive_r
struct archive_entry *, size_t *, size_t *);
 static int is_octal(const char *, size_t);
 static int is_hex(const char *, size_t);
-static int le4(const unsigned char *);
+static int64_t le4(const unsigned char *);
 static int record_hardlink(struct archive_read *a,
struct cpio *cpio, struct archive_entry *entry);
 
@@ -864,8 +864,11 @@ header_bin_le(struct archive_read *a, st
 
/* Read fixed-size portion of header. */
h = __archive_read_ahead(a, bin_header_size, NULL);
-   if (h == NULL)
+   if (h == NULL) {
+   archive_set_error(a-archive, 0,
+   End of file trying to read next cpio header);
return (ARCHIVE_FATAL);
+   }
 
/* Parse out binary fields. */
header = (const unsigned char *)h;
@@ -900,8 +903,11 @@ header_bin_be(struct archive_read *a, st
 
/* Read fixed-size portion of header. */
h = __archive_read_ahead(a, bin_header_size, NULL);
-   if (h == NULL)
+   if (h == NULL) {
+   archive_set_error(a-archive, 0,
+   End of file trying to read next cpio header);
return (ARCHIVE_FATAL);
+   }
 
/* Parse out binary fields. */
header = (const unsigned char *)h;
@@ -944,17 +950,17 @@ archive_read_format_cpio_cleanup(struct 
return (ARCHIVE_OK);
 }
 
-static int
+static int64_t
 le4(const unsigned char *p)
 {
-   return ((p[0]16) + (p[1]24) + (p[2]0) + (p[3]8));
+   return ((p[0]  16) + (((int64_t)p[1])  24) + (p[2]  0) + (p[3]  
8));
 }
 
 
-static int
+static int64_t
 be4(const unsigned char *p)
 {
-   return ((p[0]24) + (p[1]16) + (p[2]8) + (p[3]));
+   return int64_t)p[0])  24) + (p[1]  16) + (p[2]  8) + (p[3]));
 }
 
 /*
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r283258 - stable/10/bin/date

2015-05-21 Thread Xin LI
Author: delphij
Date: Thu May 21 18:59:11 2015
New Revision: 283258
URL: https://svnweb.freebsd.org/changeset/base/283258

Log:
  MFC r282608:
  
  date(1): Make -r behave like GNU's version when the option can not be
  interpreted as a number, which checks the file's modification time and
  use that as the date/time value.
  
  This improves compatibility with GNU coreutils's version of date(1).

Modified:
  stable/10/bin/date/date.1
  stable/10/bin/date/date.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/date/date.1
==
--- stable/10/bin/date/date.1   Thu May 21 18:29:36 2015(r283257)
+++ stable/10/bin/date/date.1   Thu May 21 18:59:11 2015(r283258)
@@ -32,7 +32,7 @@
 .\ @(#)date.1 8.3 (Berkeley) 4/28/95
 .\ $FreeBSD$
 .\
-.Dd April 26, 2014
+.Dd May 7, 2015
 .Dt DATE 1
 .Os
 .Sh NAME
@@ -41,7 +41,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl jRu
-.Op Fl r Ar seconds
+.Op Fl r Ar seconds | Ar filename
 .Oo
 .Fl v
 .Sm off
@@ -150,6 +150,9 @@ is the number of seconds since the Epoch
 see
 .Xr time 3 ) ,
 and can be specified in decimal, octal, or hex.
+.It Fl r Ar filename
+Print the date and time of the last modification of
+.Ar filename .
 .It Fl t Ar minutes_west
 Set the system's value for minutes west of
 .Tn GMT .

Modified: stable/10/bin/date/date.c
==
--- stable/10/bin/date/date.c   Thu May 21 18:29:36 2015(r283257)
+++ stable/10/bin/date/date.c   Thu May 21 18:59:11 2015(r283258)
@@ -44,6 +44,7 @@ __FBSDID($FreeBSD$);
 
 #include sys/param.h
 #include sys/time.h
+#include sys/stat.h
 
 #include ctype.h
 #include err.h
@@ -85,6 +86,7 @@ main(int argc, char *argv[])
struct vary *v;
const struct vary *badv;
struct tm lt;
+   struct stat sb;
 
v = NULL;
fmt = NULL;
@@ -116,8 +118,12 @@ main(int argc, char *argv[])
case 'r':   /* user specified seconds */
rflag = 1;
tval = strtoq(optarg, tmp, 0);
-   if (*tmp != 0)
-   usage();
+   if (*tmp != 0) {
+   if (stat(optarg, sb) == 0)
+   tval = sb.st_mtim.tv_sec;
+   else
+   usage();
+   }
break;
case 't':   /* minutes west of UTC */
/* error check; don't allow PST */
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r286900 - in stable: 10/contrib/expat/lib 9/contrib/expat/lib

2015-08-18 Thread Xin LI
Author: delphij
Date: Tue Aug 18 19:30:05 2015
New Revision: 286900
URL: https://svnweb.freebsd.org/changeset/base/286900

Log:
  Fix multiple integer overflows in expat.
  
  Security: CVE-2015-1283
  Security: FreeBSD-SA-15:20.expat

Modified:
  stable/10/contrib/expat/lib/xmlparse.c

Changes in other areas also in this revision:
Modified:
  stable/9/contrib/expat/lib/xmlparse.c

Modified: stable/10/contrib/expat/lib/xmlparse.c
==
--- stable/10/contrib/expat/lib/xmlparse.c  Tue Aug 18 19:30:04 2015
(r286899)
+++ stable/10/contrib/expat/lib/xmlparse.c  Tue Aug 18 19:30:05 2015
(r286900)
@@ -1678,6 +1678,12 @@ XML_ParseBuffer(XML_Parser parser, int l
 void * XMLCALL
 XML_GetBuffer(XML_Parser parser, int len)
 {
+/* BEGIN MOZILLA CHANGE (sanity check len) */
+  if (len  0) {
+errorCode = XML_ERROR_NO_MEMORY;
+return NULL;
+  }
+/* END MOZILLA CHANGE */
   switch (ps_parsing) {
   case XML_SUSPENDED:
 errorCode = XML_ERROR_SUSPENDED;
@@ -1689,8 +1695,13 @@ XML_GetBuffer(XML_Parser parser, int len
   }
 
   if (len  bufferLim - bufferEnd) {
-/* FIXME avoid integer overflow */
 int neededSize = len + (int)(bufferEnd - bufferPtr);
+/* BEGIN MOZILLA CHANGE (sanity check neededSize) */
+if (neededSize  0) {
+  errorCode = XML_ERROR_NO_MEMORY;
+  return NULL;
+}
+/* END MOZILLA CHANGE */
 #ifdef XML_CONTEXT_BYTES
 int keep = (int)(bufferPtr - buffer);
 
@@ -1719,7 +1730,15 @@ XML_GetBuffer(XML_Parser parser, int len
 bufferSize = INIT_BUFFER_SIZE;
   do {
 bufferSize *= 2;
-  } while (bufferSize  neededSize);
+/* BEGIN MOZILLA CHANGE (prevent infinite loop on overflow) */
+  } while (bufferSize  neededSize  bufferSize  0);
+/* END MOZILLA CHANGE */
+/* BEGIN MOZILLA CHANGE (sanity check bufferSize) */
+  if (bufferSize = 0) {
+errorCode = XML_ERROR_NO_MEMORY;
+return NULL;
+  }
+/* END MOZILLA CHANGE */
   newBuf = (char *)MALLOC(bufferSize);
   if (newBuf == 0) {
 errorCode = XML_ERROR_NO_MEMORY;
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r286935 - stable/10/usr.sbin/pkg

2015-08-19 Thread Xin LI
Author: delphij
Date: Wed Aug 19 18:32:36 2015
New Revision: 286935
URL: https://svnweb.freebsd.org/changeset/base/286935

Log:
  Instant-MFC r286933:
  
  Issue warning and refuse to proceed further if the configured
  repository signature_type is unsupported by bootstrap pkg(7).
  
  Previously, when signature_type specified an unsupported method,
  the bootstrap pkg(7) would proceed like when signature_type is
  none.  MITM attackers may be able to use this vulnerability and
  bypass validation and install their own versions of pkg(8).
  
  At this time, only fingerprint and none are supported by the
  bootstrap pkg(7).
  
  FreeBSD's official pkg(8) repository uses the fingerprint method
  and is therefore unaffected.
  
  Errata candidate.

Modified:
  stable/10/usr.sbin/pkg/pkg.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pkg/pkg.c
==
--- stable/10/usr.sbin/pkg/pkg.cWed Aug 19 18:32:12 2015
(r286934)
+++ stable/10/usr.sbin/pkg/pkg.cWed Aug 19 18:32:36 2015
(r286935)
@@ -767,7 +767,13 @@ bootstrap_pkg(bool force)
goto fetchfail;
 
if (signature_type != NULL 
-   strcasecmp(signature_type, FINGERPRINTS) == 0) {
+   strcasecmp(signature_type, NONE) != 0) {
+   if (strcasecmp(signature_type, FINGERPRINTS) != 0) {
+   warnx(Signature type %s is not supported for 
+   bootstrapping., signature_type);
+   goto cleanup;
+   }
+
snprintf(tmpsig, MAXPATHLEN, %s/pkg.txz.sig.XX,
getenv(TMPDIR) ? getenv(TMPDIR) : _PATH_TMP);
snprintf(url, MAXPATHLEN, %s/Latest/pkg.txz.sig,
@@ -855,7 +861,13 @@ bootstrap_pkg_local(const char *pkgpath,
goto cleanup;
}
if (signature_type != NULL 
-   strcasecmp(signature_type, FINGERPRINTS) == 0) {
+   strcasecmp(signature_type, NONE) != 0) {
+   if (strcasecmp(signature_type, FINGERPRINTS) != 0) {
+   warnx(Signature type %s is not supported for 
+   bootstrapping., signature_type);
+   goto cleanup;
+   }
+
snprintf(path, sizeof(path), %s.sig, pkgpath);
 
if ((fd_sig = open(path, O_RDONLY)) == -1) {
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r286261 - stable/10/share/man/man4

2015-08-03 Thread Xin LI
Author: delphij
Date: Mon Aug  3 23:04:32 2015
New Revision: 286261
URL: https://svnweb.freebsd.org/changeset/base/286261

Log:
  MFC r284607:
  
  Document kern.cam.ada.legacy_aliases, while I'm there also fix some typos.

Modified:
  stable/10/share/man/man4/ada.4
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/ada.4
==
--- stable/10/share/man/man4/ada.4  Mon Aug  3 22:14:45 2015
(r286260)
+++ stable/10/share/man/man4/ada.4  Mon Aug  3 23:04:32 2015
(r286261)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd October 22, 2014
+.Dd June 19, 2015
 .Dt ADA 4
 .Os
 .Sh NAME
@@ -45,14 +45,14 @@ The host adapter must also be separately
 .Tn ATA
 direct access device can be configured.
 .Sh COMMAND QUEUING
-Command queueing allows the device to process multiple transactions
+Command queuing allows the device to process multiple transactions
 concurrently, often re-ordering them to reduce the number and length of
 seeks.
 .Tn ATA
-defines two types of queueing:
-.Tn TCQ (Tagged Command Queueing, PATA legacy)
+defines two types of queuing:
+.Tn TCQ (Tagged Command Queuing, PATA legacy)
 and
-.Tn NCQ (Native Command Queueing, SATA) .
+.Tn NCQ (Native Command Queuing, SATA) .
 The
 .Nm
 device driver takes full advantage of NCQ, when supported.
@@ -146,6 +146,16 @@ instead of
 .Pa /etc/sysctl.conf .
 The global default is currently 1.
 The per-device default is to leave it as-is (follow global setting).
+.It Va kern.cam.ada.legacy_aliases
+.Pp
+This variable determines whether
+.Pa /dev/ad Ns Ar Y
+symbolic links are created,
+which tries to mimic old
+.Xr ata 4
+numbering.
+Set to 1 to enable legacy aliases symlinks, 0 to disable.
+The default is currently enabled.
 .El
 .Sh FILES
 .Bl -tag -width .Pa /dev/ada* -compact
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r286262 - stable/10/share/man/man4

2015-08-03 Thread Xin LI
Author: delphij
Date: Mon Aug  3 23:08:40 2015
New Revision: 286262
URL: https://svnweb.freebsd.org/changeset/base/286262

Log:
  MFC r284611:
  
  Fix markups and change e.g./eg. to e.g.,.

Modified:
  stable/10/share/man/man4/acpi_hp.4
  stable/10/share/man/man4/acpi_ibm.4
  stable/10/share/man/man4/acpi_panasonic.4
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/acpi_hp.4
==
--- stable/10/share/man/man4/acpi_hp.4  Mon Aug  3 23:04:32 2015
(r286261)
+++ stable/10/share/man/man4/acpi_hp.4  Mon Aug  3 23:08:40 2015
(r286262)
@@ -24,7 +24,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd February 8, 2010
+.Dd June 19, 2015
 .Dt ACPI_HP 4
 .Os
 .Sh NAME
@@ -48,7 +48,7 @@ acpi_hp_load=YES
 The
 .Nm
 driver provides support for ACPI-controlled features found on HP laptops
-that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p).
+that use a WMI enabled BIOS (e.g., HP Compaq 8510p and 6510p).
 .Pp
 The main purpose of this driver is to provide an interface,
 accessible via
@@ -58,7 +58,7 @@ accessible via
 through which applications can determine and change the status of
 various laptop components and BIOS settings.
 .Pp
-.Ss Xr devd 8 Ss Events
+.Ss Xr devd 8 Events
 Devd events received by
 .Xr devd 8
 provide the following information:
@@ -91,7 +91,7 @@ WWAN on air status changed to 0 (not on 
 .It Li 0xe1
 WWAN on air status changed to 1 (on air)
 .El
-.Ss Xr devfs 8 Ss Device
+.Ss Xr devfs 8 Device
 You can read /dev/hpcmi to see your current BIOS settings.
 The detail level can be adjusted by setting the sysctl
 .Va cmi_detail
@@ -197,8 +197,7 @@ Interface to read BIOS settings
 .Sh EXAMPLES
 The following can be added to
 .Xr devd.conf 5
-in order disable the LAN interface when WLAN on air and reenable if it's
-not:
+in order disable the LAN interface when WLAN on air and reenable if it is not:
 .Bd -literal -offset indent
 notify 0 {
match system  ACPI;
@@ -281,7 +280,10 @@ This driver is experimental and has only
 HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN).
 Expect undefined results when operating on different hardware.
 .Pp
-Loading the driver is slow. Reading from /dev/hpcmi is even slower.
+Loading the driver is slow.
+Reading from
+.Pa /dev/hpcmi
+is even slower.
 .Pp
 Additional features like HP specific sensor readings or writing BIOS
 settings are not supported.

Modified: stable/10/share/man/man4/acpi_ibm.4
==
--- stable/10/share/man/man4/acpi_ibm.4 Mon Aug  3 23:04:32 2015
(r286261)
+++ stable/10/share/man/man4/acpi_ibm.4 Mon Aug  3 23:08:40 2015
(r286262)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd June 24, 2012
+.Dd June 19, 2015
 .Dt ACPI_IBM 4
 .Os
 .Sh NAME
@@ -74,7 +74,7 @@ sysctl, is set to
 .Va availmask
 by default, a value representing all possible keypress events on the specific
 ThinkPad model.
-.Ss Xr devd 8 Ss Events
+.Ss Xr devd 8 Events
 Hotkey events received by
 .Xr devd 8
 provide the following information:
@@ -144,7 +144,7 @@ Mute
 .It Li 0x18
 Access IBM Button
 .El
-.Ss Xr led 4 Ss Interface
+.Ss Xr led 4 Interface
 The
 .Nm
 driver provides a
@@ -344,7 +344,7 @@ when
 is set to 1.
 Events are specified as a whitespace-separated list of event code in
 hexadecimal or decimal form.
-Note that the event maybe handled twice (eg. Brightness up/down) if ACPI BIOS
+Note that the event maybe handled twice (e.g., Brightness up/down) if ACPI BIOS
 already handled the event.
 .El
 .Pp

Modified: stable/10/share/man/man4/acpi_panasonic.4
==
--- stable/10/share/man/man4/acpi_panasonic.4   Mon Aug  3 23:04:32 2015
(r286261)
+++ stable/10/share/man/man4/acpi_panasonic.4   Mon Aug  3 23:08:40 2015
(r286262)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd February 25, 2012
+.Dd June 19, 2015
 .Dt ACPI_PANASONIC 4
 .Os
 .Sh NAME
@@ -100,7 +100,7 @@ For the other events such as
 mixer control and showing battery status,
 .Xr devd 8
 should take the role as described below.
-.Ss Xr devd 8 Ss Events
+.Ss Xr devd 8 Events
 When notified to
 .Xr devd 8 ,
 the hotkey event provides the following information:
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r285976 - in stable/10: crypto/openssh sys/netinet usr.bin/patch

2015-07-28 Thread Xin LI
Author: delphij
Date: Tue Jul 28 19:58:44 2015
New Revision: 285976
URL: https://svnweb.freebsd.org/changeset/base/285976

Log:
  Fix patch(1) shell injection vulnerability. [SA-15:14]
  
  Fix resource exhaustion in TCP reassembly. [SA-15:15]
  
  Fix OpenSSH multiple vulnerabilities. [SA-15:16]

Modified:
  stable/10/crypto/openssh/auth2-chall.c
  stable/10/crypto/openssh/sshconnect.c
  stable/10/sys/netinet/tcp_reass.c
  stable/10/sys/netinet/tcp_subr.c
  stable/10/sys/netinet/tcp_var.h
  stable/10/usr.bin/patch/common.h
  stable/10/usr.bin/patch/inp.c

Modified: stable/10/crypto/openssh/auth2-chall.c
==
--- stable/10/crypto/openssh/auth2-chall.c  Tue Jul 28 19:58:38 2015
(r285975)
+++ stable/10/crypto/openssh/auth2-chall.c  Tue Jul 28 19:58:44 2015
(r285976)
@@ -82,6 +82,7 @@ struct KbdintAuthctxt
void *ctxt;
KbdintDevice *device;
u_int nreq;
+   u_int devices_done;
 };
 
 #ifdef USE_PAM
@@ -168,11 +169,15 @@ kbdint_next_device(Authctxt *authctxt, K
if (len == 0)
break;
for (i = 0; devices[i]; i++) {
-   if (!auth2_method_allowed(authctxt,
+   if ((kbdintctxt-devices_done  (1  i)) != 0 ||
+   !auth2_method_allowed(authctxt,
keyboard-interactive, devices[i]-name))
continue;
-   if (strncmp(kbdintctxt-devices, devices[i]-name, len) 
== 0)
+   if (strncmp(kbdintctxt-devices, devices[i]-name,
+   len) == 0) {
kbdintctxt-device = devices[i];
+   kbdintctxt-devices_done |= 1  i;
+   }
}
t = kbdintctxt-devices;
kbdintctxt-devices = t[len] ? xstrdup(t+len+1) : NULL;

Modified: stable/10/crypto/openssh/sshconnect.c
==
--- stable/10/crypto/openssh/sshconnect.c   Tue Jul 28 19:58:38 2015
(r285975)
+++ stable/10/crypto/openssh/sshconnect.c   Tue Jul 28 19:58:44 2015
(r285976)
@@ -1246,29 +1246,39 @@ verify_host_key(char *host, struct socka
 {
int flags = 0;
char *fp;
+   Key *plain = NULL;
 
fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);
debug(Server host key: %s %s, key_type(host_key), fp);
free(fp);
 
-   /* XXX certs are not yet supported for DNS */
-   if (!key_is_cert(host_key)  options.verify_host_key_dns 
-   verify_host_key_dns(host, hostaddr, host_key, flags) == 0) {
-   if (flags  DNS_VERIFY_FOUND) {
-
-   if (options.verify_host_key_dns == 1 
-   flags  DNS_VERIFY_MATCH 
-   flags  DNS_VERIFY_SECURE)
-   return 0;
-
-   if (flags  DNS_VERIFY_MATCH) {
-   matching_host_key_dns = 1;
-   } else {
-   warn_changed_key(host_key);
-   error(Update the SSHFP RR in DNS with the new 
-   host key to get rid of this message.);
+   if (options.verify_host_key_dns) {
+   /*
+* XXX certs are not yet supported for DNS, so downgrade
+* them and try the plain key.
+*/
+   plain = key_from_private(host_key);
+   if (key_is_cert(plain))
+   key_drop_cert(plain);
+   if (verify_host_key_dns(host, hostaddr, plain, flags) == 0) {
+   if (flags  DNS_VERIFY_FOUND) {
+   if (options.verify_host_key_dns == 1 
+   flags  DNS_VERIFY_MATCH 
+   flags  DNS_VERIFY_SECURE) {
+   key_free(plain);
+   return 0;
+   }
+   if (flags  DNS_VERIFY_MATCH) {
+   matching_host_key_dns = 1;
+   } else {
+   warn_changed_key(plain);
+   error(Update the SSHFP RR in DNS 
+   with the new host key to get rid 
+   of this message.);
+   }
}
}
+   key_free(plain);
}
 
return check_host_key(host, hostaddr, options.port, host_key, RDRW,

Modified: stable/10/sys/netinet/tcp_reass.c
==
--- 

svn commit: r286384 - stable/10/etc

2015-08-06 Thread Xin LI
Author: delphij
Date: Thu Aug  6 19:45:25 2015
New Revision: 286384
URL: https://svnweb.freebsd.org/changeset/base/286384

Log:
  MFC r286375:
  
  Now that stable/8 is EOL, stop building INDEX-8.

Modified:
  stable/10/etc/portsnap.conf
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/portsnap.conf
==
--- stable/10/etc/portsnap.conf Thu Aug  6 19:36:47 2015(r286383)
+++ stable/10/etc/portsnap.conf Thu Aug  6 19:45:25 2015(r286384)
@@ -30,6 +30,5 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddb
 # REFUSE korean polish portuguese russian ukrainian vietnamese
 
 # List of INDEX files to build and the DESCRIBE file to use for each
-INDEX INDEX-8 DESCRIBE.8
 INDEX INDEX-9 DESCRIBE.9
 INDEX INDEX-10 DESCRIBE.10
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r285856 - in stable/10/usr.sbin/ntp: . ntpd

2015-07-24 Thread Xin LI
Author: delphij
Date: Fri Jul 24 19:51:51 2015
New Revision: 285856
URL: https://svnweb.freebsd.org/changeset/base/285856

Log:
  MFC r285701:
  
  Use fixed date/time (the time choosen was the time the import was done
  on -HEAD) in libntp so we can make reproducible build.
  
  PR:   bin/201661
  Differential Revision:https://reviews.freebsd.org/D3122
  
  While I'm there also remove libmd from linkage as reported in bin/201738
  
  PR:   bin/201738
  Submitted by: John Marshall

Modified:
  stable/10/usr.sbin/ntp/config.h
  stable/10/usr.sbin/ntp/ntpd/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/ntp/config.h
==
--- stable/10/usr.sbin/ntp/config.h Fri Jul 24 19:50:55 2015
(r285855)
+++ stable/10/usr.sbin/ntp/config.h Fri Jul 24 19:51:51 2015
(r285856)
@@ -1785,3 +1785,8 @@ typedef union mpinfou {
# endif
#endif  /* !defined(_KERNEL)  !defined(PARSESTREAM) */

+/*
+ * FreeBSD specific: Explicitly specify date/time for reproducible build.
+ */
+#defineMKREPRO_DATE Jul 04 2015
+#defineMKREPRO_TIME 15:42:16

Modified: stable/10/usr.sbin/ntp/ntpd/Makefile
==
--- stable/10/usr.sbin/ntp/ntpd/MakefileFri Jul 24 19:50:55 2015
(r285855)
+++ stable/10/usr.sbin/ntp/ntpd/MakefileFri Jul 24 19:51:51 2015
(r285856)
@@ -27,8 +27,8 @@ SRCS= cmd_args.c ntp_config.c ntp_contro
refclock_tt560.c refclock_ulink.c refclock_wwv.c refclock_wwvb.c \
refclock_zyfer.c version.c
 
-DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBMD} ${LIBOPTS} ${LIBPTHREAD}
-LDADD= ${LIBPARSE} ${LIBNTP} -lm -lmd ${LIBOPTS} -lpthread
+DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBOPTS} ${LIBPTHREAD}
+LDADD= ${LIBPARSE} ${LIBNTP} -lm ${LIBOPTS} -lpthread
 
 CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/ntpd \
-I${.CURDIR}/../../../contrib/ntp/include \
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r285613 - stable/10/release/doc/en_US.ISO8859-1/relnotes

2015-07-15 Thread Xin LI
Author: delphij
Date: Wed Jul 15 19:38:14 2015
New Revision: 285613
URL: https://svnweb.freebsd.org/changeset/base/285613

Log:
  Document r285612, MFC of ntp 4.2.8p3.
  
  Approved by:  re (gjb)

Modified:
  stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml  Wed Jul 15 
19:21:26 2015(r285612)
+++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml  Wed Jul 15 
19:38:14 2015(r285613)
@@ -266,6 +266,9 @@
 
   para revision=285330applicationOpenSSL/application has
been updated to version 1.0.1p./para
+
+  para revision=285612The applicationntp/application
+   suite has been updated to version 4.2.8p3./para
 /sect2
 
 sect2 xml:id=userland-installer
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


Re: svn commit: r285612 - in stable/10: contrib/ntp contrib/ntp/adjtimed contrib/ntp/arlib contrib/ntp/clockstuff contrib/ntp/conf contrib/ntp/html contrib/ntp/html/build contrib/ntp/html/drivers cont

2015-07-15 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 07/15/15 12:21, Xin LI wrote:
 Author: delphij Date: Wed Jul 15 19:21:26 2015 New Revision:
 285612 URL: https://svnweb.freebsd.org/changeset/base/285612
 
 Log: MFC
 r280849,280915-280916,281015-281016,282097,282408,282415,283542, 
 284864,285169-285170,285435:
 
 ntp 4.2.8p3.
 
 Relnotes: yes Approved by:re (?)

This should read:   re (gjb), sorry I notice this too late.

Cheers,
- -- 
Xin LI delp...@delphij.nethttps://www.delphij.net/
FreeBSD - The Power to Serve!   Live free or die
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.1.6 (FreeBSD)

iQIcBAEBCgAGBQJVprOSAAoJEJW2GBstM+nsykcQAIjMS8v0XXaKDCts4tpFAE95
AwVYNv6t9P7vWt9roR0FAnvShxtFi8+MdPpf+cb+vuo5iaxTYD749q0A3+0sMWar
NWnrcz3e6az/zp8/A49RFbGUgj7y8f/lLcOoMQvhJtcKoDWROqP6aT0kRwjrkhli
RTHYV9deJOBDkH2SUc4T32s5GPVq40pnPeMmwOTqep8AfRlWM/tLAnIzwIYPCxyU
NiQtDZyvtWs9cy/QUaT2kKjzAl32bFK/qQY7NfHAcXbXZTFQlDwhmafMFReVtqbs
BJHZnaFDjMDI0xLso20j91T7eItgRsMZ22Br8f2tNLDvS5AeyZoHsI+7UMOX8Mce
Gdjux9M4r/VMQkivGwa7JrkcHegletzcVGS5YDD1RjVmiZaRUBOQdXTPbfqMHobK
Iip2OCx3lkAwoc3wv5bB0M+FOLlwXbVPhF6jI27scz+sBhp389eEdswFsvLlejby
7QPJvXTKV8qQ9vmLmQ9wPRmhWUpwjW/Rzg8tQs72QrwE3zeeoHCfYIQrz7m24DB0
YueAYb+AmXAISDUPThgZMzfGODYjM5JjdfZKFx/pmbi1YYt310ryCVqEBuwzviQF
SWGXmzdZK5WtxjOMtTpNXcQw7Lf2dU++tZpppjXzqOVFinnk7Ka4JUTBUZfw6hZg
b35RAhosLDkDUYSHrTEo
=5Rtb
-END PGP SIGNATURE-
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r285611 - stable/10/sys/kern

2015-07-15 Thread Xin LI
Author: delphij
Date: Wed Jul 15 19:11:43 2015
New Revision: 285611
URL: https://svnweb.freebsd.org/changeset/base/285611

Log:
  MFC r285424 (ian):
  
  Use the monotonic (uptime) counter rather than time-of-day to measure
  elapsed time between ntp_adjtime() clock offset adjustments.  This
  eliminates spurious frequency steering after a large clock step (such
  as a 1970-2015 step on a system with no battery-backed clock hardware).
  
  This problem was discovered after the import of ntpd 4.2.8, which does
  things in a slightly different (but still correct) order than the 4.2.4
  we had previously.  In particular, 4.2.4 would step the clock then
  immediately after use ntp_adjtime() to set the frequency and offset to
  zero, which captured the post-step time-of-day as a side effect.  In
  4.2.8, ntpd sets frequency and offset to zero before any initial clock
  step, capturing the time as 1970-ish, then when it next calls
  ntp_adjtime() it's with a non-zero offset measurement. This non-zero
  value gets multiplied by the apparent 45-year interval, which blows up
  into a completely bogus frequency steer.  That gets clamped to 500ppm,
  but that's still enough to make the clock drift so fast that ntpd has
  to keep stepping it every few minutes to compensate.
  
  Approved by:  re (gjb)

Modified:
  stable/10/sys/kern/kern_ntptime.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/kern_ntptime.c
==
--- stable/10/sys/kern/kern_ntptime.c   Wed Jul 15 18:49:15 2015
(r285610)
+++ stable/10/sys/kern/kern_ntptime.c   Wed Jul 15 19:11:43 2015
(r285611)
@@ -155,7 +155,7 @@ static long time_constant;  /* poll inte
 static long time_precision = 1;/* clock precision (ns) */
 static long time_maxerror = MAXPHASE / 1000; /* maximum error (us) */
 long time_esterror = MAXPHASE / 1000; /* estimated error (us) */
-static long time_reftime;  /* time at last adjustment (s) */
+static long time_reftime;  /* uptime at last adjustment (s) */
 static l_fp time_offset;   /* time offset (ns) */
 static l_fp time_freq; /* frequency offset (ns/s) */
 static l_fp time_adj;  /* tick adjust (ns/s) */
@@ -696,12 +696,12 @@ hardupdate(offset)
 * otherwise, the argument offset is used to compute it.
 */
if (time_status  STA_PPSFREQ  time_status  STA_PPSSIGNAL) {
-   time_reftime = time_second;
+   time_reftime = time_uptime;
return;
}
if (time_status  STA_FREQHOLD || time_reftime == 0)
-   time_reftime = time_second;
-   mtemp = time_second - time_reftime;
+   time_reftime = time_uptime;
+   mtemp = time_uptime - time_reftime;
L_LINT(ftemp, time_monitor);
L_RSHIFT(ftemp, (SHIFT_PLL + 2 + time_constant)  1);
L_MPY(ftemp, mtemp);
@@ -714,7 +714,7 @@ hardupdate(offset)
L_ADD(time_freq, ftemp);
time_status |= STA_MODE;
}
-   time_reftime = time_second;
+   time_reftime = time_uptime;
if (L_GINT(time_freq)  MAXFREQ)
L_LINT(time_freq, MAXFREQ);
else if (L_GINT(time_freq)  -MAXFREQ)
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r290033 - stable/10/usr.sbin/tzsetup

2015-10-26 Thread Xin LI
Author: delphij
Date: Tue Oct 27 01:28:11 2015
New Revision: 290033
URL: https://svnweb.freebsd.org/changeset/base/290033

Log:
  Revert the merge of r289269 for now as it may break non-root installs.

Modified:
  stable/10/usr.sbin/tzsetup/tzsetup.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/tzsetup/tzsetup.c
==
--- stable/10/usr.sbin/tzsetup/tzsetup.cTue Oct 27 01:28:07 2015
(r290032)
+++ stable/10/usr.sbin/tzsetup/tzsetup.cTue Oct 27 01:28:11 2015
(r290033)
@@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -936,18 +935,23 @@ main(int argc, char **argv)
if (argc - optind > 1)
usage();
 
-   if (chrootenv != NULL) {
-   rv = chroot(chrootenv);
-   if (rv != 0)
-   err(EX_OSERR, "chroot to %s", chrootenv);
+   if (chrootenv == NULL) {
+   strcpy(path_zonetab, _PATH_ZONETAB);
+   strcpy(path_iso3166, _PATH_ISO3166);
+   strcpy(path_zoneinfo, _PATH_ZONEINFO);
+   strcpy(path_localtime, _PATH_LOCALTIME);
+   strcpy(path_db, _PATH_DB);
+   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
+   } else {
+   sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB);
+   sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166);
+   sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO);
+   sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME);
+   sprintf(path_db, "%s/%s", chrootenv, _PATH_DB);
+   sprintf(path_wall_cmos_clock, "%s/%s", chrootenv,
+   _PATH_WALL_CMOS_CLOCK);
}
 
-   strcpy(path_zonetab, _PATH_ZONETAB);
-   strcpy(path_iso3166, _PATH_ISO3166);
-   strcpy(path_zoneinfo, _PATH_ZONEINFO);
-   strcpy(path_localtime, _PATH_LOCALTIME);
-   strcpy(path_db, _PATH_DB);
-   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
 
/* Override the user-supplied umask. */
(void)umask(S_IWGRP | S_IWOTH);
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r290027 - stable/10/usr.sbin/tzsetup

2015-10-26 Thread Xin LI
Author: delphij
Date: Tue Oct 27 00:37:19 2015
New Revision: 290027
URL: https://svnweb.freebsd.org/changeset/base/290027

Log:
  MFC r289269:
  
  Use chroot(2) instead of using prefixes for files.
  
  Previously, the code prefixes the chroot path to actual file paths to
  simulate the effect.  This, however, will not work for tzset(3) which
  expects the current system have a working set of timezone data files,
  and that is not always the case.
  
  This changeset simplifies the handling of paths and use an actual
  chroot(2) call to implement the effect.
  
  PR:   bin/197313

Modified:
  stable/10/usr.sbin/tzsetup/tzsetup.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/tzsetup/tzsetup.c
==
--- stable/10/usr.sbin/tzsetup/tzsetup.cMon Oct 26 23:28:35 2015
(r290026)
+++ stable/10/usr.sbin/tzsetup/tzsetup.cTue Oct 27 00:37:19 2015
(r290027)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -935,23 +936,18 @@ main(int argc, char **argv)
if (argc - optind > 1)
usage();
 
-   if (chrootenv == NULL) {
-   strcpy(path_zonetab, _PATH_ZONETAB);
-   strcpy(path_iso3166, _PATH_ISO3166);
-   strcpy(path_zoneinfo, _PATH_ZONEINFO);
-   strcpy(path_localtime, _PATH_LOCALTIME);
-   strcpy(path_db, _PATH_DB);
-   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
-   } else {
-   sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB);
-   sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166);
-   sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO);
-   sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME);
-   sprintf(path_db, "%s/%s", chrootenv, _PATH_DB);
-   sprintf(path_wall_cmos_clock, "%s/%s", chrootenv,
-   _PATH_WALL_CMOS_CLOCK);
+   if (chrootenv != NULL) {
+   rv = chroot(chrootenv);
+   if (rv != 0)
+   err(EX_OSERR, "chroot to %s", chrootenv);
}
 
+   strcpy(path_zonetab, _PATH_ZONETAB);
+   strcpy(path_iso3166, _PATH_ISO3166);
+   strcpy(path_zoneinfo, _PATH_ZONEINFO);
+   strcpy(path_localtime, _PATH_LOCALTIME);
+   strcpy(path_db, _PATH_DB);
+   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
 
/* Override the user-supplied umask. */
(void)umask(S_IWGRP | S_IWOTH);
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r290150 - stable/10/share/timedef

2015-10-29 Thread Xin LI
Author: delphij
Date: Thu Oct 29 17:00:51 2015
New Revision: 290150
URL: https://svnweb.freebsd.org/changeset/base/290150

Log:
  MFC r289038,r289041:
  
  Add encoding for mime-types.
  
  Fix short month names and replace %b with %_m in date_fmt for Chinese
  locales.
  
  When using a Chinese locale, such as zh_TW.UTF-8 or zh_CN.UTF-8,
  nl_langinfo(ABMON_*) only returned numbers.  For instance,
  nl_langinfo(ABMON_1) returns 1, nl_langinfo(ABMON_2) returns 2, and
  so on.
  
  This causes problems in applications that put the short month name
  and the day of the month together.  For example, 'Apr 14' in English
  becomes '414æ—¥' in Chinese on the top bar of GNOME Shell.
  
  This problem may be resolved by appending '月' to all short month
  names and replacing %b with %_m in date_fmt. ja_JP.UTF-8 already
  does this, and this matches the en_US.ISO8859-1 behavior, which
  returns 'Oct'.  The GNU C Library also returns values with '月'
  appended.
  
  PR:   199441
  Submitted by: Ting-Wei Lan 

Modified:
  stable/10/share/timedef/zh_CN.GB18030.src   (contents, props changed)
  stable/10/share/timedef/zh_CN.GB2312.src   (contents, props changed)
  stable/10/share/timedef/zh_CN.UTF-8.src   (contents, props changed)
  stable/10/share/timedef/zh_CN.eucCN.src   (contents, props changed)
  stable/10/share/timedef/zh_TW.Big5.src   (contents, props changed)
  stable/10/share/timedef/zh_TW.UTF-8.src   (contents, props changed)
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/timedef/zh_CN.GB18030.src
==
--- stable/10/share/timedef/zh_CN.GB18030.src   Thu Oct 29 16:53:34 2015
(r290149)
+++ stable/10/share/timedef/zh_CN.GB18030.src   Thu Oct 29 17:00:51 2015
(r290150)
@@ -5,18 +5,18 @@
 #
 # Short month names
 #
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
+ 1��
+ 2��
+ 3��
+ 4��
+ 5��
+ 6��
+ 7��
+ 8��
+ 9��
+10��
+11��
+12��
 #
 # Long month names (as in a date)
 #
@@ -75,7 +75,7 @@
 #
 # date_fmt
 #
-%Y��%b��%e�� %A %X %Z
+%Y��%_m��%e�� %A %X %Z
 #
 # Long month names (without case ending)
 #

Modified: stable/10/share/timedef/zh_CN.GB2312.src
==
--- stable/10/share/timedef/zh_CN.GB2312.srcThu Oct 29 16:53:34 2015
(r290149)
+++ stable/10/share/timedef/zh_CN.GB2312.srcThu Oct 29 17:00:51 2015
(r290150)
@@ -5,18 +5,18 @@
 #
 # Short month names
 #
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
+ 1��
+ 2��
+ 3��
+ 4��
+ 5��
+ 6��
+ 7��
+ 8��
+ 9��
+10��
+11��
+12��
 #
 # Long month names (as in a date)
 #
@@ -75,7 +75,7 @@
 #
 # date_fmt
 #
-%Y��%b��%e�� %A %X %Z
+%Y��%_m��%e�� %A %X %Z
 #
 # Long month names (without case ending)
 #

Modified: stable/10/share/timedef/zh_CN.UTF-8.src
==
--- stable/10/share/timedef/zh_CN.UTF-8.src Thu Oct 29 16:53:34 2015
(r290149)
+++ stable/10/share/timedef/zh_CN.UTF-8.src Thu Oct 29 17:00:51 2015
(r290150)
@@ -5,18 +5,18 @@
 #
 # Short month names
 #
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
+ 1月
+ 2月
+ 3月
+ 4月
+ 5月
+ 6月
+ 7月
+ 8月
+ 9月
+10月
+11月
+12月
 #
 # Long month names (as in a date)
 #
@@ -75,7 +75,7 @@
 #
 # date_fmt
 #
-%Y年%b月%e日 %A %X %Z
+%Y年%_m月%e日 %A %X %Z
 #
 # Long month names (without case ending)
 #

Modified: stable/10/share/timedef/zh_CN.eucCN.src
==
--- stable/10/share/timedef/zh_CN.eucCN.src Thu Oct 29 16:53:34 2015
(r290149)
+++ stable/10/share/timedef/zh_CN.eucCN.src Thu Oct 29 17:00:51 2015
(r290150)
@@ -5,18 +5,18 @@
 #
 # Short month names
 #
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
+ 1��
+ 2��
+ 3��
+ 4��
+ 5��
+ 6��
+ 7��
+ 8��
+ 9��
+10��
+11��
+12��
 #
 # Long month names (as in a date)
 #
@@ -75,7 +75,7 @@
 #
 # date_fmt
 #
-%Y��%b��%e�� %A %X %Z
+%Y��%_m��%e�� %A %X %Z
 #
 # Long month names (without case ending)
 #

Modified: stable/10/share/timedef/zh_TW.Big5.src
==
--- stable/10/share/timedef/zh_TW.Big5.src  Thu Oct 29 16:53:34 2015
(r290149)
+++ stable/10/share/timedef/zh_TW.Big5.src  Thu Oct 29 17:00:51 2015
(r290150)
@@ -4,18 +4,18 @@
 # WARNING: empty lines are essential too
 #
 # Short month names
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
+ 1��
+ 2��
+ 3��
+ 4��
+ 5��
+ 6��
+ 7��
+ 8��
+ 9��
+10��
+11��
+12��
 #
 # Long month names (as in a date)
 #
@@ -74,7 +74,7 @@
 #
 # date_fmt
 #
-%Y�~%b��%e�� %A %X %Z
+%Y�~%_m��%e�� %A %X %Z
 #
 # Long month names (without case ending)
 #

Modified: stable/10/share/timedef/zh_TW.UTF-8.src
==
--- stable/10/share/timedef/zh_TW.UTF-8.src Thu Oct 29 16:53:34 2015
(r290149)
+++ 

svn commit: r290152 - in stable/10: contrib/file contrib/file/doc contrib/file/magic/Magdir contrib/file/src lib/libmagic

2015-10-29 Thread Xin LI
Author: delphij
Date: Thu Oct 29 17:51:48 2015
New Revision: 290152
URL: https://svnweb.freebsd.org/changeset/base/290152

Log:
  MFC r287453,287454,288143:
  
  file 5.25.
  
  Relnotes: yes

Modified:
  stable/10/contrib/file/ChangeLog
  stable/10/contrib/file/configure
  stable/10/contrib/file/configure.ac
  stable/10/contrib/file/doc/file.man
  stable/10/contrib/file/doc/libmagic.man
  stable/10/contrib/file/doc/magic.man
  stable/10/contrib/file/magic/Magdir/adventure
  stable/10/contrib/file/magic/Magdir/apple
  stable/10/contrib/file/magic/Magdir/archive
  stable/10/contrib/file/magic/Magdir/c-lang
  stable/10/contrib/file/magic/Magdir/c64
  stable/10/contrib/file/magic/Magdir/compress
  stable/10/contrib/file/magic/Magdir/database
  stable/10/contrib/file/magic/Magdir/elf
  stable/10/contrib/file/magic/Magdir/filesystems
  stable/10/contrib/file/magic/Magdir/fortran
  stable/10/contrib/file/magic/Magdir/frame
  stable/10/contrib/file/magic/Magdir/iff
  stable/10/contrib/file/magic/Magdir/images
  stable/10/contrib/file/magic/Magdir/karma
  stable/10/contrib/file/magic/Magdir/linux
  stable/10/contrib/file/magic/Magdir/mail.news
  stable/10/contrib/file/magic/Magdir/make
  stable/10/contrib/file/magic/Magdir/map
  stable/10/contrib/file/magic/Magdir/msdos
  stable/10/contrib/file/magic/Magdir/netscape
  stable/10/contrib/file/magic/Magdir/python
  stable/10/contrib/file/magic/Magdir/scientific
  stable/10/contrib/file/magic/Magdir/sgi
  stable/10/contrib/file/magic/Magdir/sgml
  stable/10/contrib/file/magic/Magdir/windows
  stable/10/contrib/file/src/apprentice.c
  stable/10/contrib/file/src/file.c
  stable/10/contrib/file/src/file.h
  stable/10/contrib/file/src/file_opts.h
  stable/10/contrib/file/src/funcs.c
  stable/10/contrib/file/src/gmtime_r.c
  stable/10/contrib/file/src/localtime_r.c
  stable/10/contrib/file/src/magic.c
  stable/10/contrib/file/src/magic.h
  stable/10/contrib/file/src/magic.h.in
  stable/10/contrib/file/src/print.c
  stable/10/contrib/file/src/readelf.c
  stable/10/contrib/file/src/softmagic.c
  stable/10/lib/libmagic/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/file/ChangeLog
==
--- stable/10/contrib/file/ChangeLogThu Oct 29 17:04:43 2015
(r290151)
+++ stable/10/contrib/file/ChangeLogThu Oct 29 17:51:48 2015
(r290152)
@@ -1,3 +1,23 @@
+2015-09-16   9:50  Christos Zoulas 
+   
+   * release 5.25
+
+2015-09-11  13:25  Christos Zoulas 
+
+   * add a limit to the length of regex searches
+
+2015-09-08   9:50  Christos Zoulas 
+
+   * fix problems with --parameter (Christoph Biedl)
+
+2015-07-11  10:35  Christos Zoulas 
+
+   * Windows fixes PR/466 (Jason Hood)
+
+2015-07-09  10:35  Christos Zoulas 
+
+   * release 5.24
+
 2015-06-11   8:52  Christos Zoulas 
 
* redo long option encoding to fix off-by-one in 5.23

Modified: stable/10/contrib/file/configure
==
--- stable/10/contrib/file/configureThu Oct 29 17:04:43 2015
(r290151)
+++ stable/10/contrib/file/configureThu Oct 29 17:51:48 2015
(r290152)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for file 5.23.
+# Generated by GNU Autoconf 2.69 for file 5.25.
 #
 # Report bugs to .
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='file'
 PACKAGE_TARNAME='file'
-PACKAGE_VERSION='5.23'
-PACKAGE_STRING='file 5.23'
+PACKAGE_VERSION='5.25'
+PACKAGE_STRING='file 5.25'
 PACKAGE_BUGREPORT='chris...@astron.com'
 PACKAGE_URL=''
 
@@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures file 5.23 to adapt to many kinds of systems.
+\`configure' configures file 5.25 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1397,7 +1397,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of file 5.23:";;
+ short | recursive ) echo "Configuration of file 5.25:";;
esac
   cat <<\_ACEOF
 
@@ -1507,7 +1507,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-file configure 5.23
+file configure 5.25
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2163,7 +2163,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by file $as_me 5.23, which 

svn commit: r290149 - in stable/10: sbin/rtsol usr.sbin/rtadvd usr.sbin/rtsold

2015-10-29 Thread Xin LI
Author: delphij
Date: Thu Oct 29 16:53:34 2015
New Revision: 290149
URL: https://svnweb.freebsd.org/changeset/base/290149

Log:
  MFC r288963:
  
  Now that we own the code, use arc4random(3) unconditionally
  and remove the corresponding HAVE_ARC4RANDOM conditions.

Modified:
  stable/10/sbin/rtsol/Makefile
  stable/10/usr.sbin/rtadvd/Makefile
  stable/10/usr.sbin/rtadvd/rtadvd.c
  stable/10/usr.sbin/rtsold/Makefile
  stable/10/usr.sbin/rtsold/rtsold.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/rtsol/Makefile
==
--- stable/10/sbin/rtsol/Makefile   Thu Oct 29 16:50:28 2015
(r290148)
+++ stable/10/sbin/rtsol/Makefile   Thu Oct 29 16:53:34 2015
(r290149)
@@ -23,6 +23,6 @@ SRCS= rtsold.c rtsol.c if.c probe.c dump
 MAN=
 
 WARNS?=3
-CFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_POLL_H -DSMALL
+CFLAGS+= -DHAVE_POLL_H -DSMALL
 
 .include 

Modified: stable/10/usr.sbin/rtadvd/Makefile
==
--- stable/10/usr.sbin/rtadvd/Makefile  Thu Oct 29 16:50:28 2015
(r290148)
+++ stable/10/usr.sbin/rtadvd/Makefile  Thu Oct 29 16:53:34 2015
(r290149)
@@ -22,8 +22,6 @@ SRCS= rtadvd.c rrenum.c advcap.c if.c co
 DPADD= ${LIBUTIL}
 LDADD= -lutil
 
-CFLAGS+= -DHAVE_ARC4RANDOM
-
 WARNS?=1
 
 .include 

Modified: stable/10/usr.sbin/rtadvd/rtadvd.c
==
--- stable/10/usr.sbin/rtadvd/rtadvd.c  Thu Oct 29 16:50:28 2015
(r290148)
+++ stable/10/usr.sbin/rtadvd/rtadvd.c  Thu Oct 29 16:53:34 2015
(r290149)
@@ -242,14 +242,6 @@ main(int argc, char *argv[])
/* timer initialization */
rtadvd_timer_init();
 
-#ifndef HAVE_ARC4RANDOM
-   /* random value initialization */
-#ifdef __FreeBSD__
-   srandomdev();
-#else
-   srandom((unsigned long)time(NULL));
-#endif
-#endif
pfh = pidfile_open(pidfilename, 0600, );
if (pfh == NULL) {
if (errno == EEXIST)
@@ -1016,11 +1008,7 @@ set_short_delay(struct ifinfo *ifi)
 * delay and send the advertisement at the
 * already-scheduled time. RFC 4861 6.2.6
 */
-#ifdef HAVE_ARC4RANDOM
delay = arc4random_uniform(MAX_RA_DELAY_TIME);
-#else
-   delay = random() % MAX_RA_DELAY_TIME;
-#endif
interval.tv_sec = 0;
interval.tv_nsec = delay * 1000;
rest = rtadvd_timer_rest(ifi->ifi_ra_timer);
@@ -1894,13 +1882,8 @@ ra_timer_update(void *arg, struct timesp
 * MaxRtrAdvInterval (RFC4861 6.2.4).
 */
interval = rai->rai_mininterval;
-#ifdef HAVE_ARC4RANDOM
interval += arc4random_uniform(rai->rai_maxinterval -
rai->rai_mininterval);
-#else
-   interval += random() % (rai->rai_maxinterval -
-   rai->rai_mininterval);
-#endif
break;
case IFI_STATE_TRANSITIVE:
/*

Modified: stable/10/usr.sbin/rtsold/Makefile
==
--- stable/10/usr.sbin/rtsold/Makefile  Thu Oct 29 16:50:28 2015
(r290148)
+++ stable/10/usr.sbin/rtsold/Makefile  Thu Oct 29 16:53:34 2015
(r290149)
@@ -20,7 +20,7 @@ MLINKS=   rtsold.8 rtsol.8
 SRCS=  rtsold.c rtsol.c if.c probe.c dump.c rtsock.c
 
 WARNS?=3
-CFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_POLL_H
+CFLAGS+= -DHAVE_POLL_H
 DPADD= ${LIBKVM}
 LDADD= -lkvm
 

Modified: stable/10/usr.sbin/rtsold/rtsold.c
==
--- stable/10/usr.sbin/rtsold/rtsold.c  Thu Oct 29 16:50:28 2015
(r290148)
+++ stable/10/usr.sbin/rtsold/rtsold.c  Thu Oct 29 16:53:34 2015
(r290149)
@@ -223,10 +223,6 @@ main(int argc, char **argv)
errx(1, "pid filename (%s) must be an absolute path",
pidfilename);
}
-#ifndef HAVE_ARC4RANDOM
-   /* random value initialization */
-   srandom((u_long)time(NULL));
-#endif
 
 #if (__FreeBSD_version < 90)
if (Fflag) {
@@ -780,11 +776,7 @@ rtsol_timer_update(struct ifinfo *ifi)
ifi->timer = tm_max;/* stop timer(valid?) */
break;
case IFS_DELAY:
-#ifndef HAVE_ARC4RANDOM
-   interval = random() % (MAX_RTR_SOLICITATION_DELAY * MILLION);
-#else
interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * 
MILLION);
-#endif
ifi->timer.tv_sec = interval / MILLION;
ifi->timer.tv_nsec = (interval % MILLION) * 1000;
break;
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r290145 - stable/10/usr.sbin/iscsid

2015-10-29 Thread Xin LI
Author: delphij
Date: Thu Oct 29 16:34:55 2015
New Revision: 290145
URL: https://svnweb.freebsd.org/changeset/base/290145

Log:
  MFC r288959:
  
  Remove a few unused headers.

Modified:
  stable/10/usr.sbin/iscsid/discovery.c
  stable/10/usr.sbin/iscsid/pdu.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/iscsid/discovery.c
==
--- stable/10/usr.sbin/iscsid/discovery.c   Thu Oct 29 15:20:47 2015
(r290144)
+++ stable/10/usr.sbin/iscsid/discovery.c   Thu Oct 29 16:34:55 2015
(r290145)
@@ -33,10 +33,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
-#include 
-#include 
 #include 
 #include 
 

Modified: stable/10/usr.sbin/iscsid/pdu.c
==
--- stable/10/usr.sbin/iscsid/pdu.c Thu Oct 29 15:20:47 2015
(r290144)
+++ stable/10/usr.sbin/iscsid/pdu.c Thu Oct 29 16:34:55 2015
(r290145)
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r290146 - stable/10/usr.sbin/watch

2015-10-29 Thread Xin LI
Author: delphij
Date: Thu Oct 29 16:45:06 2015
New Revision: 290146
URL: https://svnweb.freebsd.org/changeset/base/290146

Log:
  MFC r288960:
  
  Use strlcpy() when the string is expected to be nul-terminated.

Modified:
  stable/10/usr.sbin/watch/watch.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/watch/watch.c
==
--- stable/10/usr.sbin/watch/watch.cThu Oct 29 16:34:55 2015
(r290145)
+++ stable/10/usr.sbin/watch/watch.cThu Oct 29 16:45:06 2015
(r290146)
@@ -247,7 +247,7 @@ set_dev(const char *name)
if ((sb.st_mode & S_IFMT) != S_IFCHR)
fatal(EX_DATAERR, "must be a character device");
 
-   strncpy(dev_name, buf, DEV_NAME_LEN);
+   strlcpy(dev_name, buf, sizeof(dev_name));
 
attach_snp();
 }
@@ -340,7 +340,7 @@ main(int ac, char *av[])
else
fatal(EX_DATAERR, "no device name given");
} else
-   strncpy(dev_name, *av, DEV_NAME_LEN);
+   strlcpy(dev_name, *av, sizeof(dev_name));
 
set_dev(dev_name);
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r290853 - stable/10/usr.sbin/rtadvd

2015-11-14 Thread Xin LI
Author: delphij
Date: Sun Nov 15 07:10:02 2015
New Revision: 290853
URL: https://svnweb.freebsd.org/changeset/base/290853

Log:
  MFC r290173:
  
  Use strlcpy().

Modified:
  stable/10/usr.sbin/rtadvd/if.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/rtadvd/if.c
==
--- stable/10/usr.sbin/rtadvd/if.c  Sun Nov 15 06:38:38 2015
(r290852)
+++ stable/10/usr.sbin/rtadvd/if.c  Sun Nov 15 07:10:02 2015
(r290853)
@@ -359,8 +359,7 @@ update_persist_ifinfo(struct ifilist_hea
 
ELM_MALLOC(ifi, exit(1));
ifi->ifi_ifindex = 0;
-   strncpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname)-1);
-   ifi->ifi_ifname[sizeof(ifi->ifi_ifname)-1] = '\0';
+   strlcpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname));
ifi->ifi_rainfo = NULL;
ifi->ifi_state = IFI_STATE_UNCONFIGURED;
TAILQ_INSERT_TAIL(ifi_head, ifi, ifi_next);
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r290854 - stable/10/usr.sbin/pw

2015-11-14 Thread Xin LI
Author: delphij
Date: Sun Nov 15 07:14:17 2015
New Revision: 290854
URL: https://svnweb.freebsd.org/changeset/base/290854

Log:
  MFC r290174:
  
  In pw_userlock, set 'name' to NULL when we encounter an all number string
  because it is also used as an indicator of whether a name or an UID is
  being used and we may have undefined results as 'name' may contain
  uninitialized stack contents.

Modified:
  stable/10/usr.sbin/pw/pw_user.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pw/pw_user.c
==
--- stable/10/usr.sbin/pw/pw_user.c Sun Nov 15 07:10:02 2015
(r290853)
+++ stable/10/usr.sbin/pw/pw_user.c Sun Nov 15 07:14:17 2015
(r290854)
@@ -280,9 +280,10 @@ pw_userlock(char *arg1, int mode)
if (arg1 == NULL)
errx(EX_DATAERR, "username or id required");
 
-   if (arg1[strspn(arg1, "0123456789")] == '\0')
+   if (arg1[strspn(arg1, "0123456789")] == '\0') {
id = pw_checkid(arg1, UID_MAX);
-   else
+   name = NULL;
+   } else
name = arg1;
 
pwd = (name != NULL) ? GETPWNAM(pw_checkname(name, 0)) : GETPWUID(id);
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287223 - stable/10/usr.bin/patch

2015-08-27 Thread Xin LI
Author: delphij
Date: Thu Aug 27 21:52:09 2015
New Revision: 287223
URL: https://svnweb.freebsd.org/changeset/base/287223

Log:
  MFC r281800 (pfg):
  
  patch(1): small include changes.
  
  Mostly to match OpenBSD, no functional change.
  
  MFC r286601 + 286617:
  
  use posix_spawn(3) instead of fork() and exec() manually as suggested
  by jmg@.

Modified:
  stable/10/usr.bin/patch/inp.c
  stable/10/usr.bin/patch/pch.c
  stable/10/usr.bin/patch/util.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/patch/inp.c
==
--- stable/10/usr.bin/patch/inp.c   Thu Aug 27 21:27:47 2015
(r287222)
+++ stable/10/usr.bin/patch/inp.c   Thu Aug 27 21:52:09 2015
(r287223)
@@ -36,8 +36,10 @@
 #include ctype.h
 #include errno.h
 #include libgen.h
-#include limits.h
+#include paths.h
+#include spawn.h
 #include stddef.h
+#include stdint.h
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -134,14 +136,13 @@ reallocate_lines(size_t *lines_allocated
 static bool
 plan_a(const char *filename)
 {
-   int ifd, statfailed, devnull, pstat;
+   int ifd, statfailed, pstat;
char*p, *s, lbuf[INITLINELEN];
struct stat filestat;
ptrdiff_t   sz;
size_t  i;
size_t  iline, lines_allocated;
pid_t   pid;
-   char*argp[4] = {NULL};
 
 #ifdef DEBUGGING
if (debug  8)
@@ -178,7 +179,9 @@ plan_a(const char *filename)
((filestat.st_mode  0022) == 0  filestat.st_uid != getuid())) {
char*filebase, *filedir;
struct stat cstat;
-   char *tmp_filename1, *tmp_filename2;
+   char*tmp_filename1, *tmp_filename2;
+   char*argp[4] = { NULL };
+   posix_spawn_file_actions_t file_actions;
 
tmp_filename1 = strdup(filename);
tmp_filename2 = strdup(filename);
@@ -188,6 +191,8 @@ plan_a(const char *filename)
filebase = basename(tmp_filename1);
filedir = dirname(tmp_filename2);
 
+   memset(argp, 0, sizeof(argp));
+
 #define try(f, a1, a2, a3) \
(snprintf(lbuf, sizeof(lbuf), f, a1, a2, a3), stat(lbuf, cstat) == 0)
 
@@ -213,50 +218,39 @@ plan_a(const char *filename)
say(Comparing file %s to default 
RCS version...\n, filename);
 
-   switch (pid = fork()) {
-   case -1:
-   fatal(can't fork: %s\n,
-   strerror(errno));
-   case 0:
-   devnull = open(/dev/null, O_RDONLY);
-   if (devnull == -1) {
-   fatal(can't open /dev/null: 
%s,
-   strerror(errno));
-   }
-   (void)dup2(devnull, STDOUT_FILENO);
-   argp[0] = strdup(RCSDIFF);
-   argp[1] = strdup(filename);
-   execv(RCSDIFF, argp);
-   exit(127);
-   }
-   pid = waitpid(pid, pstat, 0);
-   if (pid == -1 || WEXITSTATUS(pstat) != 0) {
-   fatal(can't check out file %s: 
-   differs from default RCS 
version\n,
-   filename);
-   }
+   argp[0] = __DECONST(char *, RCSDIFF);
+   argp[1] = __DECONST(char *, filename);
+   posix_spawn_file_actions_init(file_actions);
+   posix_spawn_file_actions_addopen(file_actions,
+   STDOUT_FILENO, _PATH_DEVNULL, O_WRONLY, 0);
+   if (posix_spawn(pid, RCSDIFF, file_actions,
+   NULL, argp, NULL) == 0) {
+   pid = waitpid(pid, pstat, 0);
+   if (pid == -1 || WEXITSTATUS(pstat) != 
0)
+   fatal(can't check out file %s: 

+   differs from default RCS 
version\n,
+   filename);
+   } else
+   fatal(posix_spawn: %s\n, 
strerror(errno));
+   

svn commit: r287184 - stable/10/cddl/contrib/opensolaris/cmd/ztest

2015-08-26 Thread Xin LI
Author: delphij
Date: Thu Aug 27 01:02:01 2015
New Revision: 287184
URL: https://svnweb.freebsd.org/changeset/base/287184

Log:
  MFC r286737:
  
  Plug a memory leak.

Modified:
  stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==
--- stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.cWed Aug 26 
23:58:03 2015(r287183)
+++ stable/10/cddl/contrib/opensolaris/cmd/ztest/ztest.cThu Aug 27 
01:02:01 2015(r287184)
@@ -5905,6 +5905,7 @@ ztest_init(ztest_shared_t *zs)
}
VERIFY3U(0, ==, spa_create(ztest_opts.zo_pool, nvroot, props, NULL));
nvlist_free(nvroot);
+   nvlist_free(props);
 
VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, spa, FTAG));
zs-zs_metaslab_sz =
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r287328 - stable/10/sbin/ping6

2015-08-31 Thread Xin LI
Author: delphij
Date: Mon Aug 31 18:53:41 2015
New Revision: 287328
URL: https://svnweb.freebsd.org/changeset/base/287328

Log:
  MFC r286834:
  
  Use arc4random_buf().  While there, unifdef the code for !HAVE_ARC4RANDOM.

Modified:
  stable/10/sbin/ping6/Makefile
  stable/10/sbin/ping6/ping6.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/ping6/Makefile
==
--- stable/10/sbin/ping6/Makefile   Mon Aug 31 18:07:17 2015
(r287327)
+++ stable/10/sbin/ping6/Makefile   Mon Aug 31 18:53:41 2015
(r287328)
@@ -3,8 +3,7 @@
 PROG=  ping6
 MAN=   ping6.8
 
-CFLAGS+=-DIPSEC -DKAME_SCOPEID -DUSE_RFC2292BIS \
-   -DHAVE_ARC4RANDOM
+CFLAGS+=-DIPSEC -DKAME_SCOPEID -DUSE_RFC2292BIS
 WARNS?=2
 
 BINOWN=root

Modified: stable/10/sbin/ping6/ping6.c
==
--- stable/10/sbin/ping6/ping6.cMon Aug 31 18:07:17 2015
(r287327)
+++ stable/10/sbin/ping6/ping6.cMon Aug 31 18:53:41 2015
(r287328)
@@ -289,9 +289,6 @@ main(int argc, char *argv[])
 {
struct timeval last, intvl;
struct sockaddr_in6 from, *sin6;
-#ifndef HAVE_ARC4RANDOM
-   struct timeval seed;
-#endif
struct addrinfo hints, *res;
struct sigaction si_sa;
int cc, i;
@@ -743,17 +740,7 @@ main(int argc, char *argv[])
*datap++ = i;
 
ident = getpid() & 0x;
-#ifndef HAVE_ARC4RANDOM
-   gettimeofday(, NULL);
-   srand((unsigned int)(seed.tv_sec ^ seed.tv_usec ^ (long)ident));
-   memset(nonce, 0, sizeof(nonce));
-   for (i = 0; i < sizeof(nonce); i += sizeof(int))
-   *((int *)[i]) = rand();
-#else
-   memset(nonce, 0, sizeof(nonce));
-   for (i = 0; i < sizeof(nonce); i += sizeof(u_int32_t))
-   *((u_int32_t *)[i]) = arc4random();
-#endif
+   arc4random_buf(nonce, sizeof(nonce));
optval = 1;
if (options & F_DONTFRAG)
if (setsockopt(s, IPPROTO_IPV6, IPV6_DONTFRAG,
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287329 - stable/10/sys/sys

2015-08-31 Thread Xin LI
Author: delphij
Date: Mon Aug 31 18:58:53 2015
New Revision: 287329
URL: https://svnweb.freebsd.org/changeset/base/287329

Log:
  MFC r286836:
  
  so_vnet is constant after creation and no locking is necessary,
  document this fact.

Modified:
  stable/10/sys/sys/socketvar.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/socketvar.h
==
--- stable/10/sys/sys/socketvar.h   Mon Aug 31 18:53:41 2015
(r287328)
+++ stable/10/sys/sys/socketvar.h   Mon Aug 31 18:58:53 2015
(r287329)
@@ -76,7 +76,7 @@ struct socket {
short   so_state;   /* (b) internal state flags SS_* */
int so_qstate;  /* (e) internal state flags SQ_* */
void*so_pcb;/* protocol control block */
-   struct  vnet *so_vnet;  /* network stack instance */
+   struct  vnet *so_vnet;  /* (a) network stack instance */
struct  protosw *so_proto;  /* (a) protocol handle */
 /*
  * Variables for connection queuing.
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287338 - stable/10/sys/rpc

2015-08-31 Thread Xin LI
Author: delphij
Date: Tue Sep  1 01:01:35 2015
New Revision: 287338
URL: https://svnweb.freebsd.org/changeset/base/287338

Log:
  MFC r286894:
  
  Set curvnet context inside the RPC code in more places.
  
  Reviewed by:  melifaro

Modified:
  stable/10/sys/rpc/rpc_generic.c
  stable/10/sys/rpc/svc_vc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/rpc/rpc_generic.c
==
--- stable/10/sys/rpc/rpc_generic.c Mon Aug 31 23:10:42 2015
(r287337)
+++ stable/10/sys/rpc/rpc_generic.c Tue Sep  1 01:01:35 2015
(r287338)
@@ -703,7 +703,9 @@ __rpc_sockisbound(struct socket *so)
struct sockaddr *sa;
int error, bound;
 
+   CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, );
+   CURVNET_RESTORE();
if (error)
return (0);
 
@@ -791,7 +793,9 @@ bindresvport(struct socket *so, struct s
socklen_t salen;
 
if (sa == NULL) {
+   CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, );
+   CURVNET_RESTORE();
if (error)
return (error);
freesa = TRUE;

Modified: stable/10/sys/rpc/svc_vc.c
==
--- stable/10/sys/rpc/svc_vc.c  Mon Aug 31 23:10:42 2015(r287337)
+++ stable/10/sys/rpc/svc_vc.c  Tue Sep  1 01:01:35 2015(r287338)
@@ -150,7 +150,9 @@ svc_vc_create(SVCPOOL *pool, struct sock
SOCK_LOCK(so);
if (so->so_state & (SS_ISCONNECTED|SS_ISDISCONNECTED)) {
SOCK_UNLOCK(so);
+   CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_peeraddr(so, );
+   CURVNET_RESTORE();
if (error)
return (NULL);
xprt = svc_vc_create_conn(pool, so, sa);
@@ -167,7 +169,9 @@ svc_vc_create(SVCPOOL *pool, struct sock
xprt->xp_p2 = NULL;
xprt->xp_ops = _vc_rendezvous_ops;
 
+   CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, );
+   CURVNET_RESTORE();
if (error) {
goto cleanup_svc_vc_create;
}
@@ -249,7 +253,9 @@ svc_vc_create_conn(SVCPOOL *pool, struct
 
memcpy(>xp_rtaddr, raddr, raddr->sa_len);
 
+   CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, );
+   CURVNET_RESTORE();
if (error)
goto cleanup_svc_vc_create;
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287546 - stable/10/share/zoneinfo

2015-09-07 Thread Xin LI
Author: delphij
Date: Tue Sep  8 00:43:40 2015
New Revision: 287546
URL: https://svnweb.freebsd.org/changeset/base/287546

Log:
  MFC r287021:
  
  Fix build when LEAPSECONDS is enabled.

Modified:
  stable/10/share/zoneinfo/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/zoneinfo/Makefile
==
--- stable/10/share/zoneinfo/Makefile   Tue Sep  8 00:34:38 2015
(r287545)
+++ stable/10/share/zoneinfo/Makefile   Tue Sep  8 00:43:40 2015
(r287546)
@@ -34,7 +34,7 @@ CONTRIBDIR=   ${.CURDIR}/../../contrib/tzd
 .PATH: ${CONTRIBDIR}
 
 .if defined(LEAPSECONDS)
-LEAPFILE=  -L leapseconds
+LEAPFILE=  -L ${CONTRIBDIR}leapseconds
 .else
 LEAPFILE=
 .endif
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287545 - stable/10/contrib/tzdata

2015-09-07 Thread Xin LI
Author: delphij
Date: Tue Sep  8 00:34:38 2015
New Revision: 287545
URL: https://svnweb.freebsd.org/changeset/base/287545

Log:
  MFC r287020: MFV r287019: leapseconds from tzdata2015f.

Modified:
  stable/10/contrib/tzdata/leapseconds
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/tzdata/leapseconds
==
--- stable/10/contrib/tzdata/leapsecondsTue Sep  8 00:30:10 2015
(r287544)
+++ stable/10/contrib/tzdata/leapsecondsTue Sep  8 00:34:38 2015
(r287545)
@@ -1,14 +1,20 @@
-# 
-# This file is in the public domain, so clarified as of
-# 2009-05-17 by Arthur David Olson.
+# Allowance for leap seconds added to each time zone file.
 
-# Allowance for leapseconds added to each timezone file.
+# This file is in the public domain.
 
-# The International Earth Rotation Service periodically uses leap seconds
-# to keep UTC to within 0.9 s of UT1
+# This file is generated automatically from the data in the public-domain
+# leap-seconds.list file available from most NIST time servers.
+# If the URL  does not work,
+# you should be able to pick up leap-seconds.list from a secondary NIST server.
+# For more about leap-seconds.list, please see
+# The NTP Timescale and Leap Seconds
+# http://www.eecis.udel.edu/~mills/leap.html
+
+# The International Earth Rotation and Reference Systems Service
+# periodically uses leap seconds to keep UTC to within 0.9 s of UT1
 # (which measures the true angular orientation of the earth in space); see
 # Terry J Quinn, The BIPM and the accurate measure of time,
-# Proc IEEE 79, 7 (July 1991), 894-905.
+# Proc IEEE 79, 7 (July 1991), 894-905 .
 # There were no leap seconds before 1972, because the official mechanism
 # accounting for the discrepancy between atomic time and the earth's rotation
 # did not exist until the early 1970s.
@@ -19,8 +25,8 @@
 # or
 #  LeapYEARMON DAY 23:59:59-   R/S
 
-# If the leapsecond is Rolling (R) the given time is local time
-# If the leapsecond is Stationary (S) the given time is UTC
+# If the leapsecond is Rolling (R) the given time is local time.
+# If the leapsecond is Stationary (S) the given time is UTC.
 
 # Leap YEARMONTH   DAY HH:MM:SSCORRR/S
 Leap   1972Jun 30  23:59:60+   S
@@ -48,53 +54,7 @@ Leap 1998Dec 31  23:59:60+   S
 Leap   2005Dec 31  23:59:60+   S
 Leap   2008Dec 31  23:59:60+   S
 Leap   2012Jun 30  23:59:60+   S
+Leap   2015Jun 30  23:59:60+   S
 
-# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
-#
-# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
-#
-#
-# SERVICE DE LA ROTATION TERRESTRE
-# OBSERVATOIRE DE PARIS
-# 61, Av. de l'Observatoire 75014 PARIS (France)
-# Tel.  : 33 (0) 1 40 51 22 26
-# FAX   : 33 (0) 1 40 51 22 91
-# e-mail: (E-Mail Removed)
-# http://hpiers.obspm.fr/eop-pc
-#
-# Paris, 5 January 2012
-#
-#
-# Bulletin C 43
-#
-# To authorities responsible
-# for the measurement and
-# distribution of time
-#
-#
-# UTC TIME STEP
-# on the 1st of July 2012
-#
-#
-# A positive leap second will be introduced at the end of June 2012.
-# The sequence of dates of the UTC second markers will be:
-#
-#  2012 June 30, 23h 59m 59s
-#  2012 June 30, 23h 59m 60s
-#  2012 July  1,  0h  0m  0s
-#
-# The difference between UTC and the International Atomic Time TAI is:
-#
-# from 2009 January 1, 0h UTC, to 2012 July 1  0h UTC  : UTC-TAI = - 34s
-# from 2012 July 1,0h UTC, until further notice: UTC-TAI = - 35s
-#
-# Leap seconds can be introduced in UTC at the end of the months of December
-# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
-# six months, either to announce a time step in UTC or to confirm that there
-# will be no time step at the next possible date.
-#
-#
-# Daniel GAMBIS
-# Head
-# Earth Orientation Center of IERS
-# Observatoire de Paris, France
+#  Updated through IERS Bulletin C50
+#  File expires on:  28 June 2016
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287549 - stable/10/usr.bin/at

2015-09-07 Thread Xin LI
Author: delphij
Date: Tue Sep  8 02:02:08 2015
New Revision: 287549
URL: https://svnweb.freebsd.org/changeset/base/287549

Log:
  MFC r287123:
  
  Finish r89633 and completely remove the remaining of VERSION.
  
  PR:   bin/202308
  Submitted by: John Hein 

Modified:
  stable/10/usr.bin/at/Makefile.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/at/Makefile.inc
==
--- stable/10/usr.bin/at/Makefile.inc   Tue Sep  8 01:46:52 2015
(r287548)
+++ stable/10/usr.bin/at/Makefile.inc   Tue Sep  8 02:02:08 2015
(r287549)
@@ -1,4 +1,5 @@
-VERSION= 2.9
+# $FreeBSD$
+
 LOCKFILE = .lockfile
 ATSPOOL_DIR=/var/at/spool
 ATJOB_DIR=/var/at/jobs
@@ -13,7 +14,7 @@ PERM_PATH=/var/at
 CFLAGS += -DATJOB_DIR=\"$(ATJOB_DIR)/\" \
-DLFILE=\"$(ATJOB_DIR)/$(LOCKFILE)\" \
-DLOADAVG_MX=$(LOADAVG_MX) -DATSPOOL_DIR=\"$(ATSPOOL_DIR)\" \
-   -DVERSION=\"$(VERSION)\" -DDAEMON_UID=$(DAEMON_UID) 
-DDAEMON_GID=$(DAEMON_GID) \
+   -DDAEMON_UID=$(DAEMON_UID) -DDAEMON_GID=$(DAEMON_GID) \
-DDEFAULT_BATCH_QUEUE=\'$(DEFAULT_BATCH_QUEUE)\' \
-DDEFAULT_AT_QUEUE=\'$(DEFAULT_AT_QUEUE)\' -DPERM_PATH=\"$(PERM_PATH)/\"
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287446 - stable/10/usr.bin/bluetooth/btsockstat

2015-09-03 Thread Xin LI
Author: delphij
Date: Fri Sep  4 00:41:29 2015
New Revision: 287446
URL: https://svnweb.freebsd.org/changeset/base/287446

Log:
  MFC r287345:
  
  Drop group privileges after opening the kvm descriptor, otherwise, the code
  would not drop privileges as expected.
  
  While there also add checks for the drop and bail out immediately if we
  failed.

Modified:
  stable/10/usr.bin/bluetooth/btsockstat/btsockstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/bluetooth/btsockstat/btsockstat.c
==
--- stable/10/usr.bin/bluetooth/btsockstat/btsockstat.c Fri Sep  4 00:14:20 
2015(r287445)
+++ stable/10/usr.bin/bluetooth/btsockstat/btsockstat.c Fri Sep  4 00:41:29 
2015(r287446)
@@ -154,9 +154,9 @@ main(int argc, char *argv[])
 * Discard setgid privileges if not the running kernel so that
 * bad guys can't print interesting stuff from kernel memory.
 */
-
if (memf != NULL)
-   setgid(getgid());
+   if (setgid(getgid()) != 0)
+   err(1, "setgid");
 
kvmd = kopen(memf);
if (kvmd == NULL)
@@ -583,15 +583,9 @@ kopen(char const *memf)
kvm_t   *kvmd = NULL;
char errbuf[_POSIX2_LINE_MAX];
 
-   /*
-* Discard setgid privileges if not the running kernel so that 
-* bad guys can't print interesting stuff from kernel memory.
-*/
-
-   if (memf != NULL)
-   setgid(getgid());   
-
kvmd = kvm_openfiles(NULL, memf, NULL, O_RDONLY, errbuf);
+   if (setgid(getgid()) != 0)
+   err(1, "setgid");
if (kvmd == NULL) {
warnx("kvm_openfiles: %s", errbuf);
return (NULL);
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287790 - stable/10/bin/df

2015-09-14 Thread Xin LI
Author: delphij
Date: Mon Sep 14 17:40:57 2015
New Revision: 287790
URL: https://svnweb.freebsd.org/changeset/base/287790

Log:
  MFC r287236:
  
  Use exit() instead of return in main().  The difference in practice
  is subtle: C standard requires the language runtime to make return
  of int from main() behave like calling exit(), and in FreeBSD we do:
  
exit(main(argc, argv, env))
  
  In lib/csu/${ARCH}/crt1.c, so the real difference is using exit()
  explicitly would use an additional stack frame.
  
  Note however, if there is a on stack pointer is the last reference
  of an allocated memory block, returning from the function would,
  technically, result in a memory leak because we lost the last
  reference to the memory block, and calling exit() from C runtime
  could potentionally overwrite that stack frame that used to belong
  to the main() function.
  
  In practice, this is normally Okay because eventually the kernel
  would tear down the whole address space that belongs to the process
  in the _exit(2) system call, but the difference could confuse
  compilers (which may want to do stack overflow checks) and static
  analyzers.
  
  Replacing return with exit() in main() allows compilers/static
  analyzers to correctly omit or generate the right warnings when
  they do not treat main() specifically.  With the current version
  of clang on FreeBSD/amd64, use of exit() would result in slightly
  smaller code being generated and eliminated a false positive
  warning of memory leak.

Modified:
  stable/10/bin/df/df.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/df/df.c
==
--- stable/10/bin/df/df.c   Mon Sep 14 16:48:19 2015(r287789)
+++ stable/10/bin/df/df.c   Mon Sep 14 17:40:57 2015(r287790)
@@ -296,7 +296,7 @@ main(int argc, char *argv[])
prtstat([i], );
if (cflag)
prtstat(, );
-   return (rv);
+   exit(rv);
 }
 
 static char *
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287794 - stable/10/usr.bin/iconv

2015-09-14 Thread Xin LI
Author: delphij
Date: Mon Sep 14 18:52:41 2015
New Revision: 287794
URL: https://svnweb.freebsd.org/changeset/base/287794

Log:
  MFC r287319:
  
  Constify opt_f and opt_t and eliminate unneeded copying.  This fixes
  memory leaks.
  
  Reported by:  clang static analyzer

Modified:
  stable/10/usr.bin/iconv/iconv.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/iconv/iconv.c
==
--- stable/10/usr.bin/iconv/iconv.c Mon Sep 14 18:44:13 2015
(r287793)
+++ stable/10/usr.bin/iconv/iconv.c Mon Sep 14 18:52:41 2015
(r287794)
@@ -156,11 +156,11 @@ int
 main(int argc, char **argv)
 {
FILE *fp;
-   char *opt_f, *opt_t;
+   const char *opt_f, *opt_t;
int ch, i, res;
bool opt_c = false, opt_s = false;
 
-   opt_f = opt_t = strdup("");
+   opt_f = opt_t = "";
 
setlocale(LC_ALL, "");
setprogname(argv[0]);
@@ -186,12 +186,12 @@ main(int argc, char **argv)
case 'f':
/* from */
if (optarg != NULL)
-   opt_f = strdup(optarg);
+   opt_f = optarg;
break;
case 't':
/* to */
if (optarg != NULL)
-   opt_t = strdup(optarg);
+   opt_t = optarg;
break;
default:
usage();
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r287795 - stable/10/usr.bin/tftp

2015-09-14 Thread Xin LI
Author: delphij
Date: Mon Sep 14 18:57:50 2015
New Revision: 287795
URL: https://svnweb.freebsd.org/changeset/base/287795

Log:
  MFC r287320:
   - uri is expected to be nul-terminated (strchr used later),
 so use strlcpy instead of strncpy.
   - replace the other two cases of strncpy+\0 with strlcpy.

Modified:
  stable/10/usr.bin/tftp/main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/tftp/main.c
==
--- stable/10/usr.bin/tftp/main.c   Mon Sep 14 18:52:41 2015
(r287794)
+++ stable/10/usr.bin/tftp/main.c   Mon Sep 14 18:57:50 2015
(r287795)
@@ -223,7 +223,7 @@ urihandling(char *URI)
charline[MAXLINE];
int i;
 
-   strncpy(uri, URI, ARG_MAX);
+   strlcpy(uri, URI, ARG_MAX);
host = uri + 7;
 
if ((s = strchr(host, '/')) == NULL) {
@@ -320,11 +320,10 @@ setpeer0(char *host, const char *lport)
/* res->ai_addr <= sizeof(peeraddr) is guaranteed */
memcpy(_sock, res->ai_addr, res->ai_addrlen);
if (res->ai_canonname) {
-   (void) strncpy(hostname, res->ai_canonname,
+   (void) strlcpy(hostname, res->ai_canonname,
sizeof(hostname));
} else
-   (void) strncpy(hostname, host, sizeof(hostname));
-   hostname[sizeof(hostname)-1] = 0;
+   (void) strlcpy(hostname, host, sizeof(hostname));
connected = 1;
}
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r288346 - stable/10/cddl/contrib/opensolaris/cmd/zfs

2015-09-28 Thread Xin LI
Author: delphij
Date: Mon Sep 28 18:58:27 2015
New Revision: 288346
URL: https://svnweb.freebsd.org/changeset/base/288346

Log:
  MFC r287770: MFV r277429:
  
  Document -S option when zfs inherit fails on quota and
  in manual pages.
  
  Illumos ZFS issues:
  
  5410 Document -S option to zfs inherit
  https://illumos.org/issues/5410
  
  5412 Mention -S option when zfs inherit fails on quota
  https://illumos.org/issues/5412
  
  illumos/illumos-gate@5ff8cfa92ec8ea0f8593ad21aa2a04829b0ef5ea

Modified:
  stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8
  stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==
--- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8Mon Sep 28 18:39:21 
2015(r288345)
+++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8Mon Sep 28 18:58:27 
2015(r288346)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 30, 2015
+.Dd September 14, 2015
 .Dt ZFS 8
 .Os
 .Sh NAME
@@ -2126,7 +2126,8 @@ Property name
 .It value
 Property value
 .It source
-Property source. Can either be local, default, temporary, inherited, or none
+Property source. Can either be local, default, temporary, inherited, received,
+or none
 (\&-).
 .El
 .Pp
@@ -2192,8 +2193,11 @@ The default value is all sources.
 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
 .Xc
 .Pp
-Clears the specified property, causing it to be inherited from an ancestor. If
-no ancestor has the property set, then the default value is used. See the
+Clears the specified property, causing it to be inherited from an ancestor,
+restored to default if no ancestor has the property set, or with the
+.Fl S
+option reverted to the received value if one exists.
+See the
 .Qq Sx Properties
 section for a listing of default values, and details on which properties can be
 inherited.
@@ -2201,8 +2205,10 @@ inherited.
 .It Fl r
 Recursively inherit the given property for all children.
 .It Fl S
-For properties with a received value, revert to this value. This flag has no
-effect on properties that do not have a received value.
+Revert the property to the received value if one exists; otherwise operate as
+if the
+.Fl S
+option was not specified.
 .El
 .It Xo
 .Nm

Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==
--- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c   Mon Sep 28 
18:39:21 2015(r288345)
+++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c   Mon Sep 28 
18:58:27 2015(r288346)
@@ -1927,9 +1927,13 @@ zfs_do_inherit(int argc, char **argv)
if (prop == ZFS_PROP_QUOTA ||
prop == ZFS_PROP_RESERVATION ||
prop == ZFS_PROP_REFQUOTA ||
-   prop == ZFS_PROP_REFRESERVATION)
+   prop == ZFS_PROP_REFRESERVATION) {
(void) fprintf(stderr, gettext("use 'zfs set "
"%s=none' to clear\n"), propname);
+   (void) fprintf(stderr, gettext("use 'zfs "
+   "inherit -S %s' to revert to received "
+   "value\n"), propname);
+   }
return (1);
}
if (received && (prop == ZFS_PROP_VOLSIZE ||
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r288434 - stable/10/usr.sbin/bhyve

2015-09-30 Thread Xin LI
Author: delphij
Date: Thu Oct  1 00:44:45 2015
New Revision: 288434
URL: https://svnweb.freebsd.org/changeset/base/288434

Log:
  MFC r287927:
  
  Use strlcpy() instead of strncpy() because subsequent mkstemps expects
  the string be nul-terminated.
  
  Reviewed by:  neel

Modified:
  stable/10/usr.sbin/bhyve/acpi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bhyve/acpi.c
==
--- stable/10/usr.sbin/bhyve/acpi.c Thu Oct  1 00:34:38 2015
(r288433)
+++ stable/10/usr.sbin/bhyve/acpi.c Thu Oct  1 00:44:45 2015
(r288434)
@@ -790,10 +790,10 @@ basl_open(struct basl_fio *bf, int suffi
err = 0;
 
if (suffix) {
-   strncpy(bf->f_name, basl_stemplate, MAXPATHLEN);
+   strlcpy(bf->f_name, basl_stemplate, MAXPATHLEN);
bf->fd = mkstemps(bf->f_name, strlen(BHYVE_ASL_SUFFIX));
} else {
-   strncpy(bf->f_name, basl_template, MAXPATHLEN);
+   strlcpy(bf->f_name, basl_template, MAXPATHLEN);
bf->fd = mkstemp(bf->f_name);
}
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r288511 - in stable: 10/usr.sbin/rpcbind 9/usr.sbin/rpcbind

2015-10-02 Thread Xin LI
Author: delphij
Date: Fri Oct  2 16:36:16 2015
New Revision: 288511
URL: https://svnweb.freebsd.org/changeset/base/288511

Log:
  Fix a regression with SA-15:24 patch that prevented NIS from
  working.

Modified:
  stable/10/usr.sbin/rpcbind/rpcb_svc_com.c

Changes in other areas also in this revision:
Modified:
  stable/9/usr.sbin/rpcbind/rpcb_svc_com.c

Modified: stable/10/usr.sbin/rpcbind/rpcb_svc_com.c
==
--- stable/10/usr.sbin/rpcbind/rpcb_svc_com.c   Fri Oct  2 16:35:41 2015
(r288510)
+++ stable/10/usr.sbin/rpcbind/rpcb_svc_com.c   Fri Oct  2 16:36:16 2015
(r288511)
@@ -1053,12 +1053,15 @@ static bool_t
 netbuf_copybuf(struct netbuf *dst, const struct netbuf *src)
 {
 
-   assert(dst->buf == NULL);
+   if (dst->len != src->len || dst->buf == NULL) {
+   if (dst->buf != NULL)
+   free(dst->buf);
+   if ((dst->buf = malloc(src->len)) == NULL)
+   return (FALSE);
 
-   if ((dst->buf = malloc(src->len)) == NULL)
-   return (FALSE);
+   dst->maxlen = dst->len = src->len;
+   }
 
-   dst->maxlen = dst->len = src->len;
memcpy(dst->buf, src->buf, src->len);
return (TRUE);
 }
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r288384 - in stable: 10/usr.sbin/rpcbind 9/usr.sbin/rpcbind

2015-09-29 Thread Xin LI
Author: delphij
Date: Tue Sep 29 18:06:27 2015
New Revision: 288384
URL: https://svnweb.freebsd.org/changeset/base/288384

Log:
  The Sun RPC framework uses a netbuf structure to represent the
  transport specific form of a universal transport address.  The
  structure is expected to be opaque to consumers.  In the current
  implementation, the structure contains a pointer to a buffer
  that holds the actual address.
  
  In rpcbind(8), netbuf structures are copied directly, which would
  result in two netbuf structures that reference to one shared
  address buffer.  When one of the two netbuf structures is freed,
  access to the other netbuf structure would result in an undefined
  result that may crash the rpcbind(8) daemon.
  
  Fix this by making a copy of the buffer that is going to be freed
  instead of doing a shallow copy.
  
  Security: FreeBSD-SA-15:24.rpcbind
  Security: CVE-2015-7236

Modified:
  stable/10/usr.sbin/rpcbind/rpcb_svc_com.c

Changes in other areas also in this revision:
Modified:
  stable/9/usr.sbin/rpcbind/rpcb_svc_com.c

Modified: stable/10/usr.sbin/rpcbind/rpcb_svc_com.c
==
--- stable/10/usr.sbin/rpcbind/rpcb_svc_com.c   Tue Sep 29 18:05:54 2015
(r288383)
+++ stable/10/usr.sbin/rpcbind/rpcb_svc_com.c   Tue Sep 29 18:06:27 2015
(r288384)
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1048,19 +1049,31 @@ netbufcmp(struct netbuf *n1, struct netb
return ((n1->len != n2->len) || memcmp(n1->buf, n2->buf, n1->len));
 }
 
+static bool_t
+netbuf_copybuf(struct netbuf *dst, const struct netbuf *src)
+{
+
+   assert(dst->buf == NULL);
+
+   if ((dst->buf = malloc(src->len)) == NULL)
+   return (FALSE);
+
+   dst->maxlen = dst->len = src->len;
+   memcpy(dst->buf, src->buf, src->len);
+   return (TRUE);
+}
+
 static struct netbuf *
 netbufdup(struct netbuf *ap)
 {
struct netbuf  *np;
 
-   if ((np = malloc(sizeof(struct netbuf))) == NULL)
+   if ((np = calloc(1, sizeof(struct netbuf))) == NULL)
return (NULL);
-   if ((np->buf = malloc(ap->len)) == NULL) {
+   if (netbuf_copybuf(np, ap) == FALSE) {
free(np);
return (NULL);
}
-   np->maxlen = np->len = ap->len;
-   memcpy(np->buf, ap->buf, ap->len);
return (np);
 }
 
@@ -1068,6 +1081,7 @@ static void
 netbuffree(struct netbuf *ap)
 {
free(ap->buf);
+   ap->buf = NULL;
free(ap);
 }
 
@@ -1185,7 +1199,7 @@ xprt_set_caller(SVCXPRT *xprt, struct fi
 {
u_int32_t *xidp;
 
-   *(svc_getrpccaller(xprt)) = *(fi->caller_addr);
+   netbuf_copybuf(svc_getrpccaller(xprt), fi->caller_addr);
xidp = __rpcb_get_dg_xidp(xprt);
*xidp = fi->caller_xid;
 }
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r288139 - stable/10/usr.bin/w

2015-09-22 Thread Xin LI
Author: delphij
Date: Wed Sep 23 01:07:45 2015
New Revision: 288139
URL: https://svnweb.freebsd.org/changeset/base/288139

Log:
  MFC r287590:
  
  w(1) is not setgid binary since r53279, so remove the setgid() call.
  
  Reviewed By:  wollman

Modified:
  stable/10/usr.bin/w/Makefile
  stable/10/usr.bin/w/w.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/w/Makefile
==
--- stable/10/usr.bin/w/MakefileWed Sep 23 00:32:38 2015
(r288138)
+++ stable/10/usr.bin/w/MakefileWed Sep 23 01:07:45 2015
(r288139)
@@ -6,8 +6,6 @@ SRCS=   fmt.c pr_time.c proc_compare.c w.c
 MAN=   w.1 uptime.1
 DPADD= ${LIBKVM} ${LIBUTIL}
 LDADD= -lkvm -lutil
-#BINGRP= kmem
-#BINMODE=2555
 LINKS= ${BINDIR}/w ${BINDIR}/uptime
 
 .PATH: ${.CURDIR}/../../bin/ps

Modified: stable/10/usr.bin/w/w.c
==
--- stable/10/usr.bin/w/w.c Wed Sep 23 00:32:38 2015(r288138)
+++ stable/10/usr.bin/w/w.c Wed Sep 23 01:07:45 2015(r288139)
@@ -132,7 +132,7 @@ main(int argc, char *argv[])
struct kinfo_proc *dkp;
struct stat *stp;
time_t touched;
-   int ch, i, nentries, nusers, wcmd, longidle, longattime, dropgid;
+   int ch, i, nentries, nusers, wcmd, longidle, longattime;
const char *memf, *nlistf, *p;
char *x_suffix;
char buf[MAXHOSTNAMELEN], errbuf[_POSIX2_LINE_MAX];
@@ -152,7 +152,6 @@ main(int argc, char *argv[])
p = "dhiflM:N:nsuw";
}
 
-   dropgid = 0;
memf = _PATH_DEVNULL;
nlistf = NULL;
while ((ch = getopt(argc, argv, p)) != -1)
@@ -169,11 +168,9 @@ main(int argc, char *argv[])
case 'M':
header = 0;
memf = optarg;
-   dropgid = 1;
break;
case 'N':
nlistf = optarg;
-   dropgid = 1;
break;
case 'n':
nflag = 1;
@@ -193,13 +190,6 @@ main(int argc, char *argv[])
_res.retrans = 2;   /* resolver timeout to 2 seconds per try */
_res.retry = 1; /* only try once.. */
 
-   /*
-* Discard setgid privileges if not the running kernel so that bad
-* guys can't print interesting stuff from kernel memory.
-*/
-   if (dropgid)
-   setgid(getgid());
-
if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf)) == NULL)
errx(1, "%s", errbuf);
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r288163 - stable/10/usr.bin/systat

2015-09-23 Thread Xin LI
Author: delphij
Date: Thu Sep 24 00:50:17 2015
New Revision: 288163
URL: https://svnweb.freebsd.org/changeset/base/288163

Log:
  MFC r287633:
  
   - Avoid accessing window properties directly, instead, use accessors.
 This should be no-op for now, but allows the code to work if we
 move to NCURSES_OPAQUE.
   - Use calloc() instead of malloc+bzero.

Modified:
  stable/10/usr.bin/systat/iostat.c
  stable/10/usr.bin/systat/netstat.c
  stable/10/usr.bin/systat/pigs.c
  stable/10/usr.bin/systat/vmstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/systat/iostat.c
==
--- stable/10/usr.bin/systat/iostat.c   Thu Sep 24 00:22:48 2015
(r288162)
+++ stable/10/usr.bin/systat/iostat.c   Thu Sep 24 00:50:17 2015
(r288163)
@@ -112,10 +112,8 @@ initiostat(void)
if ((num_devices = devstat_getnumdevs(NULL)) < 0)
return(0);
 
-   cur.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo));
-   last.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo));
-   bzero(cur.dinfo, sizeof(struct devinfo));
-   bzero(last.dinfo, sizeof(struct devinfo));
+   cur.dinfo = calloc(1, sizeof(struct devinfo));
+   last.dinfo = calloc(1, sizeof(struct devinfo));
 
/*
 * This value for maxshowdevs (100) is bogus.  I'm not sure exactly
@@ -196,7 +194,7 @@ numlabels(int row)
char tmpstr[10];
 
 #define COLWIDTH   17
-#define DRIVESPERLINE  ((wnd->_maxx - INSET) / COLWIDTH)
+#define DRIVESPERLINE  ((getmaxx(wnd) - 1 - INSET) / COLWIDTH)
for (ndrives = 0, i = 0; i < num_devices; i++)
if (dev_select[i].selected)
ndrives++;
@@ -204,7 +202,7 @@ numlabels(int row)
/*
 * Deduct -regions for blank line after each scrolling region.
 */
-   linesperregion = (wnd->_maxy - row - regions) / regions;
+   linesperregion = (getmaxy(wnd) - 1 - row - regions) / regions;
/*
 * Minimum region contains space for two
 * label lines and one line of statistics.
@@ -214,9 +212,9 @@ numlabels(int row)
_col = INSET;
for (i = 0; i < num_devices; i++)
if (dev_select[i].selected) {
-   if (_col + COLWIDTH >= wnd->_maxx - INSET) {
+   if (_col + COLWIDTH >= getmaxx(wnd) - 1 - INSET) {
_col = INSET, row += linesperregion + 1;
-   if (row > wnd->_maxy - (linesperregion + 1))
+   if (row > getmaxy(wnd) - 1 - (linesperregion + 
1))
break;
}
sprintf(tmpstr, "%s%d", dev_select[i].device_name,
@@ -241,7 +239,7 @@ barlabels(int row)
linesperregion = 2 + kbpt;
for (i = 0; i < num_devices; i++)
if (dev_select[i].selected) {
-   if (row > wnd->_maxy - linesperregion)
+   if (row > getmaxy(wnd) - 1 - linesperregion)
break;
sprintf(tmpstr, "%s%d", dev_select[i].device_name,
dev_select[i].unit_number);
@@ -276,7 +274,7 @@ showiostat(void)
row += 2;
for (i = 0; i < num_devices; i++)
if (dev_select[i].selected) {
-   if (row > wnd->_maxy - linesperregion)
+   if (row > getmaxy(wnd) - linesperregion)
break;
row = devstats(row, INSET, i);
}
@@ -289,9 +287,9 @@ showiostat(void)
winsertln(wnd);
for (i = 0; i < num_devices; i++)
if (dev_select[i].selected) {
-   if (_col + COLWIDTH >= wnd->_maxx - INSET) {
+   if (_col + COLWIDTH >= getmaxx(wnd) - 1 - INSET) {
_col = INSET, row += linesperregion + 1;
-   if (row > wnd->_maxy - (linesperregion + 1))
+   if (row > getmaxy(wnd) - 1 - (linesperregion + 
1))
break;
wmove(wnd, row + linesperregion, 0);
wdeleteln(wnd);

Modified: stable/10/usr.bin/systat/netstat.c
==
--- stable/10/usr.bin/systat/netstat.c  Thu Sep 24 00:22:48 2015
(r288162)
+++ stable/10/usr.bin/systat/netstat.c  Thu Sep 24 00:50:17 2015
(r288163)
@@ -85,7 +85,7 @@ static char *inetname(struct sockaddr *)
 static void inetprint(struct sockaddr *, const char *);
 
 #definestreq(a,b)  (strcmp(a,b)==0)
-#defineYMAX(w) ((w)->_maxy-1)
+#defineYMAX(w) (getmaxy(w)-2)
 
 WINDOW *
 

svn commit: r288164 - stable/10/usr.bin/login

2015-09-23 Thread Xin LI
Author: delphij
Date: Thu Sep 24 00:54:46 2015
New Revision: 288164
URL: https://svnweb.freebsd.org/changeset/base/288164

Log:
  MFC r287634:
  
  login.c doesn't really need libutil.h, don't include it.
  
  login_fbtab.c includes paths.h and pathnames.h, and pathnames.h includes
  paths.h.  Eliminate the paths.h inclusion in login_fbtab.c.

Modified:
  stable/10/usr.bin/login/login.c
  stable/10/usr.bin/login/login_fbtab.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/login/login.c
==
--- stable/10/usr.bin/login/login.c Thu Sep 24 00:50:17 2015
(r288163)
+++ stable/10/usr.bin/login/login.c Thu Sep 24 00:54:46 2015
(r288164)
@@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/10/usr.bin/login/login_fbtab.c
==
--- stable/10/usr.bin/login/login_fbtab.c   Thu Sep 24 00:50:17 2015
(r288163)
+++ stable/10/usr.bin/login/login_fbtab.c   Thu Sep 24 00:54:46 2015
(r288164)
@@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -120,7 +119,7 @@ login_fbtab(char *tty, uid_t uid, gid_t 
 
 /* login_protect - protect one device entry */
 
-void
+static void
 login_protect(const char *table, char *pattern, int mask, uid_t uid, gid_t gid)
 {
 glob_t  gl;
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r288205 - stable/10/usr.sbin/gstat

2015-09-24 Thread Xin LI
Author: delphij
Date: Fri Sep 25 01:17:24 2015
New Revision: 288205
URL: https://svnweb.freebsd.org/changeset/base/288205

Log:
  MFC r287650:
  
  Use strlcpy() in favor of strncpy() as it's defined to have a nul character
  at the end of string buffer, and the code context do expects this to behave
  correctly (e.g. strchr).

Modified:
  stable/10/usr.sbin/gstat/gstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/gstat/gstat.c
==
--- stable/10/usr.sbin/gstat/gstat.cFri Sep 25 01:05:44 2015
(r288204)
+++ stable/10/usr.sbin/gstat/gstat.cFri Sep 25 01:17:24 2015
(r288205)
@@ -124,7 +124,7 @@ main(int argc, char **argv)
if (regcomp(_re, optarg, REG_EXTENDED) != 0)
errx(EX_USAGE,
"Invalid filter - see re_format(7)");
-   strncpy(f_s, optarg, sizeof(f_s));
+   strlcpy(f_s, optarg, sizeof(f_s));
break;
case 'o':
flag_o = 1;
@@ -216,7 +216,7 @@ main(int argc, char **argv)
getyx(stdscr, cury, curx);
getmaxyx(stdscr, maxy, maxx);
}
-   strncpy(pf_s, f_s, sizeof(pf_s));
+   strlcpy(pf_s, f_s, sizeof(pf_s));
max_flen = maxx - curx - 1;
if ((int)strlen(f_s) > max_flen && max_flen >= 0) {
if (max_flen > 3)
@@ -406,7 +406,7 @@ main(int argc, char **argv)
err(1, "el_gets");
if (line_len > 1)
history(hist, _ev, H_ENTER, line);
-   strncpy(tmp_f_s, line, sizeof(f_s));
+   strlcpy(tmp_f_s, line, sizeof(f_s));
if ((p = strchr(tmp_f_s, '\n')) != NULL)
*p = '\0';
/*
@@ -423,7 +423,7 @@ main(int argc, char **argv)
refresh();
sleep(1);
} else {
-   strncpy(f_s, tmp_f_s, sizeof(f_s));
+   strlcpy(f_s, tmp_f_s, sizeof(f_s));
f_re = tmp_f_re;
}
break;
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r281512 - stable/10/sbin/md5

2015-04-13 Thread Xin LI
Author: delphij
Date: Tue Apr 14 00:27:54 2015
New Revision: 281512
URL: https://svnweb.freebsd.org/changeset/base/281512

Log:
  MFC r266417 (bjk):
  
  Assorted updates to md5.1
  
  Note that the -c argument's parameter is compared against the digest of
  the file, not the file. [1]
  
  Update the current time parentheticals for notes about reversing
  and colliding the hash functions. [1]
  
  Some general mdoc updates.
  
  PR:   docs/188043 [1]
  Submitted by: Jamie Landeg-Jones [1]

Modified:
  stable/10/sbin/md5/md5.1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/md5/md5.1
==
--- stable/10/sbin/md5/md5.1Tue Apr 14 00:02:39 2015(r281511)
+++ stable/10/sbin/md5/md5.1Tue Apr 14 00:27:54 2015(r281512)
@@ -1,5 +1,5 @@
 .\ $FreeBSD$
-.Dd July 31, 2012
+.Dd May 17, 2014
 .Dt MD5 1
 .Os
 .Sh NAME
@@ -63,12 +63,12 @@ concerned, and should not be relied upon
 This also means that
 .Tn MD5
 should not be used as part of a cryptographic signature scheme.
-At the current time (2009-01-06) there is no publicly known method to
+At the current time (2014-05-17) there is no publicly known method to
 .Dq reverse
 MD5, i.e., to find an input given a hash value.
 .Pp
 .Tn SHA-1
-currently (2009-01-06) has no known collisions, but an attack has been
+currently (2014-05-17) has no known collisions, but an attack has been
 found which is faster than a brute-force search, placing the security of
 .Tn SHA-1
 in doubt.
@@ -83,15 +83,15 @@ The hexadecimal checksum of each file li
 after the options are processed.
 .Bl -tag -width indent
 .It Fl c Ar string
-Compare files to this md5 string.
-(Note that this option is not yet useful if multiple files are specified.)
+Compare the digest of the file against this string.
+.Pq Note that this option is not yet useful if multiple files are specified.
 .It Fl s Ar string
 Print a checksum of the given
 .Ar string .
 .It Fl p
 Echo stdin to stdout and append the checksum to stdout.
 .It Fl q
-Quiet mode - only the checksum is printed out.
+Quiet mode \(em only the checksum is printed out.
 Overrides the
 .Fl r
 option.
@@ -114,7 +114,9 @@ and
 .Nm rmd160
 utilities exit 0 on success,
 1 if at least one of the input files could not be read,
-and 2 if at least one file does not have the same hash as the -c option.
+and 2 if at least one file does not have the same hash as the
+.Fl c
+option.
 .Sh SEE ALSO
 .Xr cksum 1 ,
 .Xr md5 3 ,
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r281957 - stable/10/sys/dev/hptnr

2015-04-24 Thread Xin LI
Author: delphij
Date: Sat Apr 25 00:32:47 2015
New Revision: 281957
URL: https://svnweb.freebsd.org/changeset/base/281957

Log:
  MFC r281387:
  
  Merge changes from vendor driver version 1.1.1:
  
  v1.1.1 2015-03-26
   * Support 4Kn drive.
   * Change the SCSI target ID of the disk to be the index of physical
 connetion to the HBA.
   * Support staggered drive spin up.
   * Fix a bug that command would be timeout because of improper
 interrupt service routine.
   * Error handling to avoid scsi command lost which caused system
 hang up.
   * Fix a bug that fail to get the devcie's serial number via
 FreeNAS WebGUI.
  
  Many thanks to HighPoint for continued support of FreeBSD!
  
  Relnotes: yes

Modified:
  stable/10/sys/dev/hptnr/README
  stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu
  stable/10/sys/dev/hptnr/him.h
  stable/10/sys/dev/hptnr/hptintf.h
  stable/10/sys/dev/hptnr/hptnr_config.c
  stable/10/sys/dev/hptnr/hptnr_config.h
  stable/10/sys/dev/hptnr/hptnr_osm_bsd.c
  stable/10/sys/dev/hptnr/i386-elf.hptnr_lib.o.uu
  stable/10/sys/dev/hptnr/ldm.h
  stable/10/sys/dev/hptnr/os_bsd.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hptnr/README
==
--- stable/10/sys/dev/hptnr/README  Fri Apr 24 23:27:50 2015
(r281956)
+++ stable/10/sys/dev/hptnr/README  Sat Apr 25 00:32:47 2015
(r281957)
@@ -1,8 +1,16 @@
 Rocket Controller Driver for FreeBSD
-Copyright (C) 2014 HighPoint Technologies, Inc. All rights reserved.
+Copyright (C) 2015 HighPoint Technologies, Inc. All rights reserved.
 
 #
 Revision History:
+   v1.1.1 2015-03-26
+ * Support 4Kn drive.
+ * Change the SCSI target ID of the disk to be the index of physical 
connetion to the HBA.
+ * Support staggered drive spin up.
+ * Fix a bug that command would be timeout because of improper interrupt 
service routine.
+ * Error handling to avoid scsi command lost which caused system hang up.
+ * Fix a bug that fail to get the devcie's serial number via FreeNAS 
WebGUI.
+
v1.0.1 2014-8-19
  * Do not retry the command and reset the disk when failed to enable or 
disable spin up feature.
@@ -13,7 +21,7 @@ Revision History:
  * Support smartmontool for R750.
 
v1.0 2013-7-3
- *First source code release
+First source code release
 
 #
 
@@ -49,7 +57,7 @@ Revision History:
   2) Extract the driver files under the kernel source tree:
 
  # cd /usr/src/sys/
- # tar xvzf /your/path/to/hptnr_freebsd_src_v1.0.1_14_08_19.tgz
+ # tar xvzf /your/path/to/hptnr-freebsd-src-v1.0-130701.tgz
 
   3) Update the kernel configuration file to include the HighPoint source.
  Assume the configure file is GENERIC, and new kernel configure file is 

Modified: stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu
==
--- stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uuFri Apr 24 23:27:50 
2015(r281956)
+++ stable/10/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uuSat Apr 25 00:32:47 
2015(r281957)
@@ -1,6297 +1,4969 @@
 begin 644 hptnr_lib.o
-M?T5,1@(!`0D```$`/@`!`+`#!@``
-M`$```$``$``-`(G0Q@(QD!$D$]G0@$\!.L$@^X3`
-M=`:`9PS?ZP2`3PP@N!0```##9F9FD//#9F9FD9F9I!F9I!F9I!!5T%6055!
-M5%532(/L$F)_4F)]DB)U8A,)`=%B=(BT8P2(E$)!!(QT8P`$B%P`^%
-M=`$``.@`28G$N`!-A0/A!$``!,B_H`$B)1002(7`=15,
-MB9,B_H`+@`ZH!``!!QD0D.!I!QD0D.0A!QD0D.@A!QD0D.P!!
-MQD0D//]!QD0D/0!!QD0D):M!#[=.9!B40D($V);0H0=$)#3_0$
-M))0(2(M$)!!(BT`028E$)$A(!?\```!)B40D4$'10P)$B+100
-M28E$)'A)QX0DH`!!QD0D)(!)C5PD6+X`2(G?Z`!(BT0D
-M$$B+!BZ_P```$B)W^@`3(GF3(GOZ`[R/___^L@9F9FD9FD+_H
-M`P``Z`#ZP%,B_H`(3;=`Y!#[9$)0\@'3=A,!T,4B-=003(GO
-MZ`!!#[=T)#))BWY0Z`!,B9,B_H`+@`Z```!)QT0D
-M`!,B9,B_H`$B+1002(M8$$$/MM/MG0D!TB-P3H`$)
-MQ,8#`,9#`0#0P(`QD,#`$B)[DR)[^@`2(U5.+@`9F:0Q@00`$B#
-MP`%(@_@0=?)!C40D!,9%.!713D1B$4\QD4]`$B-75A$#[;@1(EE-,%E```
-M``!(BU0D$$B+0A!(B45(2(E5+X`2(G?Z`!(BT0D$$B+!A$
-MB)(B=_H`+@!2(/$%M=05Q!74%05_#D))\:)=PC1PX`9L='
-M#```9H7V=!^-4/^Y`9FD$B+!V:)%`A(@\$@^H!9H/Z_W7L\\-F9F:0
-M9F:09F:008GP9HEW,9'#@%FQT,``!FA?9T'KH`N0!(BP=FB10(
-M@\(!2(/!`F9$.)U[//#9F9FD9FD9FD(!_#@%U*@^W1PP/M\A(BQ/MQ1*
-M@\`!9HE'#8[1PIR!F;'1PP``:#;P@!#[?PTB+%P^W1PB#Z`%FB4(#[?`
-M#[$0L-F9F:09F:09F:0@'\.`74J#[=7`^W1PP!P@^W1PJ)P8G0P?H?]_E(
-M8])(BP=FB3109H-'`'#9F:0#[='`^WR$B+%V:)-$J#P`%FB4(PV9F9I!F
-M9I!F9I!F@W\(``^4P`^VP,.0D)02(L/2#G/=0BY`.L/D$B+$4B+00A(
-MB4((2(D02(G(PV9F9I!F9F:09F:09F:008G0A-)T.@^V!SH=2A(B?^
-M`.L4#[97`0^V00%(@\!2(/!`3C=0J#Q@%$.,9UY.L+N`!F9I!FD,.X

svn commit: r282052 - stable/10/usr.bin/gzip

2015-04-26 Thread Xin LI
Author: delphij
Date: Mon Apr 27 05:49:18 2015
New Revision: 282052
URL: https://svnweb.freebsd.org/changeset/base/282052

Log:
  MFC r281500,281540,281626:
  
  Sync with NetBSD:
   - Mention xz(1) in gzip(1).
   - Strip away path from header name when decompressing.

Modified:
  stable/10/usr.bin/gzip/gzip.1
  stable/10/usr.bin/gzip/gzip.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/gzip/gzip.1
==
--- stable/10/usr.bin/gzip/gzip.1   Mon Apr 27 05:44:09 2015
(r282051)
+++ stable/10/usr.bin/gzip/gzip.1   Mon Apr 27 05:49:18 2015
(r282052)
@@ -1,4 +1,4 @@
-.\$NetBSD: gzip.1,v 1.23 2014/03/18 18:20:45 riastradh Exp $
+.\$NetBSD: gzip.1,v 1.25 2015/04/06 21:41:17 wiz Exp $
 .\
 .\ Copyright (c) 1997, 2003, 2004 Matthew R. Green
 .\ All rights reserved.
@@ -25,7 +25,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ $FreeBSD$
-.Dd October 9, 2011
+.Dd April 6, 2015
 .Dt GZIP 1
 .Os
 .Sh NAME
@@ -105,9 +105,10 @@ options are enabled.
 This version of
 .Nm
 is also capable of decompressing files compressed using
-.Xr compress 1
+.Xr compress 1 ,
+.Xr bzip2 1 ,
 or
-.Xr bzip2 1 .
+.Xr xz 1 .
 .Sh OPTIONS
 The following options are available:
 .Bl -tag -width XXrXXXrecursiveX

Modified: stable/10/usr.bin/gzip/gzip.c
==
--- stable/10/usr.bin/gzip/gzip.c   Mon Apr 27 05:44:09 2015
(r282051)
+++ stable/10/usr.bin/gzip/gzip.c   Mon Apr 27 05:49:18 2015
(r282052)
@@ -1,4 +1,4 @@
-/* $NetBSD: gzip.c,v 1.106 2014/10/18 08:33:30 snj Exp $   */
+/* $NetBSD: gzip.c,v 1.108 2015/04/15 02:29:12 christos Exp $  */
 
 /*-
  * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
@@ -158,7 +158,7 @@ static suffixes_t suffixes[] = {
 #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0])
 #define SUFFIX_MAXLEN  30
 
-static const char  gzip_version[] = FreeBSD gzip 20141022;
+static const char  gzip_version[] = FreeBSD gzip 20150413;
 
 #ifndef SMALL
 static const char  gzip_copyright[] = \
@@ -1354,7 +1354,7 @@ file_uncompress(char *file, char *outfil
 #ifndef SMALL
ssize_t rv;
time_t timestamp = 0;
-   unsigned char name[PATH_MAX + 1];
+   char name[PATH_MAX + 1];
 #endif
 
/* gather the old name info */
@@ -1409,21 +1409,33 @@ file_uncompress(char *file, char *outfil
timestamp = ts[3]  24 | ts[2]  16 | ts[1]  8 | ts[0];
 
if (header1[3]  ORIG_NAME) {
-   rbytes = pread(fd, name, sizeof name, GZIP_ORIGNAME);
+   rbytes = pread(fd, name, sizeof(name) - 1, 
GZIP_ORIGNAME);
if (rbytes  0) {
maybe_warn(can't read %s, file);
goto lose;
}
-   if (name[0] != 0) {
+   if (name[0] != '\0') {
+   char *dp, *nf;
+
+   /* Make sure that name is NUL-terminated */
+   name[rbytes] = '\0';
+
+   /* strip saved directory name */
+   nf = strrchr(name, '/');
+   if (nf == NULL)
+   nf = name;
+   else
+   nf++;
+
/* preserve original directory name */
-   char *dp = strrchr(file, '/');
+   dp = strrchr(file, '/');
if (dp == NULL)
dp = file;
else
dp++;
snprintf(outfile, outsize, %.*s%.*s,
(int) (dp - file), 
-   file, (int) rbytes, name);
+   file, (int) rbytes, nf);
}
}
}
@@ -2110,7 +2122,7 @@ static void
 display_license(void)
 {
 
-   fprintf(stderr, %s (based on NetBSD gzip 20141018)\n, gzip_version);
+   fprintf(stderr, %s (based on NetBSD gzip 20150113)\n, gzip_version);
fprintf(stderr, %s\n, gzip_copyright);
exit(0);
 }
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r282670 - stable/10/sys/cam/scsi

2015-05-08 Thread Xin LI
Author: delphij
Date: Fri May  8 22:22:51 2015
New Revision: 282670
URL: https://svnweb.freebsd.org/changeset/base/282670

Log:
  MFC r281840:
  
  Extend DA_Q_NO_RC16 to MXUB3* devices.
  
  PR:   kern/198647

Modified:
  stable/10/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/scsi/scsi_da.c
==
--- stable/10/sys/cam/scsi/scsi_da.cFri May  8 22:11:54 2015
(r282669)
+++ stable/10/sys/cam/scsi/scsi_da.cFri May  8 22:22:51 2015
(r282670)
@@ -1179,7 +1179,7 @@ static struct da_quirk_entry da_quirk_ta
/*
 * MX-ES USB Drive by Mach Xtreme
 */
-   { T_DIRECT, SIP_MEDIA_REMOVABLE, MX, MXUB3SES*, *},
+   { T_DIRECT, SIP_MEDIA_REMOVABLE, MX, MXUB3*, *},
/*quirks*/DA_Q_NO_RC16
},
 };
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r282870 - stable/10/usr.sbin/freebsd-update

2015-05-13 Thread Xin LI
Author: delphij
Date: Wed May 13 22:36:00 2015
New Revision: 282870
URL: https://svnweb.freebsd.org/changeset/base/282870

Log:
  MFC r279571,281563 (allanjude):
  
  Add a new safetly belt to freebsd-update to prevent a user doing a minor
  update (-pX) while having an unfinished major upgrade (9.x to 9.y)
  Safetly belt can be disabled with the -F flag
  
  Additionally, add the --not-running-from-cron flag they bypasses the TTY
  requirement, and allows freebsd-update to be invoked by orchestration
  frameworks, scripts, or otherwise.
  
  PR:   196760
  Relnotes: yes
  Sponsored by: ScaleEngine Inc.

Modified:
  stable/10/usr.sbin/freebsd-update/freebsd-update.8
  stable/10/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.8
==
--- stable/10/usr.sbin/freebsd-update/freebsd-update.8  Wed May 13 21:38:39 
2015(r282869)
+++ stable/10/usr.sbin/freebsd-update/freebsd-update.8  Wed May 13 22:36:00 
2015(r282870)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd July 14, 2010
+.Dd March 2, 2015
 .Dt FREEBSD-UPDATE 8
 .Os FreeBSD
 .Sh NAME
@@ -36,10 +36,12 @@
 .Op Fl b Ar basedir
 .Op Fl d Ar workdir
 .Op Fl f Ar conffile
+.Op Fl F
 .Op Fl k Ar KEY
 .Op Fl r Ar newrelease
 .Op Fl s Ar server
 .Op Fl t Ar address
+.Op Fl -not-running-from-cron
 .Cm command ...
 .Sh DESCRIPTION
 The
@@ -54,16 +56,16 @@ by the
 .Fx
 Release Engineering Team, e.g.,
 .Fx
-7.3-RELEASE and
+9.3-RELEASE and
 .Fx
-8.0-RELEASE, but not
+10.1-RELEASE, but not
 .Fx
-6.3-STABLE or
+9.3-STABLE or
 .Fx
-9.0-CURRENT.
+11-CURRENT.
 .Sh OPTIONS
 The following options are supported:
-.Bl -tag -width -f conffile
+.Bl -tag -width -r newrelease
 .It Fl b Ar basedir
 Operate on a system mounted at
 .Ar basedir .
@@ -81,6 +83,10 @@ Read configuration options from
 .Ar conffile .
 (default:
 .Pa /etc/freebsd-update.conf )
+.It Fl F
+Force
+.Nm Cm fetch
+to proceed where it normally would not, such as an unfinished upgrade
 .It Fl k Ar KEY
 Trust an RSA key with SHA256 of
 .Ar KEY .
@@ -98,12 +104,21 @@ Mail output of
 command, if any, to
 .Ar address .
 (default: root, or as given in the configuration file.)
+.It Fl -not-running-from-cron
+Force
+.Nm Cm fetch
+to proceed when there is no controlling tty.
+This is for use by automated scripts and orchestration tools.
+Please do not run
+.Nm Cm fetch
+from crontab or similar using this flag, see:
+.Nm Cm cron
 .El
 .Sh COMMANDS
 The
 .Cm command
 can be any one of the following:
-.Bl -tag -width -f conffile
+.Bl -tag -width rollback
 .It Cm fetch
 Based on the currently installed world and the configuration
 options set, fetch all available binary updates.

Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh
==
--- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 21:38:39 
2015(r282869)
+++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:36:00 
2015(r282870)
@@ -43,12 +43,15 @@ Options:
   (default: /var/db/freebsd-update/)
   -f conffile  -- Read configuration options from conffile
   (default: /etc/freebsd-update.conf)
+  -F   -- Force a fetch operation to proceed
   -k KEY   -- Trust an RSA key with SHA256 hash of KEY
   -r release   -- Target for upgrade (e.g., 6.2-RELEASE)
   -s server-- Server from which to fetch updates
   (default: update.FreeBSD.org)
   -t address   -- Mail output of cron command, if any, to address
   (default: root)
+  --not-running-from-cron
+   -- Run without a tty, for use by automated tools
 Commands:
   fetch-- Fetch updates from server
   cron -- Sleep rand(3600) seconds, fetch updates, and send an
@@ -399,6 +402,12 @@ init_params () {
 
# No commands specified yet
COMMANDS=
+
+   # Force fetch to proceed
+   FORCEFETCH=0
+
+   # Run without a TTY
+   NOTTYOK=0
 }
 
 # Parse the command line
@@ -411,6 +420,12 @@ parse_cmdline () {
if [ ! -z ${CONFFILE} ]; then usage; fi
shift; CONFFILE=$1
;;
+   -F)
+   FORCEFETCH=1
+   ;;
+   --not-running-from-cron)
+   NOTTYOK=1
+   ;;
 
# Configuration file equivalents
-b)
@@ -665,6 +680,14 @@ fetch_check_params () {
echo (Did you mean 'upgrade' instead?)
exit 1
fi
+
+   # Check that we have updates ready to install
+   if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then
+   echo You have a partially completed upgrade pending
+   echo Run '$0 install' first.
+   

svn commit: r283083 - stable/10/usr.bin/whois

2015-05-18 Thread Xin LI
Author: delphij
Date: Mon May 18 21:27:46 2015
New Revision: 283083
URL: https://svnweb.freebsd.org/changeset/base/283083

Log:
  MFC r281959,282885 (fanf, partial),282888 (fanf):
  
  Try alternate addresses more agressively.
  
  PR: 158125
  Submitted by:   Mark Andrews marka isc org (with changes from me)
  
  whois: code cleanup
  
  Use pedantically correct types.
  
  whois: do not clobber command-line flags when tweaking O_NONBLOCK
  
  This can make whois fail to follow referrals when it should.
  The bug was introduced in r281959.

Modified:
  stable/10/usr.bin/whois/whois.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/whois/whois.c
==
--- stable/10/usr.bin/whois/whois.c Mon May 18 21:18:44 2015
(r283082)
+++ stable/10/usr.bin/whois/whois.c Mon May 18 21:27:46 2015
(r283083)
@@ -1,4 +1,4 @@
-/*
+/*-
  * Copyright (c) 1980, 1993
  * The Regents of the University of California.  All rights reserved.
  *
@@ -44,6 +44,7 @@ __FBSDID($FreeBSD$);
 
 #include sys/types.h
 #include sys/socket.h
+#include sys/poll.h
 #include netinet/in.h
 #include arpa/inet.h
 #include ctype.h
@@ -55,6 +56,8 @@ __FBSDID($FreeBSD$);
 #include string.h
 #include sysexits.h
 #include unistd.h
+#include fcntl.h
+#include errno.h
 
 #defineABUSEHOST   whois.abuse.net
 #defineNICHOST whois.crsnic.net
@@ -280,21 +283,137 @@ whois(const char *query, const char *hos
FILE *sfi, *sfo;
struct addrinfo *hostres, *res;
char *buf, *host, *nhost, *p;
-   int i, s;
-   size_t c, len;
+   int s = -1, f;
+   nfds_t i, j;
+   size_t c, len, count;
+   struct pollfd *fds;
+   int timeout = 180;
 
-   s = -1;
hostres = gethostinfo(hostname, 1);
-   for (res = hostres; res; res = res-ai_next) {
-   s = socket(res-ai_family, res-ai_socktype, res-ai_protocol);
+   for (res = hostres, count = 0; res; res = res-ai_next)
+   count++;
+
+   fds = calloc(count, sizeof(*fds));
+   if (fds == NULL)
+   err(EX_OSERR, calloc());
+
+   /*
+* Traverse the result list elements and make non-block
+* connection attempts.
+*/
+   count = i = 0;
+   for (res = hostres; res != NULL; res = res-ai_next) {
+   s = socket(res-ai_family, res-ai_socktype | SOCK_NONBLOCK,
+   res-ai_protocol);
if (s  0)
continue;
-   if (connect(s, res-ai_addr, res-ai_addrlen) == 0)
-   break;
-   close(s);
+   if (connect(s, res-ai_addr, res-ai_addrlen)  0) {
+   if (errno == EINPROGRESS) {
+   /* Add the socket to poll list */
+   fds[i].fd = s;
+   fds[i].events = POLLERR | POLLHUP |
+   POLLIN | POLLOUT;
+   count++;
+   i++;
+   } else {
+   close(s);
+   s = -1;
+
+   /*
+* Poll only if we have something to poll,
+* otherwise just go ahead and try next
+* address
+*/
+   if (count == 0)
+   continue;
+   }
+   } else
+   goto done;
+
+   /*
+* If we are at the last address, poll until a connection is
+* established or we failed all connection attempts.
+*/
+   if (res-ai_next == NULL)
+   timeout = INFTIM;
+
+   /*
+* Poll the watched descriptors for successful connections:
+* if we still have more untried resolved addresses, poll only
+* once; otherwise, poll until all descriptors have errors,
+* which will be considered as ETIMEDOUT later.
+*/
+   do {
+   int n;
+
+   n = poll(fds, i, timeout);
+   if (n == 0) {
+   /*
+* No event reported in time.  Try with a
+* smaller timeout (but cap at 2-3ms)
+* after a new host have been added.
+*/
+   if (timeout = 3)
+   timeout = 1;
+
+   break;
+   } else if (n  0) {
+   /*
+ 

svn commit: r283100 - stable/10/sys/dev/hyperv/netvsc

2015-05-19 Thread Xin LI
Author: delphij
Date: Tue May 19 08:00:39 2015
New Revision: 283100
URL: https://svnweb.freebsd.org/changeset/base/283100

Log:
  MFC r279819:
  
  Fix CARP when in use in a HyperV environment:
  
   - Bump link state when stopping or starting the interface;
   - Don't handle SIOCGIFADDR specially, similar to r277103.
  
  This change is based on a previous revision from Andy Zhang
  (Microsoft) who did the diagnostic work and many thanks to
  them for their help in supporting the HyperV work.
  
  PR:   kern/187203

Modified:
  stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==
--- stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue May 19 
06:45:56 2015(r283099)
+++ stable/10/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue May 19 
08:00:39 2015(r283100)
@@ -738,7 +738,14 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, 
switch(cmd) {
 
case SIOCSIFADDR:
-   case SIOCGIFADDR:
+#ifdef INET
+   if (ifa-ifa_addr-sa_family == AF_INET) {
+   ifp-if_flags |= IFF_UP;
+   if (!(ifp-if_drv_flags  IFF_DRV_RUNNING))
+   hn_ifinit(sc);
+   arp_ifinit(ifp, ifa);
+   } else
+#endif
error = ether_ioctl(ifp, cmd, data);
break;
case SIOCSIFMTU:
@@ -902,6 +909,7 @@ hn_stop(hn_softc_t *sc)
printf( Closing Device ...\n);
 
ifp-if_drv_flags = ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
+   if_link_state_change(ifp, LINK_STATE_DOWN);
sc-hn_initdone = 0;
 
ret = hv_rf_on_close(device_ctx);
@@ -951,6 +959,7 @@ hn_ifinit_locked(hn_softc_t *sc)
}
ifp-if_drv_flags |= IFF_DRV_RUNNING;
ifp-if_drv_flags = ~IFF_DRV_OACTIVE;
+   if_link_state_change(ifp, LINK_STATE_UP);
 }
 
 /*
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org


svn commit: r292322 - in stable/10: share/man/man4 sys/dev/arcmsr

2015-12-16 Thread Xin LI
Author: delphij
Date: Wed Dec 16 08:02:21 2015
New Revision: 292322
URL: https://svnweb.freebsd.org/changeset/base/292322

Log:
  MFC r259564,259565,291641:
  
  Update arcmsr(4) to 1.30.00.00 in order to add support of
  ARC-1203 SATA RAID controllers.
  
  Many thanks to Areca for continuing to support FreeBSD.

Modified:
  stable/10/share/man/man4/arcmsr.4
  stable/10/sys/dev/arcmsr/arcmsr.c
  stable/10/sys/dev/arcmsr/arcmsr.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/arcmsr.4
==
--- stable/10/share/man/man4/arcmsr.4   Wed Dec 16 06:21:26 2015
(r292321)
+++ stable/10/share/man/man4/arcmsr.4   Wed Dec 16 08:02:21 2015
(r292322)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 27, 2013
+.Dd December 18, 2013
 .Dt ARCMSR 4
 .Os
 .Sh NAME
@@ -143,6 +143,8 @@ ARC-1681
 ARC-1880
 .It
 ARC-1882
+.It
+ARC-1883
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /dev/arcmsr?" -compact

Modified: stable/10/sys/dev/arcmsr/arcmsr.c
==
--- stable/10/sys/dev/arcmsr/arcmsr.c   Wed Dec 16 06:21:26 2015
(r292321)
+++ stable/10/sys/dev/arcmsr/arcmsr.c   Wed Dec 16 08:02:21 2015
(r292322)
@@ -75,6 +75,8 @@
 ** 1.20.00.26   12/14/2012  Ching Huang Added support 
ARC1214,1224,1264,1284
 ** 1.20.00.27   05/06/2013  Ching Huang Fixed out standing cmd full on 
ARC-12x4
 ** 1.20.00.28   09/13/2013  Ching Huang Removed recursive mutex in 
arcmsr_abort_dr_ccbs
+** 1.20.00.29   12/18/2013  Ching Huang Change simq allocation number, 
support ARC1883
+** 1.30.00.00   11/30/2015  Ching Huang Added support ARC1203
 
**
 */
 
@@ -125,15 +127,15 @@ __FBSDID("$FreeBSD$");
 **
 */
 #if __FreeBSD_version >= 55
-#include 
-#include 
-#include 
-#include 
-#include 
+   #include 
+   #include 
+   #include 
+   #include 
+   #include 
 #else
-#include 
-#include 
-#include 
+   #include 
+   #include 
+   #include 
 #endif
 
 #if !defined(CAM_NEW_TRAN_CODE) && __FreeBSD_version >= 700025
@@ -146,7 +148,7 @@ __FBSDID("$FreeBSD$");
 #define arcmsr_callout_init(a) callout_init(a);
 #endif
 
-#define ARCMSR_DRIVER_VERSION  "arcmsr version 1.20.00.28 2013-09-13"
+#define ARCMSR_DRIVER_VERSION  "arcmsr version 1.30.00.00 2015-11-30"
 #include 
 /*
 **
@@ -180,8 +182,8 @@ static int arcmsr_iop_message_xfer(struc
 static int arcmsr_resume(device_t dev);
 static int arcmsr_suspend(device_t dev);
 static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb);
-static voidarcmsr_polling_devmap(void *arg);
-static voidarcmsr_srb_timeout(void *arg);
+static void arcmsr_polling_devmap(void *arg);
+static void arcmsr_srb_timeout(void *arg);
 static void arcmsr_hbd_postqueue_isr(struct AdapterControlBlock *acb);
 #ifdef ARCMSR_DEBUG1
 static void arcmsr_dump_data(struct AdapterControlBlock *acb);
@@ -219,11 +221,11 @@ static device_method_t arcmsr_methods[]=
{ 0, 0 }
 #endif
 };
-   
+
 static driver_t arcmsr_driver={
"arcmsr", arcmsr_methods, sizeof(struct AdapterControlBlock)
 };
-   
+
 static devclass_t arcmsr_devclass;
 DRIVER_MODULE(arcmsr, pci, arcmsr_driver, arcmsr_devclass, 0, 0);
 MODULE_DEPEND(arcmsr, pci, 1, 1, 1);
@@ -246,38 +248,38 @@ static struct cdevsw arcmsr_cdevsw={
};
 #else
#define ARCMSR_CDEV_MAJOR   180
-   
+
 static struct cdevsw arcmsr_cdevsw = {
-   arcmsr_open,/* open */
-   arcmsr_close,   /* close*/
-   noread, /* read */
-   nowrite,/* write*/
-   arcmsr_ioctl,   /* ioctl*/
-   nopoll, /* poll */
-   nommap, /* mmap */
-   nostrategy, /* strategy */
-   "arcmsr",   /* name */
-   ARCMSR_CDEV_MAJOR,  /* major*/
-   nodump, /* dump */
-   nopsize,/* psize*/
-   0   /* 
flags*/
+   arcmsr_open,/* open */
+   arcmsr_close,   /* close*/
+   noread, /* read */
+

svn commit: r292588 - in stable/10: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/...

2015-12-22 Thread Xin LI
Author: delphij
Date: Tue Dec 22 08:03:23 2015
New Revision: 292588
URL: https://svnweb.freebsd.org/changeset/base/292588

Log:
  MFC: xz 5.2.2.
  
  Relnotes: yes

Added:
  stable/10/contrib/xz/src/liblzma/api/lzma/lzma12.h
 - copied unchanged from r278433, 
head/contrib/xz/src/liblzma/api/lzma/lzma12.h
  stable/10/contrib/xz/src/liblzma/common/block_buffer_encoder.h
 - copied unchanged from r278433, 
head/contrib/xz/src/liblzma/common/block_buffer_encoder.h
  stable/10/contrib/xz/src/liblzma/common/hardware_cputhreads.c
 - copied unchanged from r278433, 
head/contrib/xz/src/liblzma/common/hardware_cputhreads.c
  stable/10/contrib/xz/src/liblzma/common/memcmplen.h
 - copied, changed from r278433, 
head/contrib/xz/src/liblzma/common/memcmplen.h
  stable/10/contrib/xz/src/liblzma/common/outqueue.c
 - copied unchanged from r278433, 
head/contrib/xz/src/liblzma/common/outqueue.c
  stable/10/contrib/xz/src/liblzma/common/outqueue.h
 - copied unchanged from r278433, 
head/contrib/xz/src/liblzma/common/outqueue.h
  stable/10/contrib/xz/src/liblzma/common/stream_encoder_mt.c
 - copied unchanged from r278433, 
head/contrib/xz/src/liblzma/common/stream_encoder_mt.c
  stable/10/contrib/xz/src/liblzma/liblzma.map
 - copied unchanged from r278433, head/contrib/xz/src/liblzma/liblzma.map
  stable/10/contrib/xz/src/liblzma/liblzma.pc.in
 - copied, changed from r276898, head/contrib/xz/src/liblzma/liblzma.pc.in
  stable/10/contrib/xz/src/liblzma/validate_map.sh
 - copied unchanged from r278433, 
head/contrib/xz/src/liblzma/validate_map.sh
  stable/10/contrib/xz/src/xz/mytime.c
 - copied unchanged from r278433, head/contrib/xz/src/xz/mytime.c
  stable/10/contrib/xz/src/xz/mytime.h
 - copied unchanged from r278433, head/contrib/xz/src/xz/mytime.h
Deleted:
  stable/10/contrib/xz/src/liblzma/api/lzma/lzma.h
  stable/10/contrib/xz/src/liblzma/common/stream_encoder.h
Modified:
  stable/10/Makefile.inc1
  stable/10/ObsoleteFiles.inc
  stable/10/contrib/xz/ChangeLog
  stable/10/contrib/xz/FREEBSD-Xlist
  stable/10/contrib/xz/FREEBSD-upgrade
  stable/10/contrib/xz/THANKS
  stable/10/contrib/xz/TODO
  stable/10/contrib/xz/src/common/mythread.h
  stable/10/contrib/xz/src/common/sysdefs.h
  stable/10/contrib/xz/src/common/tuklib_cpucores.c
  stable/10/contrib/xz/src/common/tuklib_integer.h
  stable/10/contrib/xz/src/common/tuklib_physmem.c
  stable/10/contrib/xz/src/liblzma/api/lzma.h
  stable/10/contrib/xz/src/liblzma/api/lzma/base.h
  stable/10/contrib/xz/src/liblzma/api/lzma/block.h
  stable/10/contrib/xz/src/liblzma/api/lzma/container.h
  stable/10/contrib/xz/src/liblzma/api/lzma/filter.h
  stable/10/contrib/xz/src/liblzma/api/lzma/hardware.h
  stable/10/contrib/xz/src/liblzma/api/lzma/index.h
  stable/10/contrib/xz/src/liblzma/api/lzma/index_hash.h
  stable/10/contrib/xz/src/liblzma/api/lzma/version.h
  stable/10/contrib/xz/src/liblzma/check/check.h
  stable/10/contrib/xz/src/liblzma/check/sha256.c
  stable/10/contrib/xz/src/liblzma/common/alone_decoder.c
  stable/10/contrib/xz/src/liblzma/common/alone_decoder.h
  stable/10/contrib/xz/src/liblzma/common/alone_encoder.c
  stable/10/contrib/xz/src/liblzma/common/auto_decoder.c
  stable/10/contrib/xz/src/liblzma/common/block_buffer_decoder.c
  stable/10/contrib/xz/src/liblzma/common/block_buffer_encoder.c
  stable/10/contrib/xz/src/liblzma/common/block_decoder.c
  stable/10/contrib/xz/src/liblzma/common/block_decoder.h
  stable/10/contrib/xz/src/liblzma/common/block_encoder.c
  stable/10/contrib/xz/src/liblzma/common/block_encoder.h
  stable/10/contrib/xz/src/liblzma/common/block_header_decoder.c
  stable/10/contrib/xz/src/liblzma/common/block_header_encoder.c
  stable/10/contrib/xz/src/liblzma/common/block_util.c
  stable/10/contrib/xz/src/liblzma/common/common.c
  stable/10/contrib/xz/src/liblzma/common/common.h
  stable/10/contrib/xz/src/liblzma/common/easy_buffer_encoder.c
  stable/10/contrib/xz/src/liblzma/common/easy_encoder.c
  stable/10/contrib/xz/src/liblzma/common/filter_buffer_decoder.c
  stable/10/contrib/xz/src/liblzma/common/filter_buffer_encoder.c
  stable/10/contrib/xz/src/liblzma/common/filter_common.c
  stable/10/contrib/xz/src/liblzma/common/filter_common.h
  stable/10/contrib/xz/src/liblzma/common/filter_decoder.c
  stable/10/contrib/xz/src/liblzma/common/filter_decoder.h
  stable/10/contrib/xz/src/liblzma/common/filter_encoder.c
  stable/10/contrib/xz/src/liblzma/common/filter_encoder.h
  stable/10/contrib/xz/src/liblzma/common/filter_flags_decoder.c
  stable/10/contrib/xz/src/liblzma/common/index.c
  stable/10/contrib/xz/src/liblzma/common/index_decoder.c
  stable/10/contrib/xz/src/liblzma/common/index_encoder.c
  stable/10/contrib/xz/src/liblzma/common/index_encoder.h
  stable/10/contrib/xz/src/liblzma/common/index_hash.c
  stable/10/contrib/xz/src/liblzma/common/stream_buffer_decoder.c
  stable/10/contrib/xz/src/liblzma/common/stream_buffer_encoder.c
  

svn commit: r292589 - stable/10/sys/sys

2015-12-22 Thread Xin LI
Author: delphij
Date: Tue Dec 22 08:08:41 2015
New Revision: 292589
URL: https://svnweb.freebsd.org/changeset/base/292589

Log:
  Bump __FreeBSD_version after xz 5.2.2 merge (multithread support).

Modified:
  stable/10/sys/sys/param.h

Modified: stable/10/sys/sys/param.h
==
--- stable/10/sys/sys/param.h   Tue Dec 22 08:03:23 2015(r292588)
+++ stable/10/sys/sys/param.h   Tue Dec 22 08:08:41 2015(r292589)
@@ -58,7 +58,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1002503  /* Master, propagated to newvers */
+#define __FreeBSD_version 1002504  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r293820 - in stable/10/sys/dev/hyperv: include vmbus

2016-01-13 Thread Xin LI
Author: delphij
Date: Wed Jan 13 08:22:53 2016
New Revision: 293820
URL: https://svnweb.freebsd.org/changeset/base/293820

Log:
  MFC r292861:
  
  hyperv: vmbus: run non-blocking message handlers in vmbus_msg_swintr()
  
  We'll remove the per-channel control_work_queue because it can't properly
  do serialization of message handling, e.g., when there are 2 NIC devices,
  vmbus_channel_on_offer() -> hv_queue_work_item() has a race condition:
  for an SMP VM, vmbus_channel_process_offer() can run concurrently on
  different CPUs and if the second NIC's
  vmbus_channel_process_offer() -> hv_vmbus_child_device_register() runs
  first, the second NIC's name will be hn0 and the first NIC's name will
  be hn1!
  
  We can fix the race condition by removing the per-channel control_work_queue
  and run all the message handlers in the global
  hv_vmbus_g_connection.work_queue -- we'll do this in the next patch.
  
  With the coming next patch, we have to run the non-blocking handlers
  directly in the kernel thread vmbus_msg_swintr(), because the special
  handling of sub-channel: when a sub-channel (e.g., of the storvsc driver)
  is received and being handled in vmbus_channel_on_offer() running on the
  global hv_vmbus_g_connection.work_queue, vmbus_channel_process_offer()
  invokes channel->sc_creation_callback, i.e., storvsc_handle_sc_creation,
  and the callback will invoke hv_vmbus_channel_open() -> hv_vmbus_post_message
  and expect a further reply from the host, but the handling of the further
  messag can't be done because the current message's handling hasn't finished
  yet; as result, hv_vmbus_channel_open() -> sema_timedwait() will time out
  and th device can't work.
  
  Also renamed the handler type from hv_pfn_channel_msg_handler to
  vmbus_msg_handler: the 'pfn' and 'channel' in the old name make no sense.
  
  Submitted by: Dexuan Cui 
  Reviewed by:  royger
  Differential Revision:https://reviews.freebsd.org/D4596
  
  MFC r292859:
  
  hyperv: vmbus: remove the per-channel control_work_queue
  
  Now vmbus_channel_on_offer() -> vmbus_channel_process_offer() can
  safely run on the global hv_vmbus_g_connection.work_queue now.
  
  We remove the per-channel control_work_queue to achieve the proper
  serialization of the message handling.
  
  I removed the bogus TODO in vmbus_channel_on_offer(): a vmbus offer
  can only come from the parent partition, i.e., the host.
  
  PR:   kern/205156
  Submitted by: Dexuan Cui 
  Reviewed by:  Howard Su , delphij
  Differential Revision:https://reviews.freebsd.org/D4597

Modified:
  stable/10/sys/dev/hyperv/include/hyperv.h
  stable/10/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
  stable/10/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
  stable/10/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/hyperv/include/hyperv.h
==
--- stable/10/sys/dev/hyperv/include/hyperv.h   Wed Jan 13 08:09:28 2016
(r293819)
+++ stable/10/sys/dev/hyperv/include/hyperv.h   Wed Jan 13 08:22:53 2016
(r293820)
@@ -759,7 +759,6 @@ typedef struct hv_vmbus_channel {
hv_vmbus_ring_buffer_info   inbound;
 
struct mtx  inbound_lock;
-   hv_vmbus_handle control_work_queue;
 
hv_vmbus_pfn_channel_callback   on_channel_callback;
void*   channel_callback_context;

Modified: stable/10/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
==
--- stable/10/sys/dev/hyperv/vmbus/hv_channel_mgmt.cWed Jan 13 08:09:28 
2016(r293819)
+++ stable/10/sys/dev/hyperv/vmbus/hv_channel_mgmt.cWed Jan 13 08:22:53 
2016(r293820)
@@ -34,13 +34,6 @@ __FBSDID("$FreeBSD$");
 
 #include "hv_vmbus_priv.h"
 
-typedef void (*hv_pfn_channel_msg_handler)(hv_vmbus_channel_msg_header* msg);
-
-typedef struct hv_vmbus_channel_msg_table_entry {
-   hv_vmbus_channel_msg_typemessageType;
-   hv_pfn_channel_msg_handler   messageHandler;
-} hv_vmbus_channel_msg_table_entry;
-
 /*
  * Internal functions
  */
@@ -52,36 +45,46 @@ static void vmbus_channel_on_gpadl_creat
 static void vmbus_channel_on_gpadl_torndown(hv_vmbus_channel_msg_header* hdr);
 static void vmbus_channel_on_offers_delivered(hv_vmbus_channel_msg_header* 
hdr);
 static void vmbus_channel_on_version_response(hv_vmbus_channel_msg_header* 
hdr);
-static void vmbus_channel_process_offer(void *context);
 
 /**
  * Channel message dispatch table
  */
 hv_vmbus_channel_msg_table_entry
 g_channel_message_table[HV_CHANNEL_MESSAGE_COUNT] = {
-   { HV_CHANNEL_MESSAGE_INVALID, NULL },
-   { HV_CHANNEL_MESSAGE_OFFER_CHANNEL, vmbus_channel_on_offer },
+   { HV_CHANNEL_MESSAGE_INVALID,
+   0, NULL },
+   { HV_CHANNEL_MESSAGE_OFFER_CHANNEL,
+   0, 

svn commit: r301824 - stable/10/release/scripts

2016-06-10 Thread Xin LI
Author: delphij
Date: Sat Jun 11 05:53:50 2016
New Revision: 301824
URL: https://svnweb.freebsd.org/changeset/base/301824

Log:
  MFC r301584: Apply mergemaster r255428:
  
  Pass -n (do not emit comments) when saving mtree information for future
  mergemaster(8) runs.

Modified:
  stable/10/release/scripts/mm-mtree.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/release/scripts/mm-mtree.sh
==
--- stable/10/release/scripts/mm-mtree.sh   Sat Jun 11 03:59:44 2016
(r301823)
+++ stable/10/release/scripts/mm-mtree.sh   Sat Jun 11 05:53:50 2016
(r301824)
@@ -147,7 +147,7 @@ find -d ${TEMPROOT} -type d -empty -dele
 
 # Build the mtree database in a temporary location.
 MTREENEW=`mktemp -t mergemaster.mtree`
-mtree -ci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null
+mtree -nci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null
 
 if [ -s "${MTREENEW}" ]; then
   echo "*** Saving mtree database for future upgrades"
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r300899 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic

2016-05-28 Thread Xin LI
Author: delphij
Date: Sat May 28 06:17:35 2016
New Revision: 300899
URL: https://svnweb.freebsd.org/changeset/base/300899

Log:
  MFC r298192,299234,299238,299736:
  
  file 5.27.

Added:
  stable/10/contrib/file/magic/Magdir/bioinformatics
 - copied unchanged from r298192, 
head/contrib/file/magic/Magdir/bioinformatics
  stable/10/contrib/file/magic/Magdir/coff
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/coff
  stable/10/contrib/file/magic/Magdir/der
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/der
  stable/10/contrib/file/magic/Magdir/finger
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/finger
  stable/10/contrib/file/magic/Magdir/flif
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/flif
  stable/10/contrib/file/magic/Magdir/microfocus
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/microfocus
  stable/10/contrib/file/magic/Magdir/polyml
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/polyml
  stable/10/contrib/file/magic/Magdir/vacuum-cleaner
 - copied unchanged from r298192, 
head/contrib/file/magic/Magdir/vacuum-cleaner
  stable/10/contrib/file/src/der.c
 - copied, changed from r298192, head/contrib/file/src/der.c
  stable/10/contrib/file/src/der.h
 - copied unchanged from r298192, head/contrib/file/src/der.h
  stable/10/contrib/file/src/dprintf.c
 - copied unchanged from r298192, head/contrib/file/src/dprintf.c
Modified:
  stable/10/contrib/file/ChangeLog
  stable/10/contrib/file/README
  stable/10/contrib/file/config.h.in
  stable/10/contrib/file/configure
  stable/10/contrib/file/configure.ac
  stable/10/contrib/file/doc/file.man
  stable/10/contrib/file/doc/libmagic.man
  stable/10/contrib/file/magic/Magdir/android
  stable/10/contrib/file/magic/Magdir/animation
  stable/10/contrib/file/magic/Magdir/apple
  stable/10/contrib/file/magic/Magdir/archive
  stable/10/contrib/file/magic/Magdir/audio
  stable/10/contrib/file/magic/Magdir/c-lang
  stable/10/contrib/file/magic/Magdir/cafebabe
  stable/10/contrib/file/magic/Magdir/commands
  stable/10/contrib/file/magic/Magdir/compress
  stable/10/contrib/file/magic/Magdir/console
  stable/10/contrib/file/magic/Magdir/database
  stable/10/contrib/file/magic/Magdir/filesystems
  stable/10/contrib/file/magic/Magdir/fonts
  stable/10/contrib/file/magic/Magdir/fortran
  stable/10/contrib/file/magic/Magdir/hitachi-sh
  stable/10/contrib/file/magic/Magdir/images
  stable/10/contrib/file/magic/Magdir/intel
  stable/10/contrib/file/magic/Magdir/java
  stable/10/contrib/file/magic/Magdir/lisp
  stable/10/contrib/file/magic/Magdir/mach
  stable/10/contrib/file/magic/Magdir/macintosh
  stable/10/contrib/file/magic/Magdir/misctools
  stable/10/contrib/file/magic/Magdir/modem
  stable/10/contrib/file/magic/Magdir/msdos
  stable/10/contrib/file/magic/Magdir/msvc
  stable/10/contrib/file/magic/Magdir/msx
  stable/10/contrib/file/magic/Magdir/netbsd
  stable/10/contrib/file/magic/Magdir/os2
  stable/10/contrib/file/magic/Magdir/psdbms
  stable/10/contrib/file/magic/Magdir/python
  stable/10/contrib/file/magic/Magdir/sendmail
  stable/10/contrib/file/magic/Magdir/sgml
  stable/10/contrib/file/magic/Magdir/sinclair
  stable/10/contrib/file/magic/Magdir/sql
  stable/10/contrib/file/magic/Magdir/terminfo
  stable/10/contrib/file/magic/Magdir/windows
  stable/10/contrib/file/magic/Magdir/wordprocessors
  stable/10/contrib/file/magic/Magdir/xenix
  stable/10/contrib/file/magic/Makefile.am
  stable/10/contrib/file/magic/Makefile.in
  stable/10/contrib/file/python/README
  stable/10/contrib/file/python/magic.py
  stable/10/contrib/file/python/setup.py
  stable/10/contrib/file/src/Makefile.am
  stable/10/contrib/file/src/Makefile.in
  stable/10/contrib/file/src/apprentice.c
  stable/10/contrib/file/src/ascmagic.c
  stable/10/contrib/file/src/cdf.c
  stable/10/contrib/file/src/cdf.h
  stable/10/contrib/file/src/compress.c
  stable/10/contrib/file/src/file.c
  stable/10/contrib/file/src/file.h
  stable/10/contrib/file/src/file_opts.h
  stable/10/contrib/file/src/fmtcheck.c
  stable/10/contrib/file/src/funcs.c
  stable/10/contrib/file/src/magic.c
  stable/10/contrib/file/src/magic.h
  stable/10/contrib/file/src/magic.h.in
  stable/10/contrib/file/src/print.c
  stable/10/contrib/file/src/readcdf.c
  stable/10/contrib/file/src/readelf.c
  stable/10/contrib/file/src/readelf.h
  stable/10/contrib/file/src/softmagic.c
  stable/10/contrib/file/tests/Makefile.am
  stable/10/contrib/file/tests/Makefile.in
  stable/10/lib/libmagic/Makefile
  stable/10/lib/libmagic/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/file/ChangeLog
==
--- stable/10/contrib/file/ChangeLogSat May 28 03:34:00 2016
(r300898)
+++ stable/10/contrib/file/ChangeLogSat May 28 06:17:35 2016
(r300899)
@@ -1,3 +1,62 @@
+2016-05-13  

svn commit: r294901 - in stable/10/sys: amd64/linux amd64/linux32 i386/linux

2016-01-26 Thread Xin LI
Author: delphij
Date: Wed Jan 27 07:28:55 2016
New Revision: 294901
URL: https://svnweb.freebsd.org/changeset/base/294901

Log:
  MFC r294900:
  
  Implement AT_SECURE properly.
  
  AT_SECURE auxv entry has been added to the Linux 2.5 kernel to pass a
  boolean flag indicating whether secure mode should be enabled. 1 means
  that the program has changes its credentials during the execution.
  Being exported AT_SECURE used by glibc issetugid() call.
  
  Submitted by: imp, dchagin
  Security: FreeBSD-SA-16:10.linux
  Security: CVE-2016-1883

Modified:
  stable/10/sys/amd64/linux/linux_sysvec.c
  stable/10/sys/amd64/linux32/linux32_sysvec.c
  stable/10/sys/i386/linux/linux_sysvec.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/linux/linux_sysvec.c
==
--- stable/10/sys/amd64/linux/linux_sysvec.cWed Jan 27 07:20:55 2016
(r294900)
+++ stable/10/sys/amd64/linux/linux_sysvec.cWed Jan 27 07:28:55 2016
(r294901)
@@ -271,6 +271,7 @@ elf_linux_fixup(register_t **stack_base,
Elf_Addr *pos;
struct ps_strings *arginfo;
struct proc *p;
+   int issetugid;
 
p = imgp->proc;
arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings;
@@ -281,6 +282,7 @@ elf_linux_fixup(register_t **stack_base,
args = (Elf64_Auxargs *)imgp->auxargs;
pos = base + (imgp->args->argc + imgp->args->envc + 2);
 
+   issetugid = p->p_flag & P_SUGID ? 1 : 0;
AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR,
imgp->proc->p_sysent->sv_shared_page_base);
AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature);
@@ -296,7 +298,7 @@ elf_linux_fixup(register_t **stack_base,
AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid);
AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid);
AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid);
-   AUXARGS_ENTRY(pos, LINUX_AT_SECURE, 0);
+   AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid);
AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform));
AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, imgp->canary);
if (imgp->execpathp != 0)

Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c
==
--- stable/10/sys/amd64/linux32/linux32_sysvec.cWed Jan 27 07:20:55 
2016(r294900)
+++ stable/10/sys/amd64/linux32/linux32_sysvec.cWed Jan 27 07:28:55 
2016(r294901)
@@ -230,6 +230,7 @@ elf_linux_fixup(register_t **stack_base,
Elf32_Addr *base;
Elf32_Addr *pos;
struct linux32_ps_strings *arginfo;
+   int issetugid;
 
arginfo = (struct linux32_ps_strings *)LINUX32_PS_STRINGS;
 
@@ -239,6 +240,7 @@ elf_linux_fixup(register_t **stack_base,
args = (Elf32_Auxargs *)imgp->auxargs;
pos = base + (imgp->args->argc + imgp->args->envc + 2);
 
+   issetugid = imgp->proc->p_flag & P_SUGID ? 1 : 0;
AUXARGS_ENTRY_32(pos, LINUX_AT_SYSINFO_EHDR,
imgp->proc->p_sysent->sv_shared_page_base);
AUXARGS_ENTRY_32(pos, LINUX_AT_SYSINFO, linux32_vsyscall);
@@ -261,7 +263,7 @@ elf_linux_fixup(register_t **stack_base,
AUXARGS_ENTRY_32(pos, AT_FLAGS, args->flags);
AUXARGS_ENTRY_32(pos, AT_ENTRY, args->entry);
AUXARGS_ENTRY_32(pos, AT_BASE, args->base);
-   AUXARGS_ENTRY_32(pos, LINUX_AT_SECURE, 0);
+   AUXARGS_ENTRY_32(pos, LINUX_AT_SECURE, issetugid);
AUXARGS_ENTRY_32(pos, AT_UID, imgp->proc->p_ucred->cr_ruid);
AUXARGS_ENTRY_32(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid);
AUXARGS_ENTRY_32(pos, AT_GID, imgp->proc->p_ucred->cr_rgid);

Modified: stable/10/sys/i386/linux/linux_sysvec.c
==
--- stable/10/sys/i386/linux/linux_sysvec.c Wed Jan 27 07:20:55 2016
(r294900)
+++ stable/10/sys/i386/linux/linux_sysvec.c Wed Jan 27 07:28:55 2016
(r294901)
@@ -238,11 +238,13 @@ elf_linux_fixup(register_t **stack_base,
Elf32_Addr *uplatform;
struct ps_strings *arginfo;
register_t *pos;
+   int issetugid;
 
KASSERT(curthread->td_proc == imgp->proc,
("unsafe elf_linux_fixup(), should be curproc"));
 
p = imgp->proc;
+   issetugid = imgp->proc->p_flag & P_SUGID ? 1 : 0;
arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings;
uplatform = (Elf32_Addr *)((caddr_t)arginfo - linux_szplatform);
args = (Elf32_Auxargs *)imgp->auxargs;
@@ -270,7 +272,7 @@ elf_linux_fixup(register_t **stack_base,
AUXARGS_ENTRY(pos, AT_FLAGS, args->flags);
AUXARGS_ENTRY(pos, AT_ENTRY, args->entry);
AUXARGS_ENTRY(pos, AT_BASE, args->base);
-   AUXARGS_ENTRY(pos, LINUX_AT_SECURE, 0);
+   AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid);
AUXARGS_ENTRY(pos, AT_UID, 

svn commit: r295961 - stable/10/contrib/libarchive/libarchive

2016-02-23 Thread Xin LI
Author: delphij
Date: Wed Feb 24 05:40:03 2016
New Revision: 295961
URL: https://svnweb.freebsd.org/changeset/base/295961

Log:
  MFC r295914: MFV r295913:
  
  Partially apply upstream changeset 6e06b1c8 (kientzle).
  
  Limit filter recursion level to 25 (instead of infinite).  This fixes a
  potential crash issue discovered by Alexander Cherepanov.
  
  PR:   207362
  Reported by:  Robert Clausecker
  Obtained from:libarchive github project
  Approved by:  re (marius)

Modified:
  stable/10/contrib/libarchive/libarchive/archive_read.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/libarchive/libarchive/archive_read.c
==
--- stable/10/contrib/libarchive/libarchive/archive_read.c  Wed Feb 24 
05:17:52 2016(r295960)
+++ stable/10/contrib/libarchive/libarchive/archive_read.c  Wed Feb 24 
05:40:03 2016(r295961)
@@ -545,13 +545,13 @@ archive_read_open1(struct archive *_a)
 static int
 choose_filters(struct archive_read *a)
 {
-   int number_bidders, i, bid, best_bid;
+   int number_bidders, i, bid, best_bid, n;
struct archive_read_filter_bidder *bidder, *best_bidder;
struct archive_read_filter *filter;
ssize_t avail;
int r;
 
-   for (;;) {
+   for (n = 0; n < 25; ++n) {
number_bidders = sizeof(a->bidders) / sizeof(a->bidders[0]);
 
best_bid = 0;
@@ -597,6 +597,9 @@ choose_filters(struct archive_read *a)
return (ARCHIVE_FATAL);
}
}
+   archive_set_error(>archive, ARCHIVE_ERRNO_FILE_FORMAT,
+   "Input requires too many filters for decoding");
+   return (ARCHIVE_FATAL);
 }
 
 /*
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r296317 - in stable/10: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/bio crypto/openssl/crypto/bn crypto/openssl/crypto/bn/asm crypto/openssl/crypto/ds...

2016-03-02 Thread Xin LI
Author: delphij
Date: Wed Mar  2 15:43:01 2016
New Revision: 296317
URL: https://svnweb.freebsd.org/changeset/base/296317

Log:
  Merge OpenSSL 1.0.1s.  This is a security update.
  
  Relnotes: yes
  Approved by:  re (so@ implicit)

Modified:
  stable/10/crypto/openssl/CHANGES
  stable/10/crypto/openssl/Configure
  stable/10/crypto/openssl/Makefile
  stable/10/crypto/openssl/NEWS
  stable/10/crypto/openssl/README
  stable/10/crypto/openssl/apps/s_server.c
  stable/10/crypto/openssl/crypto/bio/b_print.c
  stable/10/crypto/openssl/crypto/bio/bio.h
  stable/10/crypto/openssl/crypto/bn/Makefile
  stable/10/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl
  stable/10/crypto/openssl/crypto/bn/bn.h
  stable/10/crypto/openssl/crypto/bn/bn_exp.c
  stable/10/crypto/openssl/crypto/bn/bn_print.c
  stable/10/crypto/openssl/crypto/bn/bn_recp.c
  stable/10/crypto/openssl/crypto/dsa/dsa_ameth.c
  stable/10/crypto/openssl/crypto/modes/ctr128.c
  stable/10/crypto/openssl/crypto/opensslconf.h
  stable/10/crypto/openssl/crypto/opensslv.h
  stable/10/crypto/openssl/crypto/perlasm/x86_64-xlate.pl
  stable/10/crypto/openssl/crypto/rsa/rsa_sign.c
  stable/10/crypto/openssl/crypto/srp/srp.h
  stable/10/crypto/openssl/crypto/srp/srp_vfy.c
  stable/10/crypto/openssl/doc/apps/ciphers.pod
  stable/10/crypto/openssl/doc/apps/s_client.pod
  stable/10/crypto/openssl/doc/apps/s_server.pod
  stable/10/crypto/openssl/doc/ssl/SSL_CTX_new.pod
  stable/10/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod
  stable/10/crypto/openssl/doc/ssl/ssl.pod
  stable/10/crypto/openssl/ssl/Makefile
  stable/10/crypto/openssl/ssl/s2_lib.c
  stable/10/crypto/openssl/ssl/s3_lib.c
  stable/10/crypto/openssl/ssl/ssl_lib.c
  stable/10/crypto/openssl/util/libeay.num
  stable/10/crypto/openssl/util/mk1mf.pl
  stable/10/crypto/openssl/util/pl/BC-32.pl
  stable/10/crypto/openssl/util/pl/Mingw32.pl
  stable/10/crypto/openssl/util/pl/OS2-EMX.pl
  stable/10/crypto/openssl/util/pl/VC-32.pl
  stable/10/crypto/openssl/util/pl/linux.pl
  stable/10/crypto/openssl/util/pl/netware.pl
  stable/10/crypto/openssl/util/pl/ultrix.pl
  stable/10/crypto/openssl/util/pl/unix.pl
  stable/10/secure/lib/libcrypto/Makefile.inc
  stable/10/secure/lib/libcrypto/amd64/x86_64-mont5.S
  stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3
  stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3
  stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3
  stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3
  stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3
  stable/10/secure/lib/libcrypto/man/BIO_ctrl.3
  stable/10/secure/lib/libcrypto/man/BIO_f_base64.3
  stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3
  stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3
  stable/10/secure/lib/libcrypto/man/BIO_f_md.3
  stable/10/secure/lib/libcrypto/man/BIO_f_null.3
  stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3
  stable/10/secure/lib/libcrypto/man/BIO_find_type.3
  stable/10/secure/lib/libcrypto/man/BIO_new.3
  stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3
  stable/10/secure/lib/libcrypto/man/BIO_push.3
  stable/10/secure/lib/libcrypto/man/BIO_read.3
  stable/10/secure/lib/libcrypto/man/BIO_s_accept.3
  stable/10/secure/lib/libcrypto/man/BIO_s_bio.3
  stable/10/secure/lib/libcrypto/man/BIO_s_connect.3
  stable/10/secure/lib/libcrypto/man/BIO_s_fd.3
  stable/10/secure/lib/libcrypto/man/BIO_s_file.3
  stable/10/secure/lib/libcrypto/man/BIO_s_mem.3
  stable/10/secure/lib/libcrypto/man/BIO_s_null.3
  stable/10/secure/lib/libcrypto/man/BIO_s_socket.3
  stable/10/secure/lib/libcrypto/man/BIO_set_callback.3
  stable/10/secure/lib/libcrypto/man/BIO_should_retry.3
  stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3
  stable/10/secure/lib/libcrypto/man/BN_CTX_new.3
  stable/10/secure/lib/libcrypto/man/BN_CTX_start.3
  stable/10/secure/lib/libcrypto/man/BN_add.3
  stable/10/secure/lib/libcrypto/man/BN_add_word.3
  stable/10/secure/lib/libcrypto/man/BN_bn2bin.3
  stable/10/secure/lib/libcrypto/man/BN_cmp.3
  stable/10/secure/lib/libcrypto/man/BN_copy.3
  stable/10/secure/lib/libcrypto/man/BN_generate_prime.3
  stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3
  stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
  stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3
  stable/10/secure/lib/libcrypto/man/BN_new.3
  stable/10/secure/lib/libcrypto/man/BN_num_bytes.3
  stable/10/secure/lib/libcrypto/man/BN_rand.3
  stable/10/secure/lib/libcrypto/man/BN_set_bit.3
  stable/10/secure/lib/libcrypto/man/BN_swap.3
  stable/10/secure/lib/libcrypto/man/BN_zero.3
  stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3
  stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3
  stable/10/secure/lib/libcrypto/man/CMS_add1_signer.3
  stable/10/secure/lib/libcrypto/man/CMS_compress.3
  stable/10/secure/lib/libcrypto/man/CMS_decrypt.3
  stable/10/secure/lib/libcrypto/man/CMS_encrypt.3
  stable/10/secure/lib/libcrypto/man/CMS_final.3
  stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3
  

svn commit: r298699 - in stable/10: contrib/ntp contrib/ntp/html contrib/ntp/include contrib/ntp/lib/isc contrib/ntp/lib/isc/include/isc contrib/ntp/libntp contrib/ntp/ntpd contrib/ntp/ntpdate cont...

2016-04-27 Thread Xin LI
Author: delphij
Date: Wed Apr 27 15:24:33 2016
New Revision: 298699
URL: https://svnweb.freebsd.org/changeset/base/298699

Log:
  MFC r298695: MFV r298691: ntp 4.2.8p7.
  
  Security: CVE-2016-1547, CVE-2016-1548, CVE-2016-1549, CVE-2016-1550
  Security: CVE-2016-1551, CVE-2016-2516, CVE-2016-2517, CVE-2016-2518
  Security: CVE-2016-2519
  Security: FreeBSD-SA-16:16.ntp
  With hat: so

Added:
  stable/10/contrib/ntp/README.pullrequests
 - copied unchanged from r298695, head/contrib/ntp/README.pullrequests
  stable/10/contrib/ntp/lib/isc/tsmemcmp.c
 - copied unchanged from r298695, head/contrib/ntp/lib/isc/tsmemcmp.c
  stable/10/contrib/ntp/tests/libntp/run-tsafememcmp.c
 - copied unchanged from r298695, 
head/contrib/ntp/tests/libntp/run-tsafememcmp.c
  stable/10/contrib/ntp/tests/libntp/tsafememcmp.c
 - copied unchanged from r298695, 
head/contrib/ntp/tests/libntp/tsafememcmp.c
Modified:
  stable/10/contrib/ntp/ChangeLog
  stable/10/contrib/ntp/CommitLog
  stable/10/contrib/ntp/Makefile.am
  stable/10/contrib/ntp/Makefile.in
  stable/10/contrib/ntp/NEWS
  stable/10/contrib/ntp/config.h.in
  stable/10/contrib/ntp/configure
  stable/10/contrib/ntp/configure.ac
  stable/10/contrib/ntp/html/authentic.html
  stable/10/contrib/ntp/html/monopt.html
  stable/10/contrib/ntp/html/xleave.html
  stable/10/contrib/ntp/include/ntp.h
  stable/10/contrib/ntp/include/ntp_keyacc.h
  stable/10/contrib/ntp/include/ntp_refclock.h
  stable/10/contrib/ntp/include/ntp_stdlib.h
  stable/10/contrib/ntp/include/ntp_types.h
  stable/10/contrib/ntp/include/ntp_worker.h
  stable/10/contrib/ntp/include/recvbuff.h
  stable/10/contrib/ntp/lib/isc/hmacmd5.c
  stable/10/contrib/ntp/lib/isc/hmacsha.c
  stable/10/contrib/ntp/lib/isc/include/isc/string.h
  stable/10/contrib/ntp/libntp/Makefile.am
  stable/10/contrib/ntp/libntp/Makefile.in
  stable/10/contrib/ntp/libntp/a_md5encrypt.c
  stable/10/contrib/ntp/libntp/authkeys.c
  stable/10/contrib/ntp/libntp/authreadkeys.c
  stable/10/contrib/ntp/libntp/is_ip_address.c
  stable/10/contrib/ntp/libntp/ntp_intres.c
  stable/10/contrib/ntp/libntp/ntp_worker.c
  stable/10/contrib/ntp/libntp/recvbuff.c
  stable/10/contrib/ntp/libntp/work_fork.c
  stable/10/contrib/ntp/libntp/work_thread.c
  stable/10/contrib/ntp/ntpd/invoke-ntp.conf.texi
  stable/10/contrib/ntp/ntpd/invoke-ntp.keys.texi
  stable/10/contrib/ntp/ntpd/invoke-ntpd.texi
  stable/10/contrib/ntp/ntpd/ntp.conf.5man
  stable/10/contrib/ntp/ntpd/ntp.conf.5mdoc
  stable/10/contrib/ntp/ntpd/ntp.conf.def
  stable/10/contrib/ntp/ntpd/ntp.conf.html
  stable/10/contrib/ntp/ntpd/ntp.conf.man.in
  stable/10/contrib/ntp/ntpd/ntp.conf.mdoc.in
  stable/10/contrib/ntp/ntpd/ntp.keys.5man
  stable/10/contrib/ntp/ntpd/ntp.keys.5mdoc
  stable/10/contrib/ntp/ntpd/ntp.keys.html
  stable/10/contrib/ntp/ntpd/ntp.keys.man.in
  stable/10/contrib/ntp/ntpd/ntp.keys.mdoc.in
  stable/10/contrib/ntp/ntpd/ntp_control.c
  stable/10/contrib/ntp/ntpd/ntp_io.c
  stable/10/contrib/ntp/ntpd/ntp_proto.c
  stable/10/contrib/ntp/ntpd/ntp_request.c
  stable/10/contrib/ntp/ntpd/ntp_timer.c
  stable/10/contrib/ntp/ntpd/ntpd-opts.c
  stable/10/contrib/ntp/ntpd/ntpd-opts.h
  stable/10/contrib/ntp/ntpd/ntpd.1ntpdman
  stable/10/contrib/ntp/ntpd/ntpd.1ntpdmdoc
  stable/10/contrib/ntp/ntpd/ntpd.c
  stable/10/contrib/ntp/ntpd/ntpd.html
  stable/10/contrib/ntp/ntpd/ntpd.man.in
  stable/10/contrib/ntp/ntpd/ntpd.mdoc.in
  stable/10/contrib/ntp/ntpdate/ntpdate.c
  stable/10/contrib/ntp/ntpdc/invoke-ntpdc.texi
  stable/10/contrib/ntp/ntpdc/ntpdc-opts.c
  stable/10/contrib/ntp/ntpdc/ntpdc-opts.h
  stable/10/contrib/ntp/ntpdc/ntpdc.1ntpdcman
  stable/10/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
  stable/10/contrib/ntp/ntpdc/ntpdc.html
  stable/10/contrib/ntp/ntpdc/ntpdc.man.in
  stable/10/contrib/ntp/ntpdc/ntpdc.mdoc.in
  stable/10/contrib/ntp/ntpq/invoke-ntpq.texi
  stable/10/contrib/ntp/ntpq/ntpq-opts.c
  stable/10/contrib/ntp/ntpq/ntpq-opts.def
  stable/10/contrib/ntp/ntpq/ntpq-opts.h
  stable/10/contrib/ntp/ntpq/ntpq-subs.c
  stable/10/contrib/ntp/ntpq/ntpq.1ntpqman
  stable/10/contrib/ntp/ntpq/ntpq.1ntpqmdoc
  stable/10/contrib/ntp/ntpq/ntpq.c
  stable/10/contrib/ntp/ntpq/ntpq.h
  stable/10/contrib/ntp/ntpq/ntpq.html
  stable/10/contrib/ntp/ntpq/ntpq.man.in
  stable/10/contrib/ntp/ntpq/ntpq.mdoc.in
  stable/10/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.html
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
  stable/10/contrib/ntp/packageinfo.sh
  stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
  stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
  stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
  

svn commit: r298920 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src lib/libmagic

2016-05-01 Thread Xin LI
Author: delphij
Date: Mon May  2 05:46:47 2016
New Revision: 298920
URL: https://svnweb.freebsd.org/changeset/base/298920

Log:
  MFC r298192: MFV r298178:
  
  Update file to 5.26.
  
  Relnotes: yes

Added:
  stable/10/contrib/file/magic/Magdir/bioinformatics
 - copied unchanged from r298192, 
head/contrib/file/magic/Magdir/bioinformatics
  stable/10/contrib/file/magic/Magdir/coff
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/coff
  stable/10/contrib/file/magic/Magdir/der
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/der
  stable/10/contrib/file/magic/Magdir/finger
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/finger
  stable/10/contrib/file/magic/Magdir/flif
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/flif
  stable/10/contrib/file/magic/Magdir/microfocus
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/microfocus
  stable/10/contrib/file/magic/Magdir/polyml
 - copied unchanged from r298192, head/contrib/file/magic/Magdir/polyml
  stable/10/contrib/file/magic/Magdir/vacuum-cleaner
 - copied unchanged from r298192, 
head/contrib/file/magic/Magdir/vacuum-cleaner
  stable/10/contrib/file/src/der.c
 - copied unchanged from r298192, head/contrib/file/src/der.c
  stable/10/contrib/file/src/der.h
 - copied unchanged from r298192, head/contrib/file/src/der.h
  stable/10/contrib/file/src/dprintf.c
 - copied unchanged from r298192, head/contrib/file/src/dprintf.c
Modified:
  stable/10/contrib/file/ChangeLog
  stable/10/contrib/file/README
  stable/10/contrib/file/config.h.in
  stable/10/contrib/file/configure
  stable/10/contrib/file/configure.ac
  stable/10/contrib/file/doc/file.man
  stable/10/contrib/file/doc/libmagic.man
  stable/10/contrib/file/magic/Magdir/android
  stable/10/contrib/file/magic/Magdir/animation
  stable/10/contrib/file/magic/Magdir/apple
  stable/10/contrib/file/magic/Magdir/archive
  stable/10/contrib/file/magic/Magdir/audio
  stable/10/contrib/file/magic/Magdir/c-lang
  stable/10/contrib/file/magic/Magdir/cafebabe
  stable/10/contrib/file/magic/Magdir/commands
  stable/10/contrib/file/magic/Magdir/compress
  stable/10/contrib/file/magic/Magdir/console
  stable/10/contrib/file/magic/Magdir/database
  stable/10/contrib/file/magic/Magdir/filesystems
  stable/10/contrib/file/magic/Magdir/fonts
  stable/10/contrib/file/magic/Magdir/fortran
  stable/10/contrib/file/magic/Magdir/hitachi-sh
  stable/10/contrib/file/magic/Magdir/images
  stable/10/contrib/file/magic/Magdir/intel
  stable/10/contrib/file/magic/Magdir/java
  stable/10/contrib/file/magic/Magdir/lisp
  stable/10/contrib/file/magic/Magdir/mach
  stable/10/contrib/file/magic/Magdir/macintosh
  stable/10/contrib/file/magic/Magdir/misctools
  stable/10/contrib/file/magic/Magdir/modem
  stable/10/contrib/file/magic/Magdir/msdos
  stable/10/contrib/file/magic/Magdir/msvc
  stable/10/contrib/file/magic/Magdir/msx
  stable/10/contrib/file/magic/Magdir/netbsd
  stable/10/contrib/file/magic/Magdir/psdbms
  stable/10/contrib/file/magic/Magdir/python
  stable/10/contrib/file/magic/Magdir/sendmail
  stable/10/contrib/file/magic/Magdir/sgml
  stable/10/contrib/file/magic/Magdir/sinclair
  stable/10/contrib/file/magic/Magdir/sql
  stable/10/contrib/file/magic/Magdir/terminfo
  stable/10/contrib/file/magic/Magdir/windows
  stable/10/contrib/file/magic/Magdir/wordprocessors
  stable/10/contrib/file/magic/Makefile.am
  stable/10/contrib/file/magic/Makefile.in
  stable/10/contrib/file/python/README
  stable/10/contrib/file/python/magic.py
  stable/10/contrib/file/python/setup.py
  stable/10/contrib/file/src/Makefile.am
  stable/10/contrib/file/src/Makefile.in
  stable/10/contrib/file/src/apprentice.c
  stable/10/contrib/file/src/ascmagic.c
  stable/10/contrib/file/src/compress.c
  stable/10/contrib/file/src/file.c
  stable/10/contrib/file/src/file.h
  stable/10/contrib/file/src/file_opts.h
  stable/10/contrib/file/src/fmtcheck.c
  stable/10/contrib/file/src/funcs.c
  stable/10/contrib/file/src/magic.c
  stable/10/contrib/file/src/magic.h
  stable/10/contrib/file/src/print.c
  stable/10/contrib/file/src/readcdf.c
  stable/10/contrib/file/src/readelf.c
  stable/10/contrib/file/src/readelf.h
  stable/10/contrib/file/src/softmagic.c
  stable/10/lib/libmagic/Makefile
  stable/10/lib/libmagic/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/file/ChangeLog
==
--- stable/10/contrib/file/ChangeLogMon May  2 05:43:46 2016
(r298919)
+++ stable/10/contrib/file/ChangeLogMon May  2 05:46:47 2016
(r298920)
@@ -1,3 +1,49 @@
+2016-04-16  18:34  Christos Zoulas 
+   
+   * release 5.25
+
+2016-03-31  13:50  Christos Zoulas 
+
+   * make the number of bytes read from files configurable.
+
+2016-03-21  13:40  Christos Zoulas 

svn commit: r299236 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src lib/libmagic

2016-05-08 Thread Xin LI
Author: delphij
Date: Sun May  8 18:09:30 2016
New Revision: 299236
URL: https://svnweb.freebsd.org/changeset/base/299236

Log:
  Revert r298920 until we have addressed all known regressions on head/ after
  settle.  file is now downgraded to 5.25.
  
  PR:   bin/209211
  Requested by: Tomoaki AOKI
  Relnotes: yes

Deleted:
  stable/10/contrib/file/magic/Magdir/bioinformatics
  stable/10/contrib/file/magic/Magdir/coff
  stable/10/contrib/file/magic/Magdir/der
  stable/10/contrib/file/magic/Magdir/finger
  stable/10/contrib/file/magic/Magdir/flif
  stable/10/contrib/file/magic/Magdir/microfocus
  stable/10/contrib/file/magic/Magdir/polyml
  stable/10/contrib/file/magic/Magdir/vacuum-cleaner
  stable/10/contrib/file/src/der.c
  stable/10/contrib/file/src/der.h
  stable/10/contrib/file/src/dprintf.c
Modified:
  stable/10/contrib/file/ChangeLog
  stable/10/contrib/file/README
  stable/10/contrib/file/config.h.in
  stable/10/contrib/file/configure
  stable/10/contrib/file/configure.ac
  stable/10/contrib/file/doc/file.man
  stable/10/contrib/file/doc/libmagic.man
  stable/10/contrib/file/magic/Magdir/android
  stable/10/contrib/file/magic/Magdir/animation
  stable/10/contrib/file/magic/Magdir/apple
  stable/10/contrib/file/magic/Magdir/archive
  stable/10/contrib/file/magic/Magdir/audio
  stable/10/contrib/file/magic/Magdir/c-lang
  stable/10/contrib/file/magic/Magdir/cafebabe
  stable/10/contrib/file/magic/Magdir/commands
  stable/10/contrib/file/magic/Magdir/compress
  stable/10/contrib/file/magic/Magdir/console
  stable/10/contrib/file/magic/Magdir/database
  stable/10/contrib/file/magic/Magdir/filesystems
  stable/10/contrib/file/magic/Magdir/fonts
  stable/10/contrib/file/magic/Magdir/fortran
  stable/10/contrib/file/magic/Magdir/hitachi-sh
  stable/10/contrib/file/magic/Magdir/images
  stable/10/contrib/file/magic/Magdir/intel
  stable/10/contrib/file/magic/Magdir/java
  stable/10/contrib/file/magic/Magdir/lisp
  stable/10/contrib/file/magic/Magdir/mach
  stable/10/contrib/file/magic/Magdir/macintosh
  stable/10/contrib/file/magic/Magdir/misctools
  stable/10/contrib/file/magic/Magdir/modem
  stable/10/contrib/file/magic/Magdir/msdos
  stable/10/contrib/file/magic/Magdir/msvc
  stable/10/contrib/file/magic/Magdir/msx
  stable/10/contrib/file/magic/Magdir/netbsd
  stable/10/contrib/file/magic/Magdir/psdbms
  stable/10/contrib/file/magic/Magdir/python
  stable/10/contrib/file/magic/Magdir/sendmail
  stable/10/contrib/file/magic/Magdir/sgml
  stable/10/contrib/file/magic/Magdir/sinclair
  stable/10/contrib/file/magic/Magdir/sql
  stable/10/contrib/file/magic/Magdir/terminfo
  stable/10/contrib/file/magic/Magdir/windows
  stable/10/contrib/file/magic/Magdir/wordprocessors
  stable/10/contrib/file/magic/Makefile.am
  stable/10/contrib/file/magic/Makefile.in
  stable/10/contrib/file/python/README
  stable/10/contrib/file/python/magic.py
  stable/10/contrib/file/python/setup.py
  stable/10/contrib/file/src/Makefile.am
  stable/10/contrib/file/src/Makefile.in
  stable/10/contrib/file/src/apprentice.c
  stable/10/contrib/file/src/ascmagic.c
  stable/10/contrib/file/src/compress.c
  stable/10/contrib/file/src/file.c
  stable/10/contrib/file/src/file.h
  stable/10/contrib/file/src/file_opts.h
  stable/10/contrib/file/src/fmtcheck.c
  stable/10/contrib/file/src/funcs.c
  stable/10/contrib/file/src/magic.c
  stable/10/contrib/file/src/magic.h
  stable/10/contrib/file/src/print.c
  stable/10/contrib/file/src/readcdf.c
  stable/10/contrib/file/src/readelf.c
  stable/10/contrib/file/src/readelf.h
  stable/10/contrib/file/src/softmagic.c
  stable/10/lib/libmagic/Makefile
  stable/10/lib/libmagic/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/file/ChangeLog
==
--- stable/10/contrib/file/ChangeLogSun May  8 17:52:12 2016
(r299235)
+++ stable/10/contrib/file/ChangeLogSun May  8 18:09:30 2016
(r299236)
@@ -1,49 +1,3 @@
-2016-04-16  18:34  Christos Zoulas 
-   
-   * release 5.25
-
-2016-03-31  13:50  Christos Zoulas 
-
-   * make the number of bytes read from files configurable.
-
-2016-03-21  13:40  Christos Zoulas 
-
-   * Add bounds checks for DER code (discovered by Thomas Jarosch)
-   * Change indirect recursion limit to indirect use count and
- bump from 15 to 50 to prevent abuse.
-
-2016-03-13  20:39  Christos Zoulas 
-
-   * Add -00 which prints filename\0description\0
-
-2016-03-01  13:28  Christos Zoulas 
-
-   * Fix ID3 indirect parsing
-
-2016-01-19  10:18  Christos Zoulas 
-
-   * add DER parsing capability
-
-2015-11-13  10:35  Christos Zoulas 
-
-   * provide dprintf(3) for the OS's that don't have it.
-
-2015-11-11  16:25  Christos Zoulas 
-
-  

svn commit: r303301 - in stable: 10/usr.bin/bsdiff/bspatch 9/usr.bin/bsdiff/bspatch

2016-07-25 Thread Xin LI
Author: delphij
Date: Mon Jul 25 14:53:04 2016
New Revision: 303301
URL: https://svnweb.freebsd.org/changeset/base/303301

Log:
  Fix bspatch heap overflow vulnerability.
  
  Obtained from:Chromium
  Reported by:  Lu Tung-Pin
  Security: FreeBSD-SA-16:25.bspatch

Modified:
  stable/10/usr.bin/bsdiff/bspatch/bspatch.c

Changes in other areas also in this revision:
Modified:
  stable/9/usr.bin/bsdiff/bspatch/bspatch.c

Modified: stable/10/usr.bin/bsdiff/bspatch/bspatch.c
==
--- stable/10/usr.bin/bsdiff/bspatch/bspatch.c  Mon Jul 25 14:52:12 2016
(r303300)
+++ stable/10/usr.bin/bsdiff/bspatch/bspatch.c  Mon Jul 25 14:53:04 2016
(r303301)
@@ -155,6 +155,10 @@ int main(int argc,char * argv[])
};
 
/* Sanity-check */
+   if ((ctrl[0] < 0) || (ctrl[1] < 0))
+   errx(1,"Corrupt patch\n");
+
+   /* Sanity-check */
if(newpos+ctrl[0]>newsize)
errx(1,"Corrupt patch\n");
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r303280 - stable/10/usr.bin/mail

2016-07-24 Thread Xin LI
Author: delphij
Date: Mon Jul 25 00:46:01 2016
New Revision: 303280
URL: https://svnweb.freebsd.org/changeset/base/303280

Log:
  MFC r302542:
  
  Use _PATH_DEVNULL instead of hardcoding.

Modified:
  stable/10/usr.bin/mail/collect.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/mail/collect.c
==
--- stable/10/usr.bin/mail/collect.cSun Jul 24 23:40:33 2016
(r303279)
+++ stable/10/usr.bin/mail/collect.cMon Jul 25 00:46:01 2016
(r303280)
@@ -339,9 +339,9 @@ cont:
int nullfd, tempfd, rc;
char tempname2[PATHSIZE];
 
-   if ((nullfd = open("/dev/null", O_RDONLY, 0))
+   if ((nullfd = open(_PATH_DEVNULL, O_RDONLY, 0))
== -1) {
-   warn("/dev/null");
+   warn(_PATH_DEVNULL);
break;
}
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r302385 - in stable/10/contrib/expat: . doc examples lib tests tests/benchmark xmlwf

2016-07-06 Thread Xin LI
Author: delphij
Date: Thu Jul  7 04:59:58 2016
New Revision: 302385
URL: https://svnweb.freebsd.org/changeset/base/302385

Log:
  MFC r302305: MFV r302260: expat 2.2.0.

Added:
  stable/10/contrib/expat/configure.ac
 - copied unchanged from r302305, head/contrib/expat/configure.ac
  stable/10/contrib/expat/doc/xmlwf.xml
 - copied unchanged from r302305, head/contrib/expat/doc/xmlwf.xml
Deleted:
  stable/10/contrib/expat/configure.in
  stable/10/contrib/expat/doc/xmlwf.sgml
Modified:
  stable/10/contrib/expat/COPYING
  stable/10/contrib/expat/Changes
  stable/10/contrib/expat/MANIFEST
  stable/10/contrib/expat/Makefile.in
  stable/10/contrib/expat/README
  stable/10/contrib/expat/doc/expat.png   (contents, props changed)
  stable/10/contrib/expat/doc/reference.html
  stable/10/contrib/expat/doc/xmlwf.1
  stable/10/contrib/expat/examples/elements.c
  stable/10/contrib/expat/examples/outline.c
  stable/10/contrib/expat/expat_config.h.in
  stable/10/contrib/expat/lib/expat.h
  stable/10/contrib/expat/lib/expat_external.h
  stable/10/contrib/expat/lib/internal.h
  stable/10/contrib/expat/lib/xmlparse.c
  stable/10/contrib/expat/lib/xmlrole.c
  stable/10/contrib/expat/lib/xmltok.c
  stable/10/contrib/expat/lib/xmltok.h
  stable/10/contrib/expat/lib/xmltok_impl.c
  stable/10/contrib/expat/tests/benchmark/README.txt
  stable/10/contrib/expat/tests/chardata.c
  stable/10/contrib/expat/tests/minicheck.c
  stable/10/contrib/expat/tests/minicheck.h
  stable/10/contrib/expat/tests/runtests.c
  stable/10/contrib/expat/tests/xmltest.sh
  stable/10/contrib/expat/xmlwf/codepage.c
  stable/10/contrib/expat/xmlwf/readfilemap.c
  stable/10/contrib/expat/xmlwf/unixfilemap.c
  stable/10/contrib/expat/xmlwf/xmlfile.c
  stable/10/contrib/expat/xmlwf/xmlwf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/expat/COPYING
==
--- stable/10/contrib/expat/COPYING Thu Jul  7 03:39:18 2016
(r302384)
+++ stable/10/contrib/expat/COPYING Thu Jul  7 04:59:58 2016
(r302385)
@@ -1,6 +1,5 @@
-Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
-   and Clark Cooper
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
+Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
+Copyright (c) 2001-2016 Expat maintainers
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the

Modified: stable/10/contrib/expat/Changes
==
--- stable/10/contrib/expat/Changes Thu Jul  7 03:39:18 2016
(r302384)
+++ stable/10/contrib/expat/Changes Thu Jul  7 04:59:58 2016
(r302385)
@@ -1,3 +1,67 @@
+Release 2.2.0 Tue June 21 2016
+Security fixes:
+#537  CVE-2016-0718 -- Fix crash on malformed input
+  CVE-2016-4472 -- Improve insufficient fix to CVE-2015-1283 /
+   CVE-2015-2716 introduced with Expat 2.1.1
+#499  CVE-2016-5300 -- Use more entropy for hash initialization
+   than the original fix to CVE-2012-0876
+#519  CVE-2012-6702 -- Resolve troublesome internal call to srand
+   that was introduced with Expat 2.1.0
+   when addressing CVE-2012-0876 (issue #496)
+
+Bug fixes:
+  Fix uninitialized reads of size 1
+(e.g. in little2_updatePosition)
+  Fix detection of UTF-8 character boundaries
+
+Other changes:
+#532  Fix compilation for Visual Studio 2010 (keyword "C99")
+  Autotools: Resolve use of "$<" to better support bmake
+  Autotools: Add QA script "qa.sh" (and make target "qa")
+  Autotools: Respect CXXFLAGS if given
+  Autotools: Fix "make run-xmltest"
+  Autotools: Have "make run-xmltest" check for expected output
+ p90  CMake: Fix static build (BUILD_shared=OFF) on Windows
+#536  CMake: Add soversion, support -DNO_SONAME=yes to bypass
+#323  CMake: Add suffix "d" to differentiate debug from release
+  CMake: Define WIN32 with CMake on Windows
+  Annotate memory allocators for GCC
+  Address all currently known compile warnings
+  Make sure that API symbols remain visible despite
+-fvisibility=hidden
+  Remove executable flag from source files
+  Resolve COMPILED_FROM_DSP in favor of WIN32
+
+Special thanks to:
+Björn Lindahl
+Christian Heimes
+Cristian Rodríguez
+Daniel Krügler
+Gustavo Grieco
+

svn commit: r302555 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src lib/libmagic

2016-07-11 Thread Xin LI
Author: delphij
Date: Mon Jul 11 07:35:58 2016
New Revision: 302555
URL: https://svnweb.freebsd.org/changeset/base/302555

Log:
  MFC r302221,30:
  
  MFV r302218: file 5.28.
  
  Relnotes: yes

Added:
  stable/10/contrib/file/magic/Magdir/ber
 - copied unchanged from r302221, head/contrib/file/magic/Magdir/ber
  stable/10/contrib/file/magic/Magdir/coverage
 - copied unchanged from r302221, head/contrib/file/magic/Magdir/coverage
  stable/10/contrib/file/magic/Magdir/pc88
 - copied unchanged from r302221, head/contrib/file/magic/Magdir/pc88
  stable/10/contrib/file/magic/Magdir/pc98
 - copied unchanged from r302221, head/contrib/file/magic/Magdir/pc98
  stable/10/contrib/file/magic/Magdir/x68000
 - copied unchanged from r302221, head/contrib/file/magic/Magdir/x68000
Deleted:
  stable/10/contrib/file/src/magic.h
Modified:
  stable/10/contrib/file/ChangeLog
  stable/10/contrib/file/config.h.in
  stable/10/contrib/file/configure
  stable/10/contrib/file/configure.ac
  stable/10/contrib/file/doc/file.man
  stable/10/contrib/file/magic/Magdir/c-lang
  stable/10/contrib/file/magic/Magdir/console
  stable/10/contrib/file/magic/Magdir/database
  stable/10/contrib/file/magic/Magdir/elf
  stable/10/contrib/file/magic/Magdir/msdos
  stable/10/contrib/file/magic/Magdir/msx
  stable/10/contrib/file/magic/Magdir/perl
  stable/10/contrib/file/magic/Makefile.am
  stable/10/contrib/file/magic/Makefile.in
  stable/10/contrib/file/src/Makefile.am
  stable/10/contrib/file/src/Makefile.in
  stable/10/contrib/file/src/apprentice.c
  stable/10/contrib/file/src/cdf.c
  stable/10/contrib/file/src/compress.c
  stable/10/contrib/file/src/der.c
  stable/10/contrib/file/src/file.c
  stable/10/contrib/file/src/softmagic.c
  stable/10/lib/libmagic/Makefile
  stable/10/lib/libmagic/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/file/ChangeLog
==
--- stable/10/contrib/file/ChangeLogMon Jul 11 07:28:15 2016
(r302554)
+++ stable/10/contrib/file/ChangeLogMon Jul 11 07:35:58 2016
(r302555)
@@ -1,3 +1,15 @@
+2016-06-13  19:40  Christos Zoulas 
+
+   * release 5.28
+   * fix leak on allocation failure
+
+2016-06-01   1:20  Christos Zoulas 
+
+   * PR/555: Avoid overflow for offset > nbytes
+   * PR/550: Segv on DER parsing:
+   - use the correct variable for length
+   - set offset to 0 on failure.
+
 2016-05-13  12:00  Christos Zoulas 

* release 5.27

Modified: stable/10/contrib/file/config.h.in
==
--- stable/10/contrib/file/config.h.in  Mon Jul 11 07:28:15 2016
(r302554)
+++ stable/10/contrib/file/config.h.in  Mon Jul 11 07:35:58 2016
(r302555)
@@ -328,6 +328,9 @@
 # endif
 #endif
 
+/* Enable zlib compression support */
+#undef ZLIBSUPPORT
+
 /* Enable large inode numbers on Mac OS X 10.5.  */
 #ifndef _DARWIN_USE_64_BIT_INODE
 # define _DARWIN_USE_64_BIT_INODE 1

Modified: stable/10/contrib/file/configure
==
--- stable/10/contrib/file/configureMon Jul 11 07:28:15 2016
(r302554)
+++ stable/10/contrib/file/configureMon Jul 11 07:35:58 2016
(r302555)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for file 5.27.
+# Generated by GNU Autoconf 2.69 for file 5.28.
 #
 # Report bugs to .
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='file'
 PACKAGE_TARNAME='file'
-PACKAGE_VERSION='5.27'
-PACKAGE_STRING='file 5.27'
+PACKAGE_VERSION='5.28'
+PACKAGE_STRING='file 5.28'
 PACKAGE_BUGREPORT='chris...@astron.com'
 PACKAGE_URL=''
 
@@ -766,6 +766,7 @@ enable_option_checking
 enable_silent_rules
 enable_elf
 enable_elf_core
+enable_zlib
 enable_fsect_man5
 enable_dependency_tracking
 enable_static
@@ -1327,7 +1328,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures file 5.27 to adapt to many kinds of systems.
+\`configure' configures file 5.28 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1397,7 +1398,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
- short | recursive ) echo "Configuration of file 5.27:";;
+ short | recursive ) echo "Configuration of file 5.28:";;
esac
   cat <<\_ACEOF
 
@@ -1409,6 +1410,7 @@ Optional Features:
   --disable-silent-rules  verbose build output (undo: "make V=0")
   --disable-elfdisable builtin ELF support
   --disable-elf-core   disable ELF core file support
+  

svn commit: r313324 - stable/10/usr.bin/mail

2017-02-05 Thread Xin LI
Author: delphij
Date: Mon Feb  6 05:34:47 2017
New Revision: 313324
URL: https://svnweb.freebsd.org/changeset/base/313324

Log:
  MFC r312663: When creating record file, use umask 077 instead of the default.

Modified:
  stable/10/usr.bin/mail/send.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/mail/send.c
==
--- stable/10/usr.bin/mail/send.c   Mon Feb  6 05:29:35 2017
(r313323)
+++ stable/10/usr.bin/mail/send.c   Mon Feb  6 05:34:47 2017
(r313324)
@@ -566,8 +566,13 @@ savemail(char name[], FILE *fi)
char buf[BUFSIZ];
int i;
time_t now;
+   mode_t saved_umask;
 
-   if ((fo = Fopen(name, "a")) == NULL) {
+   saved_umask = umask(077);
+   fo = Fopen(name, "a");
+   umask(saved_umask);
+
+   if (fo == NULL) {
warn("%s", name);
return (-1);
}
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r313320 - stable/10/usr.bin/mail

2017-02-05 Thread Xin LI
Author: delphij
Date: Mon Feb  6 05:24:17 2017
New Revision: 313320
URL: https://svnweb.freebsd.org/changeset/base/313320

Log:
  MFC r312664: Always initialize 'c'.

Modified:
  stable/10/usr.bin/mail/send.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/mail/send.c
==
--- stable/10/usr.bin/mail/send.c   Mon Feb  6 05:22:55 2017
(r313319)
+++ stable/10/usr.bin/mail/send.c   Mon Feb  6 05:24:17 2017
(r313320)
@@ -59,7 +59,7 @@ sendmessage(struct message *mp, FILE *ob
FILE *ibuf;
char *cp, *cp2, line[LINESIZE];
int ishead, infld, ignoring, dostat, firstline;
-   int c, length, prefixlen;
+   int c = 0, length, prefixlen;
 
/*
 * Compute the prefix string, without trailing whitespace
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r312863 - stable/10/crypto/openssl/crypto/evp

2017-01-26 Thread Xin LI
Author: delphij
Date: Fri Jan 27 07:45:06 2017
New Revision: 312863
URL: https://svnweb.freebsd.org/changeset/base/312863

Log:
  Backport OpenSSL commit 56336b6c7a75ed28067cadedd8ac46572348bc2f:
  
  crypto/evp: harden RC4_MD5 cipher.
  
  Originally a crash in 32-bit build was reported CHACHA20-POLY1305
  cipher. The crash is triggered by truncated packet and is result
  of excessive hashing to the edge of accessible memory (or bogus
  MAC value is produced if x86 MD5 assembly module is involved). Since
  hash operation is read-only it is not considered to be exploitable
  beyond a DoS condition.
  
  Thanks to Robert Święcki for report.
  
  This is a direct commit to stable/10.
  
  Security: CVE-2017-3731

Modified:
  stable/10/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c

Modified: stable/10/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c
==
--- stable/10/crypto/openssl/crypto/evp/e_rc4_hmac_md5.cFri Jan 27 
05:59:26 2017(r312862)
+++ stable/10/crypto/openssl/crypto/evp/e_rc4_hmac_md5.cFri Jan 27 
07:45:06 2017(r312863)
@@ -267,6 +267,8 @@ static int rc4_hmac_md5_ctrl(EVP_CIPHER_
 len = p[arg - 2] << 8 | p[arg - 1];
 
 if (!ctx->encrypt) {
+if (len < MD5_DIGEST_LENGTH)
+return -1;
 len -= MD5_DIGEST_LENGTH;
 p[arg - 2] = len >> 8;
 p[arg - 1] = len;
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

svn commit: r313796 - in stable/10: contrib/zlib contrib/zlib/contrib contrib/zlib/test lib/libz

2017-02-15 Thread Xin LI
Author: delphij
Date: Thu Feb 16 06:16:50 2017
New Revision: 313796
URL: https://svnweb.freebsd.org/changeset/base/313796

Log:
  MFC r311285,312335: zlib 1.2.11.

Modified:
  stable/10/contrib/zlib/ChangeLog
  stable/10/contrib/zlib/README
  stable/10/contrib/zlib/adler32.c
  stable/10/contrib/zlib/compress.c
  stable/10/contrib/zlib/contrib/README.contrib
  stable/10/contrib/zlib/crc32.c
  stable/10/contrib/zlib/deflate.c
  stable/10/contrib/zlib/deflate.h
  stable/10/contrib/zlib/gzguts.h
  stable/10/contrib/zlib/gzlib.c
  stable/10/contrib/zlib/gzread.c
  stable/10/contrib/zlib/gzwrite.c
  stable/10/contrib/zlib/infback.c
  stable/10/contrib/zlib/inffast.c
  stable/10/contrib/zlib/inflate.c
  stable/10/contrib/zlib/inflate.h
  stable/10/contrib/zlib/inftrees.c
  stable/10/contrib/zlib/test/example.c
  stable/10/contrib/zlib/test/infcover.c
  stable/10/contrib/zlib/test/minigzip.c
  stable/10/contrib/zlib/trees.c
  stable/10/contrib/zlib/uncompr.c
  stable/10/contrib/zlib/zconf.h
  stable/10/contrib/zlib/zconf.h.in
  stable/10/contrib/zlib/zlib.3
  stable/10/contrib/zlib/zlib.h
  stable/10/contrib/zlib/zlib.map
  stable/10/contrib/zlib/zutil.c
  stable/10/contrib/zlib/zutil.h
  stable/10/lib/libz/Symbol.map
  stable/10/lib/libz/Versions.def
  stable/10/lib/libz/zlib.pc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/zlib/ChangeLog
==
--- stable/10/contrib/zlib/ChangeLogThu Feb 16 06:16:23 2017
(r313795)
+++ stable/10/contrib/zlib/ChangeLogThu Feb 16 06:16:50 2017
(r313796)
@@ -1,10 +1,53 @@
 
 ChangeLog file for zlib
 
+Changes in 1.2.11 (15 Jan 2017)
+- Fix deflate stored bug when pulling last block from window
+- Permit immediate deflateParams changes before any deflate input
+
+Changes in 1.2.10 (2 Jan 2017)
+- Avoid warnings on snprintf() return value
+- Fix bug in deflate_stored() for zero-length input
+- Fix bug in gzwrite.c that produced corrupt gzip files
+- Remove files to be installed before copying them in Makefile.in
+- Add warnings when compiling with assembler code
+
+Changes in 1.2.9 (31 Dec 2016)
+- Fix contrib/minizip to permit unzipping with desktop API [Zouzou]
+- Improve contrib/blast to return unused bytes
+- Assure that gzoffset() is correct when appending
+- Improve compress() and uncompress() to support large lengths
+- Fix bug in test/example.c where error code not saved
+- Remedy Coverity warning [Randers-Pehrson]
+- Improve speed of gzprintf() in transparent mode
+- Fix inflateInit2() bug when windowBits is 16 or 32
+- Change DEBUG macro to ZLIB_DEBUG
+- Avoid uninitialized access by gzclose_w()
+- Allow building zlib outside of the source directory
+- Fix bug that accepted invalid zlib header when windowBits is zero
+- Fix gzseek() problem on MinGW due to buggy _lseeki64 there
+- Loop on write() calls in gzwrite.c in case of non-blocking I/O
+- Add --warn (-w) option to ./configure for more compiler warnings
+- Reject a window size of 256 bytes if not using the zlib wrapper
+- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE
+- Add --debug (-d) option to ./configure to define ZLIB_DEBUG
+- Fix bugs in creating a very large gzip header
+- Add uncompress2() function, which returns the input size used
+- Assure that deflateParams() will not switch functions mid-block
+- Dramatically speed up deflation for level 0 (storing)
+- Add gzfread(), duplicating the interface of fread()
+- Add gzfwrite(), duplicating the interface of fwrite()
+- Add deflateGetDictionary() function
+- Use snprintf() for later versions of Microsoft C
+- Fix *Init macros to use z_ prefix when requested
+- Replace as400 with os400 for OS/400 support [Monnerat]
+- Add crc32_z() and adler32_z() functions with size_t lengths
+- Update Visual Studio project files [AraHaan]
+
 Changes in 1.2.8 (28 Apr 2013)
 - Update contrib/minizip/iowin32.c for Windows RT [Vollant]
 - Do not force Z_CONST for C++
-- Clean up contrib/vstudio [Ro�]
+- Clean up contrib/vstudio [Roß]
 - Correct spelling error in zlib.h
 - Fix mixed line endings in contrib/vstudio
 
@@ -34,7 +77,7 @@ Changes in 1.2.7.1 (24 Mar 2013)
 - Clean up the usage of z_const and respect const usage within zlib
 - Clean up examples/gzlog.[ch] comparisons of different types
 - Avoid shift equal to bits in type (caused endless loop)
-- Fix unintialized value bug in gzputc() introduced by const patches
+- Fix uninitialized value bug in gzputc() introduced by const patches
 - Fix memory allocation error in examples/zran.c [Nor]
 - Fix bug where gzopen(), gzclose() would write an empty file
 - Fix bug in gzclose() when gzwrite() runs out of memory
@@ -194,7 +237,7 @@ Changes in 1.2.5.2 (17 Dec 2011)
 - Add a transparent write mode to gzopen() when 'T' is in the mode
 - Update python link in zlib man page
 - Get inffixed.h and MAKEFIXED result to match
-- Add a ./config --solo option to make zlib subset with no libary 

svn commit: r313534 - stable/10

2017-02-09 Thread Xin LI
Author: delphij
Date: Fri Feb 10 06:58:18 2017
New Revision: 313534
URL: https://svnweb.freebsd.org/changeset/base/313534

Log:
  MFC r274583: Default to use 10 seconds as nap interval instead of 1.
  (the mergeinfo portion; actual code changes were committed from wrong
  directory).

Modified:
Directory Properties:
  stable/10/   (props changed)
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r313533 - stable/10/usr.sbin/watchdogd

2017-02-09 Thread Xin LI
Author: delphij
Date: Fri Feb 10 06:53:48 2017
New Revision: 313533
URL: https://svnweb.freebsd.org/changeset/base/313533

Log:
  MFC r274583: Default to use 10 seconds as nap interval instead of 1.

Modified:
  stable/10/usr.sbin/watchdogd/watchdogd.8
  stable/10/usr.sbin/watchdogd/watchdogd.c

Modified: stable/10/usr.sbin/watchdogd/watchdogd.8
==
--- stable/10/usr.sbin/watchdogd/watchdogd.8Fri Feb 10 06:34:52 2017
(r313532)
+++ stable/10/usr.sbin/watchdogd/watchdogd.8Fri Feb 10 06:53:48 2017
(r313533)
@@ -80,7 +80,7 @@ reboot if there are problems with the sc
 The
 .Fl s Ar sleep
 argument can be used to control the sleep period between each execution
-of the check and defaults to one second.
+of the check and defaults to 10 seconds.
 .Pp
 The
 .Fl t Ar timeout

Modified: stable/10/usr.sbin/watchdogd/watchdogd.c
==
--- stable/10/usr.sbin/watchdogd/watchdogd.cFri Feb 10 06:34:52 2017
(r313532)
+++ stable/10/usr.sbin/watchdogd/watchdogd.cFri Feb 10 06:53:48 2017
(r313533)
@@ -80,7 +80,7 @@ static u_int timeout = WD_TO_128SEC;
 static u_int exit_timeout = WD_TO_NEVER;
 static u_int pretimeout = 0;
 static u_int timeout_sec;
-static u_int nap = 1;
+static u_int nap = 10;
 static int passive = 0;
 static int is_daemon = 0;
 static int is_dry_run = 0;  /* do not arm the watchdog, only
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r312403 - in stable/10: lib/libstand sys/boot/libstand32 sys/boot/userboot/libstand

2017-01-18 Thread Xin LI
Author: delphij
Date: Thu Jan 19 07:29:52 2017
New Revision: 312403
URL: https://svnweb.freebsd.org/changeset/base/312403

Log:
  MFC r293040,293341,293435:
  
  Reduce libstand Makefile duplication.
  
  PR:   216251

Modified:
  stable/10/lib/libstand/Makefile
  stable/10/sys/boot/libstand32/Makefile
  stable/10/sys/boot/userboot/libstand/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libstand/Makefile
==
--- stable/10/lib/libstand/Makefile Thu Jan 19 06:48:03 2017
(r312402)
+++ stable/10/lib/libstand/Makefile Thu Jan 19 07:29:52 2017
(r312403)
@@ -9,16 +9,20 @@
 .include 
 MK_SSP=no
 
+LIBSTAND_SRC?= ${.CURDIR}
+LIBSTAND_CPUARCH?=${MACHINE_CPUARCH}
+LIBC_SRC=  ${LIBSTAND_SRC}/../libc
+
 LIB=   stand
 NO_PROFILE=
 NO_PIC=
-INCS=  stand.h
-MAN=   libstand.3
+INCS?= stand.h
+MAN?=  libstand.3
 
 WARNS?=0
 
 CFLAGS+= -ffreestanding -Wformat
-CFLAGS+= -I${.CURDIR}
+CFLAGS+= -I${LIBSTAND_SRC}
 
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
 CFLAGS+=   -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
@@ -50,12 +54,12 @@ SRCS+=  gzguts.h zutil.h __main.c assert.
 # private (pruned) versions of libc string functions
 SRCS+= strcasecmp.c
 
-.PATH: ${.CURDIR}/../libc/net
+.PATH: ${LIBC_SRC}/net
 
 SRCS+= ntoh.c
 
 # string functions from libc
-.PATH: ${.CURDIR}/../libc/string
+.PATH: ${LIBC_SRC}/string
 .if ${MACHINE_CPUARCH} != "ia64"
 SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
@@ -63,60 +67,60 @@ SRCS+=  bcmp.c bcopy.c bzero.c ffs.c memc
strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
 .endif
 .if ${MACHINE_CPUARCH} == "arm"
-.PATH: ${.CURDIR}/../libc/arm/gen
+.PATH: ${LIBC_SRC}/arm/gen
 
 .if ${MK_ARM_EABI} == "no"
 SRCS+= divsi3.S
 .else
 # Compiler support functions
-.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/
+.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/
 # __clzsi2 and ctzsi2 for various builtin functions
 SRCS+= clzsi2.c ctzsi2.c
 # Divide and modulus functions called by the compiler
 SRCS+=  divmoddi4.c  divmodsi4.c  divdi3.c  divsi3.c  moddi3.c  modsi3.c
 SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c
 
-.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm/
+.PATH: ${LIBSTAND_SRC}/../../contrib/compiler-rt/lib/arm/
 SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S
 SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S
 .endif
 
 .endif
 .if ${MACHINE_CPUARCH} == "ia64"
-.PATH: ${.CURDIR}/../libc/ia64/string
+.PATH: ${LIBC_SRC}/ia64/string
 SRCS+= bcmp.c bcopy.S bzero.S ffs.S memccpy.c memchr.c memcmp.c memcpy.S \
memmove.S memset.c strcat.c strchr.c strcmp.c strcpy.c strcspn.c \
strlcat.c strlcpy.c \
strlen.c strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
strspn.c strstr.c strtok.c swab.c
 
-.PATH: ${.CURDIR}/../libc/ia64/gen
+.PATH: ${LIBC_SRC}/ia64/gen
 SRCS+= __divdi3.S __divsi3.S __moddi3.S __modsi3.S
 SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S
 .endif
 .if ${MACHINE_CPUARCH} == "powerpc"
-.PATH: ${.CURDIR}/../libc/quad
+.PATH: ${LIBC_SRC}/quad
 SRCS+= ashldi3.c ashrdi3.c
-.PATH: ${.CURDIR}/../libc/powerpc/gen
+.PATH: ${LIBC_SRC}/powerpc/gen
 SRCS+= syncicache.c
 .endif
 
 # uuid functions from libc
-.PATH: ${.CURDIR}/../libc/uuid
+.PATH: ${LIBC_SRC}/uuid
 SRCS+= uuid_equal.c uuid_is_nil.c
 
 # _setjmp/_longjmp
 .if ${MACHINE_ARCH} == "powerpc64"
-.PATH: ${.CURDIR}/powerpc
+.PATH: ${LIBSTAND_SRC}/powerpc
 .else
-.PATH: ${.CURDIR}/${MACHINE_CPUARCH}
+.PATH: ${LIBSTAND_SRC}/${LIBSTAND_CPUARCH}
 .endif
 SRCS+= _setjmp.S
 
 # decompression functionality from libbz2
 # NOTE: to actually test this functionality after libbz2 upgrade compile
 # loader(8) with LOADER_BZIP2_SUPPORT defined
-.PATH: ${.CURDIR}/../../contrib/bzip2
+.PATH: ${LIBSTAND_SRC}/../../contrib/bzip2
 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS
 SRCS+= libstand_bzlib_private.h
 
@@ -134,8 +138,8 @@ libstand_bzlib_private.h: bzlib_private.
${.ALLSRC} > ${.TARGET}
 
 # decompression functionality from libz
-.PATH: ${.CURDIR}/../../contrib/zlib
-CFLAGS+=-DHAVE_MEMCPY -I${.CURDIR}/../../contrib/zlib
+.PATH: ${LIBSTAND_SRC}/../../contrib/zlib
+CFLAGS+=-DHAVE_MEMCPY -I${LIBSTAND_SRC}/../../contrib/zlib
 SRCS+= adler32.c crc32.c libstand_zutil.h libstand_gzguts.h
 
 .for file in infback.c inffast.c inflate.c inftrees.c zutil.c

Modified: stable/10/sys/boot/libstand32/Makefile
==
--- stable/10/sys/boot/libstand32/Makefile  Thu Jan 19 06:48:03 2017
(r312402)
+++ stable/10/sys/boot/libstand32/Makefile  Thu Jan 19 07:29:52 

svn commit: r312518 - in stable/10: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblzma/common contrib/xz/src/liblzma/delta contrib/...

2017-01-19 Thread Xin LI
Author: delphij
Date: Fri Jan 20 06:40:12 2017
New Revision: 312518
URL: https://svnweb.freebsd.org/changeset/base/312518

Log:
  MFC r311504: MFV r311477: xz 5.2.3.

Modified:
  stable/10/contrib/xz/ChangeLog
  stable/10/contrib/xz/THANKS
  stable/10/contrib/xz/src/common/tuklib_cpucores.c
  stable/10/contrib/xz/src/common/tuklib_physmem.c
  stable/10/contrib/xz/src/liblzma/api/lzma/version.h
  stable/10/contrib/xz/src/liblzma/check/check.h
  stable/10/contrib/xz/src/liblzma/common/alone_decoder.c
  stable/10/contrib/xz/src/liblzma/common/alone_encoder.c
  stable/10/contrib/xz/src/liblzma/common/auto_decoder.c
  stable/10/contrib/xz/src/liblzma/common/block_decoder.c
  stable/10/contrib/xz/src/liblzma/common/block_encoder.c
  stable/10/contrib/xz/src/liblzma/common/common.h
  stable/10/contrib/xz/src/liblzma/common/index.c
  stable/10/contrib/xz/src/liblzma/common/index_decoder.c
  stable/10/contrib/xz/src/liblzma/common/index_encoder.c
  stable/10/contrib/xz/src/liblzma/common/stream_decoder.c
  stable/10/contrib/xz/src/liblzma/common/stream_encoder.c
  stable/10/contrib/xz/src/liblzma/common/stream_encoder_mt.c
  stable/10/contrib/xz/src/liblzma/delta/delta_common.c
  stable/10/contrib/xz/src/liblzma/delta/delta_decoder.c
  stable/10/contrib/xz/src/liblzma/delta/delta_encoder.c
  stable/10/contrib/xz/src/liblzma/delta/delta_private.h
  stable/10/contrib/xz/src/liblzma/lz/lz_decoder.c
  stable/10/contrib/xz/src/liblzma/lz/lz_decoder.h
  stable/10/contrib/xz/src/liblzma/lz/lz_encoder.c
  stable/10/contrib/xz/src/liblzma/lz/lz_encoder.h
  stable/10/contrib/xz/src/liblzma/lzma/lzma2_decoder.c
  stable/10/contrib/xz/src/liblzma/lzma/lzma2_encoder.c
  stable/10/contrib/xz/src/liblzma/lzma/lzma_decoder.c
  stable/10/contrib/xz/src/liblzma/lzma/lzma_encoder.c
  stable/10/contrib/xz/src/liblzma/lzma/lzma_encoder.h
  stable/10/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c
  stable/10/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c
  stable/10/contrib/xz/src/liblzma/lzma/lzma_encoder_presets.c
  stable/10/contrib/xz/src/liblzma/lzma/lzma_encoder_private.h
  stable/10/contrib/xz/src/liblzma/simple/arm.c
  stable/10/contrib/xz/src/liblzma/simple/armthumb.c
  stable/10/contrib/xz/src/liblzma/simple/ia64.c
  stable/10/contrib/xz/src/liblzma/simple/powerpc.c
  stable/10/contrib/xz/src/liblzma/simple/simple_coder.c
  stable/10/contrib/xz/src/liblzma/simple/simple_private.h
  stable/10/contrib/xz/src/liblzma/simple/sparc.c
  stable/10/contrib/xz/src/liblzma/simple/x86.c
  stable/10/contrib/xz/src/xz/args.c
  stable/10/contrib/xz/src/xz/coder.c
  stable/10/contrib/xz/src/xz/file_io.c
  stable/10/contrib/xz/src/xz/file_io.h
  stable/10/contrib/xz/src/xz/main.c
  stable/10/contrib/xz/src/xz/private.h
  stable/10/lib/liblzma/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/xz/ChangeLog
==
--- stable/10/contrib/xz/ChangeLog  Fri Jan 20 06:38:56 2017
(r312517)
+++ stable/10/contrib/xz/ChangeLog  Fri Jan 20 06:40:12 2017
(r312518)
@@ -1,3 +1,563 @@
+commit 3d566cd519017eee1a400e7961ff14058dfaf33c
+Author: Lasse Collin 
+Date:   2016-12-30 13:26:36 +0200
+
+Bump version and soname for 5.2.3.
+
+ src/liblzma/Makefile.am| 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 053e624fe33795e779ff736f16ce44a129c829b5
+Author: Lasse Collin 
+Date:   2016-12-30 13:25:10 +0200
+
+Update NEWS for 5.2.3.
+
+ NEWS | 39 +++
+ 1 file changed, 39 insertions(+)
+
+commit cae412b2b77d7fd88d187ed7659331709311f80d
+Author: Lasse Collin 
+Date:   2015-04-01 14:45:25 +0300
+
+xz: Fix the Capsicum rights on user_abort_pipe.
+
+ src/xz/file_io.c | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 9ccbae41000572193b9a09e7102f9e84dc6d96de
+Author: Lasse Collin 
+Date:   2016-12-28 21:05:22 +0200
+
+Mention potential sandboxing bugs in INSTALL.
+
+ INSTALL | 5 -
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit e013a337d3de77cce24360dffe956ea2339489b6
+Author: Lasse Collin 
+Date:   2016-11-21 20:24:50 +0200
+
+liblzma: Avoid multiple definitions of lzma_coder structures.
+
+Only one definition was visible in a translation unit.
+It avoided a few casts and temp variables but seems that
+this hack doesn't work with link-time optimizations in compilers
+as it's not C99/C11 compliant.
+
+Fixes:
+http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html
+
+ src/liblzma/common/alone_decoder.c |  44 +
+ src/liblzma/common/alone_encoder.c |  34 ---
+ src/liblzma/common/auto_decoder.c  |  35 ---
+ src/liblzma/common/block_decoder.c   

svn commit: r305649 - stable/10/usr.sbin/portsnap/portsnap

2016-09-09 Thread Xin LI
Author: delphij
Date: Fri Sep  9 06:59:49 2016
New Revision: 305649
URL: https://svnweb.freebsd.org/changeset/base/305649

Log:
  MFC r305469:
  
  Ensure that we always open only files that is named by explicitly
  using shell redirections instead of having gzip(1) to decide what
  file to open.
  
  Issue reported in the "non-cryptanalytic attacks against freebsd
  update components" anonymous gist.
  
  Reviewed by:  allanjude, emaste

Modified:
  stable/10/usr.sbin/portsnap/portsnap/portsnap.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/portsnap/portsnap/portsnap.sh
==
--- stable/10/usr.sbin/portsnap/portsnap/portsnap.shFri Sep  9 06:59:01 
2016(r305648)
+++ stable/10/usr.sbin/portsnap/portsnap/portsnap.shFri Sep  9 06:59:49 
2016(r305649)
@@ -646,7 +646,7 @@ fetch_index_sanity() {
 # Verify a list of files
 fetch_snapshot_verify() {
while read F; do
-   if [ "`gunzip -c snap/${F} | ${SHA256} -q`" != ${F} ]; then
+   if [ "`gunzip -c < snap/${F}.gz | ${SHA256} -q`" != ${F} ]; then
echo "snapshot corrupt."
return 1
fi
@@ -681,7 +681,7 @@ fetch_snapshot() {
cut -f 2 -d '|' tINDEX.new | fetch_snapshot_verify || return 1
 # Extract the index
rm -f INDEX.new
-   gunzip -c snap/`look INDEX tINDEX.new |
+   gunzip -c < snap/`look INDEX tINDEX.new |
cut -f 2 -d '|'`.gz > INDEX.new
fetch_index_sanity || return 1
 # Verify the snapshot contents
@@ -777,7 +777,7 @@ fetch_update() {
 
 # Extract the index
echo -n "Extracting index... " 1>${QUIETREDIR}
-   gunzip -c files/`look INDEX tINDEX.new |
+   gunzip -c < files/`look INDEX tINDEX.new |
cut -f 2 -d '|'`.gz > INDEX.new
fetch_index_sanity || return 1
 
@@ -897,7 +897,7 @@ extract_make_index() {
echo -n "$1 not provided by portsnap server; "
echo "$2 not being generated."
else
-   gunzip -c "${WORKDIR}/files/`look $1 ${WORKDIR}/tINDEX |
+   gunzip -c < "${WORKDIR}/files/`look $1 ${WORKDIR}/tINDEX |
cut -f 2 -d '|'`.gz" |
cat - ${LOCALDESC} |
${MKINDEX} /dev/stdin > ${PORTSDIR}/$2
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r309008 - in stable/10: contrib/ntp contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/lib/isc contrib/ntp/libntp contrib/ntp/libparse contrib/ntp/ntpd contrib/nt...

2016-11-22 Thread Xin LI
Author: delphij
Date: Tue Nov 22 16:23:20 2016
New Revision: 309008
URL: https://svnweb.freebsd.org/changeset/base/309008

Log:
  MFC r308957: MFV r308954:
  
  ntp 4.2.8p9.
  
  Approved by:  so

Added:
  stable/10/contrib/ntp/include/libssl_compat.h
 - copied unchanged from r308957, head/contrib/ntp/include/libssl_compat.h
  stable/10/contrib/ntp/libntp/libssl_compat.c
 - copied unchanged from r308957, head/contrib/ntp/libntp/libssl_compat.c
  stable/10/contrib/ntp/sntp/unity/ulib_setup.c
 - copied unchanged from r308957, head/contrib/ntp/sntp/unity/ulib_setup.c
  stable/10/contrib/ntp/sntp/unity/ulib_teardown.c
 - copied unchanged from r308957, 
head/contrib/ntp/sntp/unity/ulib_teardown.c
Modified:
  stable/10/contrib/ntp/ChangeLog
  stable/10/contrib/ntp/CommitLog
  stable/10/contrib/ntp/NEWS
  stable/10/contrib/ntp/configure
  stable/10/contrib/ntp/html/drivers/driver40-ja.html
  stable/10/contrib/ntp/html/drivers/driver40.html
  stable/10/contrib/ntp/html/miscopt.html
  stable/10/contrib/ntp/include/Makefile.am
  stable/10/contrib/ntp/include/Makefile.in
  stable/10/contrib/ntp/include/ntp.h
  stable/10/contrib/ntp/include/ntp_intres.h
  stable/10/contrib/ntp/include/ntpd.h
  stable/10/contrib/ntp/lib/isc/netaddr.c
  stable/10/contrib/ntp/libntp/Makefile.am
  stable/10/contrib/ntp/libntp/Makefile.in
  stable/10/contrib/ntp/libntp/a_md5encrypt.c
  stable/10/contrib/ntp/libntp/audio.c
  stable/10/contrib/ntp/libntp/ntp_calendar.c
  stable/10/contrib/ntp/libntp/ntp_intres.c
  stable/10/contrib/ntp/libntp/ssl_init.c
  stable/10/contrib/ntp/libntp/work_fork.c
  stable/10/contrib/ntp/libparse/clk_hopf6021.c
  stable/10/contrib/ntp/ntpd/complete.conf.in
  stable/10/contrib/ntp/ntpd/invoke-ntp.conf.texi
  stable/10/contrib/ntp/ntpd/invoke-ntp.keys.texi
  stable/10/contrib/ntp/ntpd/invoke-ntpd.texi
  stable/10/contrib/ntp/ntpd/keyword-gen-utd
  stable/10/contrib/ntp/ntpd/keyword-gen.c
  stable/10/contrib/ntp/ntpd/ntp.conf.5man
  stable/10/contrib/ntp/ntpd/ntp.conf.5mdoc
  stable/10/contrib/ntp/ntpd/ntp.conf.def
  stable/10/contrib/ntp/ntpd/ntp.conf.html
  stable/10/contrib/ntp/ntpd/ntp.conf.man.in
  stable/10/contrib/ntp/ntpd/ntp.conf.mdoc.in
  stable/10/contrib/ntp/ntpd/ntp.keys.5man
  stable/10/contrib/ntp/ntpd/ntp.keys.5mdoc
  stable/10/contrib/ntp/ntpd/ntp.keys.html
  stable/10/contrib/ntp/ntpd/ntp.keys.man.in
  stable/10/contrib/ntp/ntpd/ntp.keys.mdoc.in
  stable/10/contrib/ntp/ntpd/ntp_config.c
  stable/10/contrib/ntp/ntpd/ntp_control.c
  stable/10/contrib/ntp/ntpd/ntp_crypto.c
  stable/10/contrib/ntp/ntpd/ntp_keyword.h
  stable/10/contrib/ntp/ntpd/ntp_loopfilter.c
  stable/10/contrib/ntp/ntpd/ntp_parser.c
  stable/10/contrib/ntp/ntpd/ntp_parser.h
  stable/10/contrib/ntp/ntpd/ntp_peer.c
  stable/10/contrib/ntp/ntpd/ntp_proto.c
  stable/10/contrib/ntp/ntpd/ntp_refclock.c
  stable/10/contrib/ntp/ntpd/ntpd-opts.c
  stable/10/contrib/ntp/ntpd/ntpd-opts.h
  stable/10/contrib/ntp/ntpd/ntpd.1ntpdman
  stable/10/contrib/ntp/ntpd/ntpd.1ntpdmdoc
  stable/10/contrib/ntp/ntpd/ntpd.html
  stable/10/contrib/ntp/ntpd/ntpd.man.in
  stable/10/contrib/ntp/ntpd/ntpd.mdoc.in
  stable/10/contrib/ntp/ntpd/refclock_gpsdjson.c
  stable/10/contrib/ntp/ntpd/refclock_jjy.c
  stable/10/contrib/ntp/ntpd/refclock_jupiter.c
  stable/10/contrib/ntp/ntpdc/invoke-ntpdc.texi
  stable/10/contrib/ntp/ntpdc/ntpdc-opts.c
  stable/10/contrib/ntp/ntpdc/ntpdc-opts.h
  stable/10/contrib/ntp/ntpdc/ntpdc.1ntpdcman
  stable/10/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc
  stable/10/contrib/ntp/ntpdc/ntpdc.html
  stable/10/contrib/ntp/ntpdc/ntpdc.man.in
  stable/10/contrib/ntp/ntpdc/ntpdc.mdoc.in
  stable/10/contrib/ntp/ntpq/invoke-ntpq.texi
  stable/10/contrib/ntp/ntpq/ntpq-opts.c
  stable/10/contrib/ntp/ntpq/ntpq-opts.h
  stable/10/contrib/ntp/ntpq/ntpq.1ntpqman
  stable/10/contrib/ntp/ntpq/ntpq.1ntpqmdoc
  stable/10/contrib/ntp/ntpq/ntpq.c
  stable/10/contrib/ntp/ntpq/ntpq.html
  stable/10/contrib/ntp/ntpq/ntpq.man.in
  stable/10/contrib/ntp/ntpq/ntpq.mdoc.in
  stable/10/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.html
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in
  stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in
  stable/10/contrib/ntp/packageinfo.sh
  stable/10/contrib/ntp/scripts/build/genAuthors.in
  stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman
  stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc
  stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html
  stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in
  stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in
  stable/10/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi
  stable/10/contrib/ntp/scripts/invoke-plot_summary.texi
  

svn commit: r308200 - in stable: 10/crypto/openssl/ssl 9/crypto/openssl/ssl

2016-11-02 Thread Xin LI
Author: delphij
Date: Wed Nov  2 07:09:31 2016
New Revision: 308200
URL: https://svnweb.freebsd.org/changeset/base/308200

Log:
  Backport OpenSSL commit af58be768ebb690f78530f796e92b8ae5c9a4401:
  
Don't allow too many consecutive warning alerts
  
Certain warning alerts are ignored if they are received. This can mean that
no progress will be made if one peer continually sends those warning alerts.
Implement a count so that we abort the connection if we receive too many.
  
Issue reported by Shi Lei.
  
  This is a direct commit to stable/10 and stable/9.
  
  Security: CVE-2016-8610

Modified:
  stable/10/crypto/openssl/ssl/d1_pkt.c
  stable/10/crypto/openssl/ssl/s3_pkt.c
  stable/10/crypto/openssl/ssl/ssl.h
  stable/10/crypto/openssl/ssl/ssl3.h
  stable/10/crypto/openssl/ssl/ssl_locl.h

Changes in other areas also in this revision:
Modified:
  stable/9/crypto/openssl/ssl/d1_pkt.c
  stable/9/crypto/openssl/ssl/s3_pkt.c
  stable/9/crypto/openssl/ssl/ssl.h
  stable/9/crypto/openssl/ssl/ssl3.h
  stable/9/crypto/openssl/ssl/ssl_locl.h

Modified: stable/10/crypto/openssl/ssl/d1_pkt.c
==
--- stable/10/crypto/openssl/ssl/d1_pkt.c   Wed Nov  2 06:58:47 2016
(r308199)
+++ stable/10/crypto/openssl/ssl/d1_pkt.c   Wed Nov  2 07:09:31 2016
(r308200)
@@ -924,6 +924,13 @@ int dtls1_read_bytes(SSL *s, int type, u
 goto start;
 }
 
+/*
+ * Reset the count of consecutive warning alerts if we've got a non-empty
+ * record that isn't an alert.
+ */
+if (rr->type != SSL3_RT_ALERT && rr->length != 0)
+s->s3->alert_count = 0;
+
 /* we now have a packet which can be read and processed */
 
 if (s->s3->change_cipher_spec /* set when we receive ChangeCipherSpec,
@@ -1190,6 +1197,14 @@ int dtls1_read_bytes(SSL *s, int type, u
 
 if (alert_level == SSL3_AL_WARNING) {
 s->s3->warn_alert = alert_descr;
+
+s->s3->alert_count++;
+if (s->s3->alert_count == MAX_WARN_ALERT_COUNT) {
+al = SSL_AD_UNEXPECTED_MESSAGE;
+SSLerr(SSL_F_DTLS1_READ_BYTES, SSL_R_TOO_MANY_WARN_ALERTS);
+goto f_err;
+}
+
 if (alert_descr == SSL_AD_CLOSE_NOTIFY) {
 #ifndef OPENSSL_NO_SCTP
 /*

Modified: stable/10/crypto/openssl/ssl/s3_pkt.c
==
--- stable/10/crypto/openssl/ssl/s3_pkt.c   Wed Nov  2 06:58:47 2016
(r308199)
+++ stable/10/crypto/openssl/ssl/s3_pkt.c   Wed Nov  2 07:09:31 2016
(r308200)
@@ -1057,6 +1057,13 @@ int ssl3_read_bytes(SSL *s, int type, un
 return (ret);
 }
 
+/*
+ * Reset the count of consecutive warning alerts if we've got a non-empty
+ * record that isn't an alert.
+ */
+if (rr->type != SSL3_RT_ALERT && rr->length != 0)
+s->s3->alert_count = 0;
+
 /* we now have a packet which can be read and processed */
 
 if (s->s3->change_cipher_spec /* set when we receive ChangeCipherSpec,
@@ -1271,6 +1278,14 @@ int ssl3_read_bytes(SSL *s, int type, un
 
 if (alert_level == SSL3_AL_WARNING) {
 s->s3->warn_alert = alert_descr;
+
+s->s3->alert_count++;
+if (s->s3->alert_count == MAX_WARN_ALERT_COUNT) {
+al = SSL_AD_UNEXPECTED_MESSAGE;
+SSLerr(SSL_F_SSL3_READ_BYTES, SSL_R_TOO_MANY_WARN_ALERTS);
+goto f_err;
+}
+
 if (alert_descr == SSL_AD_CLOSE_NOTIFY) {
 s->shutdown |= SSL_RECEIVED_SHUTDOWN;
 return (0);

Modified: stable/10/crypto/openssl/ssl/ssl.h
==
--- stable/10/crypto/openssl/ssl/ssl.h  Wed Nov  2 06:58:47 2016
(r308199)
+++ stable/10/crypto/openssl/ssl/ssl.h  Wed Nov  2 07:09:31 2016
(r308200)
@@ -2717,6 +2717,7 @@ void ERR_load_SSL_strings(void);
 # define SSL_R_TLS_HEARTBEAT_PENDING  366
 # define SSL_R_TLS_ILLEGAL_EXPORTER_LABEL 367
 # define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST 157
+# define SSL_R_TOO_MANY_WARN_ALERTS   409
 # define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233
 # define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG234
 # define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER235

Modified: stable/10/crypto/openssl/ssl/ssl3.h
==
--- stable/10/crypto/openssl/ssl/ssl3.h Wed Nov  2 06:58:47 2016
(r308199)
+++ stable/10/crypto/openssl/ssl/ssl3.h Wed Nov  2 07:09:31 2016
(r308200)
@@ -587,6 +587,8 @@ typedef struct ssl3_state_st {
 char is_probably_safari;
 #   endif   /* !OPENSSL_NO_EC */
 #  endif/* !OPENSSL_NO_TLSEXT */
+/* 

svn commit: r308199 - stable/10/crypto/openssh

2016-11-02 Thread Xin LI
Author: delphij
Date: Wed Nov  2 06:58:47 2016
New Revision: 308199
URL: https://svnweb.freebsd.org/changeset/base/308199

Log:
  MFC r308197: MFV r308196:
  
  Fix OpenSSH remote Denial of Service vulnerability.
  
  Security: CVE-2016-8858

Modified:
  stable/10/crypto/openssh/kex.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/crypto/openssh/kex.c
==
--- stable/10/crypto/openssh/kex.c  Wed Nov  2 06:56:35 2016
(r308198)
+++ stable/10/crypto/openssh/kex.c  Wed Nov  2 06:58:47 2016
(r308199)
@@ -468,6 +468,7 @@ kex_input_kexinit(int type, u_int32_t se
if (kex == NULL)
return SSH_ERR_INVALID_ARGUMENT;
 
+   ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL);
ptr = sshpkt_ptr(ssh, );
if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
return r;
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r309789 - stable/10/usr.bin/gzip

2016-12-09 Thread Xin LI
Author: delphij
Date: Sat Dec 10 06:27:45 2016
New Revision: 309789
URL: https://svnweb.freebsd.org/changeset/base/309789

Log:
  MFC r309184:
  
  style(9) indent changes, no actual code change.

Modified:
  stable/10/usr.bin/gzip/unpack.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/gzip/unpack.c
==
--- stable/10/usr.bin/gzip/unpack.c Sat Dec 10 06:24:26 2016
(r309788)
+++ stable/10/usr.bin/gzip/unpack.c Sat Dec 10 06:27:45 2016
(r309789)
@@ -68,22 +68,22 @@
  * leaf nodes count.
  */
 typedef struct {
-   int symbol_size;/* Size of the symbol table */
-   int treelevels; /* Levels for the huffman tree */
+   int symbol_size;/* Size of the symbol table */
+   int treelevels; /* Levels for the huffman tree */
 
-   int *symbolsin; /* Table of leaf symbols count in
-  each level */
-   int *inodesin;  /* Table of internal nodes count in
-  each level */
-
-   char*symbol;/* The symbol table */
-   char*symbol_eob;/* Pointer to the EOB symbol */
-   char**tree; /* Decoding huffman tree (pointers to
-  first symbol of each tree level */
-
-   off_t   uncompressed_size; /* Uncompressed size */
-   FILE*fpIn;  /* Input stream */
-   FILE*fpOut; /* Output stream */
+   int*symbolsin;  /* Table of leaf symbols count in each
+* level */
+   int*inodesin;   /* Table of internal nodes count in
+* each level */
+
+   char   *symbol; /* The symbol table */
+   char   *symbol_eob; /* Pointer to the EOB symbol */
+   char  **tree;   /* Decoding huffman tree (pointers to
+* first symbol of each tree level */
+
+   off_t   uncompressed_size;  /* Uncompressed size */
+   FILE   *fpIn;   /* Input stream */
+   FILE   *fpOut;  /* Output stream */
 } unpack_descriptor_t;
 
 /*
@@ -122,7 +122,7 @@ unpackd_fill_inodesin(const unpack_descr
if (level < unpackd->treelevels) {
unpackd_fill_inodesin(unpackd, level + 1);
unpackd->inodesin[level] = (unpackd->inodesin[level + 1] +
- unpackd->symbolsin[level + 1]) / 2;
+   unpackd->symbolsin[level + 1]) / 2;
} else
unpackd->inodesin[level] = 0;
 }
@@ -163,7 +163,7 @@ unpack_parse_header(int in, int out, cha
 
accepted_bytes(bytes_in, PACK_HEADER_LENGTH);
 
-   /* Obtain uncompressed length (bytes 2,3,4,5)*/
+   /* Obtain uncompressed length (bytes 2,3,4,5) */
unpackd->uncompressed_size = 0;
for (i = 2; i <= 5; i++) {
unpackd->uncompressed_size <<= 8;
@@ -187,7 +187,7 @@ unpack_parse_header(int in, int out, cha
unpackd->symbolsin =
calloc(unpackd->treelevels, sizeof(*(unpackd->symbolsin)));
unpackd->tree =
-   calloc(unpackd->treelevels, (sizeof (*(unpackd->tree;
+   calloc(unpackd->treelevels, (sizeof(*(unpackd->tree;
if (unpackd->inodesin == NULL || unpackd->symbolsin == NULL ||
unpackd->tree == NULL)
maybe_err("calloc");
@@ -196,7 +196,7 @@ unpack_parse_header(int in, int out, cha
unpackd->treelevels--;
 
/* Read the levels symbol count table and calculate total */
-   unpackd->symbol_size = 1;   /* EOB */
+   unpackd->symbol_size = 1;   /* EOB */
for (i = 0; i <= unpackd->treelevels; i++) {
if ((thisbyte = fgetc(unpackd->fpIn)) == EOF)
maybe_err("File appears to be truncated");
@@ -310,7 +310,7 @@ finished:
 static off_t
 unpack(int in, int out, char *pre, size_t prelen, off_t *bytes_in)
 {
-   unpack_descriptor_t unpackd;
+   unpack_descriptor_t unpackd;
 
in = dup(in);
if (in == -1)
@@ -326,4 +326,3 @@ unpack(int in, int out, char *pre, size_
/* If we reached here, the unpack was successful */
return (unpackd.uncompressed_size);
 }
-
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r309848 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src lib/libmagic

2016-12-10 Thread Xin LI
Author: delphij
Date: Sun Dec 11 07:37:20 2016
New Revision: 309848
URL: https://svnweb.freebsd.org/changeset/base/309848

Log:
  MFC r308420: MFV r308392: file 5.29.

Added:
  stable/10/contrib/file/magic/Magdir/algol68
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/algol68
  stable/10/contrib/file/magic/Magdir/application
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/application
  stable/10/contrib/file/magic/Magdir/apt
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/apt
  stable/10/contrib/file/magic/Magdir/psl
 - copied unchanged from r308420, head/contrib/file/magic/Magdir/psl
Modified:
  stable/10/contrib/file/ChangeLog
  stable/10/contrib/file/TODO
  stable/10/contrib/file/config.guess
  stable/10/contrib/file/config.sub
  stable/10/contrib/file/configure
  stable/10/contrib/file/configure.ac
  stable/10/contrib/file/doc/file.man
  stable/10/contrib/file/doc/magic.man
  stable/10/contrib/file/ltmain.sh
  stable/10/contrib/file/magic/Magdir/animation
  stable/10/contrib/file/magic/Magdir/apple
  stable/10/contrib/file/magic/Magdir/bioinformatics
  stable/10/contrib/file/magic/Magdir/c-lang
  stable/10/contrib/file/magic/Magdir/claris
  stable/10/contrib/file/magic/Magdir/commands
  stable/10/contrib/file/magic/Magdir/compress
  stable/10/contrib/file/magic/Magdir/cups
  stable/10/contrib/file/magic/Magdir/editors
  stable/10/contrib/file/magic/Magdir/filesystems
  stable/10/contrib/file/magic/Magdir/fonts
  stable/10/contrib/file/magic/Magdir/gcc
  stable/10/contrib/file/magic/Magdir/gnu
  stable/10/contrib/file/magic/Magdir/images
  stable/10/contrib/file/magic/Magdir/jpeg
  stable/10/contrib/file/magic/Magdir/msdos
  stable/10/contrib/file/magic/Magdir/pgp
  stable/10/contrib/file/magic/Magdir/python
  stable/10/contrib/file/magic/Magdir/ruby
  stable/10/contrib/file/magic/Magdir/sgml
  stable/10/contrib/file/magic/Magdir/sql
  stable/10/contrib/file/magic/Makefile.am
  stable/10/contrib/file/magic/Makefile.in
  stable/10/contrib/file/python/magic.py
  stable/10/contrib/file/src/apprentice.c
  stable/10/contrib/file/src/ascmagic.c
  stable/10/contrib/file/src/cdf.c
  stable/10/contrib/file/src/cdf.h
  stable/10/contrib/file/src/compress.c
  stable/10/contrib/file/src/der.c
  stable/10/contrib/file/src/file.c
  stable/10/contrib/file/src/file.h
  stable/10/contrib/file/src/funcs.c
  stable/10/contrib/file/src/magic.c
  stable/10/contrib/file/src/readcdf.c
  stable/10/contrib/file/src/readelf.c
  stable/10/contrib/file/src/softmagic.c
  stable/10/lib/libmagic/config.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/file/ChangeLog
==
--- stable/10/contrib/file/ChangeLogSun Dec 11 07:33:02 2016
(r309847)
+++ stable/10/contrib/file/ChangeLogSun Dec 11 07:37:20 2016
(r309848)
@@ -1,3 +1,32 @@
+2016-10-25  10:40  Christos Zoulas 
+   
+   * release 5.28
+
+2016-10-24  11:20  Christos Zoulas 
+
+   * der getlength overflow (Jonas Wagner)
+   * multiple magic file load failure (Christoph Biedl)
+
+2016-10-17  11:26  Christos Zoulas 
+
+   * CDF parsing improvements (Guy Helmer)
+
+2016-07-20   7:26  Christos Zoulas 
+
+   * Add support for signed indirect offsets
+
+2016-07-18   7:41  Christos Zoulas 
+
+   * cat /dev/null | file - should print empty (Christoph Biedl)
+
+2016-07-05  15:20  Christos Zoulas 
+
+   * Bump string size from 64 to 96.
+
+2016-06-13  20:20  Christos Zoulas 
+
+   * PR/556: Fix separators on annotations.
+
 2016-06-13  19:40  Christos Zoulas 
 
* release 5.28

Modified: stable/10/contrib/file/TODO
==
--- stable/10/contrib/file/TODO Sun Dec 11 07:33:02 2016(r309847)
+++ stable/10/contrib/file/TODO Sun Dec 11 07:37:20 2016(r309848)
@@ -6,7 +6,6 @@ file, not here. More speculative materia
 listed in the BUGS section of the man page had been fixed!)
 
 ---
-
 It would be nice to simplify file considerably. For example,
 reimplement the apprentice and non-pattern magic methods in Python,
 and compile the magic patterns to a giant regex (or something similar;
@@ -15,8 +14,23 @@ small amount of C is needed (because fas
 required for soft magic, not the more detailed information given by
 hard-wired routines). In this regard, note that hplip, which is
 BSD-licensed, has a magic reimplementation in Python.
-
+---
 Read the kerberos magic entry for more ideas.
-
+---
 Write a string merger to make magic entry sizes dynamic.
 Strings will be converted to offsets from the string table.
+---
+Programming language support, we can introduce the concept of a group
+of rules where n rules need to 

svn commit: r309867 - stable/10/bin/kenv

2016-12-11 Thread Xin LI
Author: delphij
Date: Mon Dec 12 02:14:42 2016
New Revision: 309867
URL: https://svnweb.freebsd.org/changeset/base/309867

Log:
  MFC r309238,309239:
  
  r309238: Plug a potential memory leak.
  r309239: style(9).

Modified:
  stable/10/bin/kenv/kenv.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/kenv/kenv.c
==
--- stable/10/bin/kenv/kenv.c   Mon Dec 12 02:13:35 2016(r309866)
+++ stable/10/bin/kenv/kenv.c   Mon Dec 12 02:14:42 2016(r309867)
@@ -63,7 +63,6 @@ main(int argc, char **argv)
char *env, *eq, *val;
int ch, error;
 
-   error = 0;
val = NULL;
env = NULL;
while ((ch = getopt(argc, argv, "hNquv")) != -1) {
@@ -128,7 +127,7 @@ main(int argc, char **argv)
 static int
 kdumpenv(void)
 {
-   char *buf, *cp;
+   char *buf, *bp, *cp;
int buflen, envlen;
 
envlen = kenv(KENV_DUMP, NULL, NULL, 0);
@@ -136,10 +135,9 @@ kdumpenv(void)
return (-1);
for (;;) {
buflen = envlen * 120 / 100;
-   buf = malloc(buflen + 1);
+   buf = calloc(1, buflen + 1);
if (buf == NULL)
return (-1);
-   memset(buf, 0, buflen + 1); /* Be defensive */
envlen = kenv(KENV_DUMP, NULL, buf, buflen);
if (envlen < 0) {
free(buf);
@@ -151,21 +149,23 @@ kdumpenv(void)
break;
}
 
-   for (; *buf != '\0'; buf += strlen(buf) + 1) {
+   for (bp = buf; *bp != '\0'; bp += strlen(bp) + 1) {
if (hflag) {
-   if (strncmp(buf, "hint.", 5) != 0)
+   if (strncmp(bp, "hint.", 5) != 0)
continue;
}
-   cp = strchr(buf, '=');
+   cp = strchr(bp, '=');
if (cp == NULL)
continue;
*cp++ = '\0';
if (Nflag)
-   printf("%s\n", buf);
+   printf("%s\n", bp);
else
-   printf("%s=\"%s\"\n", buf, cp);
-   buf = cp;
+   printf("%s=\"%s\"\n", bp, cp);
+   bp = cp;
}
+
+   free(buf);
return (0);
 }
 
@@ -190,7 +190,7 @@ ksetenv(const char *env, char *val)
 {
int ret;
 
-   ret = kenv(KENV_SET, env, val, strlen(val)+1);
+   ret = kenv(KENV_SET, env, val, strlen(val) + 1);
if (ret == 0)
printf("%s=\"%s\"\n", env, val);
return (ret);
@@ -200,7 +200,7 @@ static int
 kunsetenv(const char *env)
 {
int ret;
-   
+
ret = kenv(KENV_UNSET, env, NULL, 0);
return (ret);
 }
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r309862 - stable/10/usr.bin/sort

2016-12-11 Thread Xin LI
Author: delphij
Date: Mon Dec 12 00:47:12 2016
New Revision: 309862
URL: https://svnweb.freebsd.org/changeset/base/309862

Log:
  MFC r309232-309234:
  
  r309232: Fix an obvious typo.
  r309233: Eliminate variables that are computed, assigned but
   never used.
  r309234: pages and psize are always assigned, so there is no
   need to initialize them as zero.

Modified:
  stable/10/usr.bin/sort/bwstring.c
  stable/10/usr.bin/sort/sort.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/sort/bwstring.c
==
--- stable/10/usr.bin/sort/bwstring.c   Mon Dec 12 00:45:43 2016
(r309861)
+++ stable/10/usr.bin/sort/bwstring.c   Mon Dec 12 00:47:12 2016
(r309862)
@@ -910,7 +910,6 @@ bws_month_score(const struct bwstring *s
 
if (MB_CUR_MAX == 1) {
const unsigned char *end, *s;
-   size_t len;
 
s = s0->data.cstr;
end = s + s0->len;
@@ -918,8 +917,6 @@ bws_month_score(const struct bwstring *s
while (isblank(*s) && s < end)
++s;
 
-   len = strlen((const char*)s);
-
for (int i = 11; i >= 0; --i) {
if (cmonths[i] &&
(s == (unsigned char*)strstr((const char*)s, 
(char*)(cmonths[i]
@@ -928,7 +925,6 @@ bws_month_score(const struct bwstring *s
 
} else {
const wchar_t *end, *s;
-   size_t len;
 
s = s0->data.wstr;
end = s + s0->len;
@@ -936,8 +932,6 @@ bws_month_score(const struct bwstring *s
while (iswblank(*s) && s < end)
++s;
 
-   len = wcslen(s);
-
for (int i = 11; i >= 0; --i) {
if (wmonths[i] && (s == wcsstr(s, wmonths[i])))
return (i);

Modified: stable/10/usr.bin/sort/sort.c
==
--- stable/10/usr.bin/sort/sort.c   Mon Dec 12 00:45:43 2016
(r309861)
+++ stable/10/usr.bin/sort/sort.c   Mon Dec 12 00:47:12 2016
(r309862)
@@ -209,14 +209,10 @@ sort_modifier_empty(struct sort_mods *sm
 static void
 usage(bool opt_err)
 {
-   struct option *o;
FILE *out;
 
-   out = stdout;
-   o = &(long_options[0]);
+   out = opt_err ? stderr : stdout;
 
-   if (opt_err)
-   out = stderr;
fprintf(out, getstr(12), getprogname());
if (opt_err)
exit(2);
@@ -271,8 +267,6 @@ set_hw_params(void)
 {
long pages, psize;
 
-   pages = psize = 0;
-
 #if defined(SORT_THREADS)
ncpu = 1;
 #endif
@@ -280,7 +274,7 @@ set_hw_params(void)
pages = sysconf(_SC_PHYS_PAGES);
if (pages < 1) {
perror("sysconf pages");
-   psize = 1;
+   pages = 1;
}
psize = sysconf(_SC_PAGESIZE);
if (psize < 1) {
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r311753 - stable/10/usr.sbin/pstat

2017-01-08 Thread Xin LI
Author: delphij
Date: Mon Jan  9 05:58:48 2017
New Revision: 311753
URL: https://svnweb.freebsd.org/changeset/base/311753

Log:
  MFC r310611:
  
   - pstat(8) does not accept any arguments other than getopt() args,
 so don't bother to adjust argc/argv after getopt() loop.
   - Make a string pointer constant.

Modified:
  stable/10/usr.sbin/pstat/pstat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pstat/pstat.c
==
--- stable/10/usr.sbin/pstat/pstat.cMon Jan  9 05:57:31 2017
(r311752)
+++ stable/10/usr.sbin/pstat/pstat.cMon Jan  9 05:58:48 2017
(r311753)
@@ -174,8 +174,6 @@ main(int argc, char *argv[])
default:
usage();
}
-   argc -= optind;
-   argv += optind;
 
/*
 * Initialize symbol names list.
@@ -339,7 +337,7 @@ static void
 ttyprt(struct xtty *xt)
 {
int i, j;
-   char *name;
+   const char *name;
 
if (xt->xt_size != sizeof *xt)
errx(1, "struct xtty size mismatch");
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r311756 - stable/10/usr.sbin/jail

2017-01-08 Thread Xin LI
Author: delphij
Date: Mon Jan  9 06:07:44 2017
New Revision: 311756
URL: https://svnweb.freebsd.org/changeset/base/311756

Log:
  MFC r310614: Don't assign rtjp twice.

Modified:
  stable/10/usr.sbin/jail/jail.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/jail/jail.c
==
--- stable/10/usr.sbin/jail/jail.c  Mon Jan  9 06:05:57 2017
(r311755)
+++ stable/10/usr.sbin/jail/jail.c  Mon Jan  9 06:07:44 2017
(r311756)
@@ -806,8 +806,7 @@ rdtun_params(struct cfjail *j, int dofai
if (jailparam_get(rtparams, nrt,
bool_param(j->intparams[IP_ALLOW_DYING]) ? JAIL_DYING : 0) > 0) {
rtjp = rtparams + 1;
-   for (jp = j->jp, rtjp = rtparams + 1; rtjp < rtparams + nrt;
-jp++) {
+   for (jp = j->jp; rtjp < rtparams + nrt; jp++) {
if (JP_RDTUN(jp) && strcmp(jp->jp_name, "jid")) {
if (!((jp->jp_flags & (JP_BOOL | JP_NOBOOL)) &&
jp->jp_valuelen == 0 &&
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r311747 - stable/10/libexec/talkd

2017-01-08 Thread Xin LI
Author: delphij
Date: Mon Jan  9 05:44:19 2017
New Revision: 311747
URL: https://svnweb.freebsd.org/changeset/base/311747

Log:
  MFC r310608: Avoid use after free.

Modified:
  stable/10/libexec/talkd/table.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/libexec/talkd/table.c
==
--- stable/10/libexec/talkd/table.c Mon Jan  9 05:41:47 2017
(r311746)
+++ stable/10/libexec/talkd/table.c Mon Jan  9 05:44:19 2017
(r311747)
@@ -82,14 +82,15 @@ static TABLE_ENTRY *table = NIL;
 CTL_MSG *
 find_match(CTL_MSG *request)
 {
-   TABLE_ENTRY *ptr;
+   TABLE_ENTRY *ptr, *next;
time_t current_time;
 
gettimeofday(, NULL);
current_time = tp.tv_sec;
if (debug)
print_request("find_match", request);
-   for (ptr = table; ptr != NIL; ptr = ptr->next) {
+   for (ptr = table; ptr != NIL; ptr = next) {
+   next = ptr->next;
if ((ptr->time - current_time) > MAX_LIFE) {
/* the entry is too old */
if (debug)
@@ -115,7 +116,7 @@ find_match(CTL_MSG *request)
 CTL_MSG *
 find_request(CTL_MSG *request)
 {
-   TABLE_ENTRY *ptr;
+   TABLE_ENTRY *ptr, *next;
time_t current_time;
 
gettimeofday(, NULL);
@@ -126,7 +127,8 @@ find_request(CTL_MSG *request)
 */
if (debug)
print_request("find_request", request);
-   for (ptr = table; ptr != NIL; ptr = ptr->next) {
+   for (ptr = table; ptr != NIL; ptr = next) {
+   next = ptr->next;
if ((ptr->time - current_time) > MAX_LIFE) {
/* the entry is too old */
if (debug)
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r316069 - in stable/10: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contrib/ntp/kernel/sys co...

2017-03-27 Thread Xin LI
Author: delphij
Date: Tue Mar 28 04:48:55 2017
New Revision: 316069
URL: https://svnweb.freebsd.org/changeset/base/316069

Log:
  MFC r315871: MFV r315791: ntp 4.2.8p10.

Added:
  stable/10/contrib/ntp/sntp/harden/
 - copied from r315871, head/contrib/ntp/sntp/harden/
  stable/10/contrib/ntp/sntp/m4/ntp_harden.m4
 - copied unchanged from r315871, head/contrib/ntp/sntp/m4/ntp_harden.m4
  stable/10/contrib/ntp/sntp/scripts/genHardFlags
 - copied unchanged from r315871, head/contrib/ntp/sntp/scripts/genHardFlags
Deleted:
  stable/10/contrib/ntp/compile
  stable/10/contrib/ntp/config.guess
  stable/10/contrib/ntp/config.sub
  stable/10/contrib/ntp/depcomp
  stable/10/contrib/ntp/install-sh
  stable/10/contrib/ntp/ltmain.sh
  stable/10/contrib/ntp/missing
  stable/10/contrib/ntp/sntp/compile
  stable/10/contrib/ntp/sntp/config.guess
  stable/10/contrib/ntp/sntp/config.sub
  stable/10/contrib/ntp/sntp/depcomp
  stable/10/contrib/ntp/sntp/install-sh
  stable/10/contrib/ntp/sntp/ltmain.sh
  stable/10/contrib/ntp/sntp/missing
  stable/10/contrib/ntp/tests/
  stable/10/contrib/ntp/ylwrap
Modified:
  stable/10/contrib/ntp/COPYRIGHT
  stable/10/contrib/ntp/ChangeLog
  stable/10/contrib/ntp/CommitLog
  stable/10/contrib/ntp/Makefile.in
  stable/10/contrib/ntp/NEWS
  stable/10/contrib/ntp/aclocal.m4
  stable/10/contrib/ntp/adjtimed/Makefile.am
  stable/10/contrib/ntp/adjtimed/Makefile.in
  stable/10/contrib/ntp/clockstuff/Makefile.am
  stable/10/contrib/ntp/clockstuff/Makefile.in
  stable/10/contrib/ntp/config.h.in
  stable/10/contrib/ntp/configure
  stable/10/contrib/ntp/configure.ac
  stable/10/contrib/ntp/html/copyright.html
  stable/10/contrib/ntp/include/Makefile.in
  stable/10/contrib/ntp/include/isc/Makefile.in
  stable/10/contrib/ntp/include/libssl_compat.h
  stable/10/contrib/ntp/include/ntp_crypto.h
  stable/10/contrib/ntp/include/ntp_fp.h
  stable/10/contrib/ntp/include/ntp_md5.h
  stable/10/contrib/ntp/include/ntp_stdlib.h
  stable/10/contrib/ntp/include/ntpd.h
  stable/10/contrib/ntp/include/ssl_applink.c
  stable/10/contrib/ntp/kernel/Makefile.in
  stable/10/contrib/ntp/kernel/sys/Makefile.in
  stable/10/contrib/ntp/lib/isc/inet_pton.c
  stable/10/contrib/ntp/libntp/Makefile.am
  stable/10/contrib/ntp/libntp/Makefile.in
  stable/10/contrib/ntp/libntp/a_md5encrypt.c
  stable/10/contrib/ntp/libntp/audio.c
  stable/10/contrib/ntp/libntp/authkeys.c
  stable/10/contrib/ntp/libntp/emalloc.c
  stable/10/contrib/ntp/libntp/libssl_compat.c
  stable/10/contrib/ntp/libntp/ntp_intres.c
  stable/10/contrib/ntp/libntp/recvbuff.c
  stable/10/contrib/ntp/libntp/ssl_init.c
  stable/10/contrib/ntp/libntp/statestr.c
  stable/10/contrib/ntp/libntp/work_fork.c
  stable/10/contrib/ntp/libparse/Makefile.am
  stable/10/contrib/ntp/libparse/Makefile.in
  stable/10/contrib/ntp/libparse/clk_trimtsip.c
  stable/10/contrib/ntp/libparse/gpstolfp.c
  stable/10/contrib/ntp/ntpd/Makefile.am
  stable/10/contrib/ntp/ntpd/Makefile.in
  stable/10/contrib/ntp/ntpd/invoke-ntp.conf.texi
  stable/10/contrib/ntp/ntpd/invoke-ntp.keys.texi
  stable/10/contrib/ntp/ntpd/invoke-ntpd.texi
  stable/10/contrib/ntp/ntpd/ntp.conf.5man
  stable/10/contrib/ntp/ntpd/ntp.conf.5mdoc
  stable/10/contrib/ntp/ntpd/ntp.conf.html
  stable/10/contrib/ntp/ntpd/ntp.conf.man.in
  stable/10/contrib/ntp/ntpd/ntp.conf.mdoc.in
  stable/10/contrib/ntp/ntpd/ntp.keys.5man
  stable/10/contrib/ntp/ntpd/ntp.keys.5mdoc
  stable/10/contrib/ntp/ntpd/ntp.keys.html
  stable/10/contrib/ntp/ntpd/ntp.keys.man.in
  stable/10/contrib/ntp/ntpd/ntp.keys.mdoc.in
  stable/10/contrib/ntp/ntpd/ntp_config.c
  stable/10/contrib/ntp/ntpd/ntp_control.c
  stable/10/contrib/ntp/ntpd/ntp_crypto.c
  stable/10/contrib/ntp/ntpd/ntp_io.c
  stable/10/contrib/ntp/ntpd/ntp_loopfilter.c
  stable/10/contrib/ntp/ntpd/ntp_parser.c
  stable/10/contrib/ntp/ntpd/ntp_parser.h
  stable/10/contrib/ntp/ntpd/ntp_peer.c
  stable/10/contrib/ntp/ntpd/ntp_proto.c
  stable/10/contrib/ntp/ntpd/ntp_restrict.c
  stable/10/contrib/ntp/ntpd/ntp_scanner.c
  stable/10/contrib/ntp/ntpd/ntpd-opts.c
  stable/10/contrib/ntp/ntpd/ntpd-opts.h
  stable/10/contrib/ntp/ntpd/ntpd.1ntpdman
  stable/10/contrib/ntp/ntpd/ntpd.1ntpdmdoc
  stable/10/contrib/ntp/ntpd/ntpd.c
  stable/10/contrib/ntp/ntpd/ntpd.html
  stable/10/contrib/ntp/ntpd/ntpd.man.in
  stable/10/contrib/ntp/ntpd/ntpd.mdoc.in
  stable/10/contrib/ntp/ntpd/refclock_datum.c
  stable/10/contrib/ntp/ntpd/refclock_gpsdjson.c
  stable/10/contrib/ntp/ntpd/refclock_jjy.c
  stable/10/contrib/ntp/ntpd/refclock_mx4200.c
  stable/10/contrib/ntp/ntpd/refclock_nmea.c
  stable/10/contrib/ntp/ntpd/refclock_oncore.c
  stable/10/contrib/ntp/ntpd/refclock_parse.c
  stable/10/contrib/ntp/ntpdate/Makefile.am
  stable/10/contrib/ntp/ntpdate/Makefile.in
  stable/10/contrib/ntp/ntpdate/ntpdate.c
  stable/10/contrib/ntp/ntpdc/Makefile.am
  stable/10/contrib/ntp/ntpdc/Makefile.in
  stable/10/contrib/ntp/ntpdc/invoke-ntpdc.texi
  stable/10/contrib/ntp/ntpdc/ntpdc-opts.c
  

svn commit: r316440 - stable/10/share/man/man4

2017-04-03 Thread Xin LI
Author: delphij
Date: Mon Apr  3 06:09:12 2017
New Revision: 316440
URL: https://svnweb.freebsd.org/changeset/base/316440

Log:
  MFC r315619: pet manlint.

Modified:
  stable/10/share/man/man4/cpuctl.4
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/cpuctl.4
==
--- stable/10/share/man/man4/cpuctl.4   Mon Apr  3 06:07:40 2017
(r316439)
+++ stable/10/share/man/man4/cpuctl.4   Mon Apr  3 06:09:12 2017
(r316440)
@@ -160,7 +160,11 @@ field should point to the firmware image
 .Pp
 For additional information refer to
 .Pa cpuctl.h .
-.Sh RETURN VALUES
+.Sh FILES
+.Bl -tag -width /dev/cpuctl -compact
+.It Pa /dev/cpuctl
+.El
+.Sh ERRORS
 .Bl -tag -width Er
 .It Bq Er ENXIO
 The operation requested is not supported by the device (e.g., unsupported
@@ -172,10 +176,6 @@ No physical memory was available to comp
 .It Bq Er EFAULT
 The firmware image address points outside the process address space.
 .El
-.Sh FILES
-.Bl -tag -width /dev/cpuctl -compact
-.It Pa /dev/cpuctl
-.El
 .Sh SEE ALSO
 .Xr hwpmc 4 ,
 .Xr cpucontrol 8
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r316442 - stable/10/usr.bin/sed

2017-04-03 Thread Xin LI
Author: delphij
Date: Mon Apr  3 06:14:23 2017
New Revision: 316442
URL: https://svnweb.freebsd.org/changeset/base/316442

Log:
  MFC r312404, r312519, r313277:
  
  Use S_ISREG instead of manual & (also it's better to compare the
  result from & and the pattern instead of just assuming it's one bit
  value).
  
  Pointed out by Tianjie Mao .

Modified:
  stable/10/usr.bin/sed/main.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/sed/main.c
==
--- stable/10/usr.bin/sed/main.cMon Apr  3 06:13:05 2017
(r316441)
+++ stable/10/usr.bin/sed/main.cMon Apr  3 06:14:23 2017
(r316442)
@@ -391,7 +391,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag
if (inplace != NULL) {
if (lstat(fname, ) != 0)
err(1, "%s", fname);
-   if (!(sb.st_mode & S_IFREG))
+   if (!S_ISREG(sb.st_mode))
errx(1, "%s: %s %s", fname,
"in-place editing only",
"works for regular files");
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r315227 - in stable/10: lib/libc/gen sys/libkern

2017-03-14 Thread Xin LI
Author: delphij
Date: Tue Mar 14 06:12:51 2017
New Revision: 315227
URL: https://svnweb.freebsd.org/changeset/base/315227

Log:
  MFC r315225:
  
  Discard first 3072 bytes of RC4 keystream, this is a bandaid
  that allows us to work on switching to a more modern PRNG.
  
  Submitted by: Steven Chamberlain 
  Approved by:  so

Modified:
  stable/10/lib/libc/gen/arc4random.c
  stable/10/sys/libkern/arc4random.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/gen/arc4random.c
==
--- stable/10/lib/libc/gen/arc4random.c Tue Mar 14 06:10:40 2017
(r315226)
+++ stable/10/lib/libc/gen/arc4random.c Tue Mar 14 06:12:51 2017
(r315227)
@@ -172,7 +172,7 @@ arc4_stir(void)
 * Discard early keystream, as per recommendations in:
 * "(Not So) Random Shuffles of RC4" by Ilya Mironov.
 */
-   for (i = 0; i < 1024; i++)
+   for (i = 0; i < 3072; i++)
(void)arc4_getbyte();
arc4_count = 160;
 }

Modified: stable/10/sys/libkern/arc4random.c
==
--- stable/10/sys/libkern/arc4random.c  Tue Mar 14 06:10:40 2017
(r315226)
+++ stable/10/sys/libkern/arc4random.c  Tue Mar 14 06:12:51 2017
(r315227)
@@ -80,9 +80,9 @@ arc4_randomstir (void)
/*
 * Throw away the first N words of output, as suggested in the
 * paper "Weaknesses in the Key Scheduling Algorithm of RC4"
-* by Fluher, Mantin, and Shamir.  (N = 256 in our case.)
+* by Fluher, Mantin, and Shamir.  (N = 768 in our case.)
 */
-   for (n = 0; n < 256*4; n++)
+   for (n = 0; n < 768*4; n++)
arc4_randbyte();
mtx_unlock(_mtx);
 }
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r321905 - stable/10/sys/sys

2017-08-01 Thread Xin LI
Author: delphij
Date: Wed Aug  2 05:17:47 2017
New Revision: 321905
URL: https://svnweb.freebsd.org/changeset/base/321905

Log:
  MFC r321713:
  
  Bump copyright year.

Modified:
  stable/10/sys/sys/copyright.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/copyright.h
==
--- stable/10/sys/sys/copyright.h   Wed Aug  2 05:17:01 2017
(r321904)
+++ stable/10/sys/sys/copyright.h   Wed Aug  2 05:17:47 2017
(r321905)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 1992-2016 The FreeBSD Project. All rights reserved.
+ * Copyright (C) 1992-2017 The FreeBSD Project. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r321907 - stable/10/sbin/init

2017-08-01 Thread Xin LI
Author: delphij
Date: Wed Aug  2 05:47:26 2017
New Revision: 321907
URL: https://svnweb.freebsd.org/changeset/base/321907

Log:
  MFC r320761:
  
   - Use strlcat() instead of strncat().
   - Use asprintf() and handle allocation errors.

Modified:
  stable/10/sbin/init/init.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/init/init.c
==
--- stable/10/sbin/init/init.c  Wed Aug  2 05:30:41 2017(r321906)
+++ stable/10/sbin/init/init.c  Wed Aug  2 05:47:26 2017(r321907)
@@ -1278,8 +1278,8 @@ new_session(session_t *sprev, int session_index, struc
sp->se_index = session_index;
sp->se_flags |= SE_PRESENT;
 
-   sp->se_device = malloc(sizeof(_PATH_DEV) + strlen(typ->ty_name));
-   sprintf(sp->se_device, "%s%s", _PATH_DEV, typ->ty_name);
+   if (asprintf(>se_device, "%s%s", _PATH_DEV, typ->ty_name) < 0)
+   err(1, "asprintf");
 
/*
 * Attempt to open the device, if we get "device not configured"
@@ -1322,8 +1322,8 @@ setupargv(session_t *sp, struct ttyent *typ)
free(sp->se_getty_argv_space);
free(sp->se_getty_argv);
}
-   sp->se_getty = malloc(strlen(typ->ty_getty) + strlen(typ->ty_name) + 2);
-   sprintf(sp->se_getty, "%s %s", typ->ty_getty, typ->ty_name);
+   if (asprintf(>se_getty, "%s %s", typ->ty_getty, typ->ty_name) < 0)
+   err(1, "asprintf");
sp->se_getty_argv_space = strdup(sp->se_getty);
sp->se_getty_argv = construct_argv(sp->se_getty_argv_space);
if (sp->se_getty_argv == 0) {
@@ -1437,7 +1437,7 @@ start_window_system(session_t *sp)
if (sp->se_type) {
/* Don't use malloc after fork */
strcpy(term, "TERM=");
-   strncat(term, sp->se_type, sizeof(term) - 6);
+   strlcat(term, sp->se_type, sizeof(term));
env[0] = term;
env[1] = 0;
}
@@ -1501,7 +1501,7 @@ start_getty(session_t *sp)
if (sp->se_type) {
/* Don't use malloc after fork */
strcpy(term, "TERM=");
-   strncat(term, sp->se_type, sizeof(term) - 6);
+   strlcat(term, sp->se_type, sizeof(term));
env[0] = term;
env[1] = 0;
} else
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r322341 - in stable: 10/crypto/openssh 11/crypto/openssh

2017-08-10 Thread Xin LI
Author: delphij
Date: Thu Aug 10 06:36:37 2017
New Revision: 322341
URL: https://svnweb.freebsd.org/changeset/base/322341

Log:
  Apply upstream fix:
  
  Skip passwords longer than 1k in length so clients can't
  easily DoS sshd by sending very long passwords, causing it to spend CPU
  hashing them. feedback djm@, ok markus@.
  
  Brought to our attention by tomas.kuthan at oracle.com, shilei-c at
  360.cn and coredump at autistici.org
  
  Security: CVE-2016-6515
  Security: FreeBSD-SA-17:06.openssh

Modified:
  stable/10/crypto/openssh/auth-passwd.c

Changes in other areas also in this revision:
Modified:
  stable/11/crypto/openssh/auth-passwd.c

Modified: stable/10/crypto/openssh/auth-passwd.c
==
--- stable/10/crypto/openssh/auth-passwd.c  Thu Aug 10 05:38:31 2017
(r322340)
+++ stable/10/crypto/openssh/auth-passwd.c  Thu Aug 10 06:36:37 2017
(r322341)
@@ -66,6 +66,8 @@ extern login_cap_t *lc;
 #define DAY(24L * 60 * 60) /* 1 day in seconds */
 #define TWO_WEEKS  (2L * 7 * DAY)  /* 2 weeks in seconds */
 
+#define MAX_PASSWORD_LEN   1024
+
 void
 disable_forwarding(void)
 {
@@ -86,6 +88,9 @@ auth_password(Authctxt *authctxt, const char *password
 #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
static int expire_checked = 0;
 #endif
+
+   if (strlen(password) > MAX_PASSWORD_LEN)
+   return 0;
 
 #ifndef HAVE_CYGWIN
if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r320907 - in stable: 10/crypto/heimdal/lib/krb5 11/crypto/heimdal/lib/krb5

2017-07-12 Thread Xin LI
Author: delphij
Date: Wed Jul 12 07:26:07 2017
New Revision: 320907
URL: https://svnweb.freebsd.org/changeset/base/320907

Log:
  MFC r320906: MFV r320905: Import upstream fix for CVE-2017-11103.
  
  In _krb5_extract_ticket() the KDC-REP service name must be obtained from
  encrypted version stored in 'enc_part' instead of the unencrypted version
  stored in 'ticket'.  Use of the unecrypted version provides an
  opportunity for successful server impersonation and other attacks.
  
  Submitted by: hrs
  Obtained from:Heimdal
  Security: FreeBSD-SA-17:05.heimdal
  Security: CVE-2017-11103

Modified:
  stable/10/crypto/heimdal/lib/krb5/ticket.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/crypto/heimdal/lib/krb5/ticket.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/crypto/heimdal/lib/krb5/ticket.c
==
--- stable/10/crypto/heimdal/lib/krb5/ticket.c  Wed Jul 12 07:19:06 2017
(r320906)
+++ stable/10/crypto/heimdal/lib/krb5/ticket.c  Wed Jul 12 07:26:07 2017
(r320907)
@@ -713,8 +713,8 @@ _krb5_extract_ticket(krb5_context context,
 /* check server referral and save principal */
 ret = _krb5_principalname2krb5_principal (context,
  _principal,
- rep->kdc_rep.ticket.sname,
- rep->kdc_rep.ticket.realm);
+ rep->enc_part.sname,
+ rep->enc_part.srealm);
 if (ret)
goto out;
 if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


  1   2   >