svn commit: r241345 - head

2012-10-08 Thread Doug Barton
Author: dougb
Date: Mon Oct  8 10:34:49 2012
New Revision: 241345
URL: http://svn.freebsd.org/changeset/base/241345

Log:
  Remove my pre-commit review request for mergemaster

Modified:
  head/MAINTAINERS

Modified: head/MAINTAINERS
==
--- head/MAINTAINERSMon Oct  8 08:03:58 2012(r241344)
+++ head/MAINTAINERSMon Oct  8 10:34:49 2012(r241345)
@@ -21,7 +21,6 @@ It is not a registry of 'turf' or privat
 subsystem  login   notes
 -
 kqueue jmg Pre-commit review requested.
-mergemasterdougb   Prefers to pre-approve commits
 libc/posix1e   rwatson Pre-commit review requested.
 POSIX.1e ACLs  rwatson Pre-commit review requested.
 UFS EAsrwatson Pre-commit review requested.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r241218 - head/usr.sbin/mergemaster

2012-10-04 Thread Doug Barton
Author: dougb
Date: Fri Oct  5 05:01:42 2012
New Revision: 241218
URL: http://svn.freebsd.org/changeset/base/241218

Log:
  Remove references to CVS so that people will stop bringing it up
  
  For -p:
The localtime update should have been excluded in the first place
  
The make.conf comparison has been OBE for some time now, and there
is no src.conf equivalent to share/examples/make.conf, so remove
the whole thing.
  
  Update copyright

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shFri Oct  5 04:35:20 2012
(r241217)
+++ head/usr.sbin/mergemaster/mergemaster.shFri Oct  5 05:01:42 2012
(r241218)
@@ -5,8 +5,8 @@
 # Compare files created by /usr/src/etc/Makefile (or the directory
 # the user specifies) with the currently installed copies.
 
-# Copyright 1998-2011 Douglas Barton
-# do...@freebsd.org
+# Copyright (c) 1998-2012 Douglas Barton, All rights reserved
+# Please see detailed copyright below
 
 # $FreeBSD$
 
@@ -532,9 +532,9 @@ if [ -t 0 ]; then
   esac
 fi
 
-# Define what CVS $Id tag to look for to aid portability.
+# Define what $Id tag to look for to aid portability.
 #
-CVS_ID_TAG=FreeBSD
+ID_TAG=FreeBSD
 
 delete_temproot () {
   rm -rf "${TEMPROOT}" 2>/dev/null
@@ -1095,17 +1095,17 @@ for COMPFILE in `find . -type f | sort`;
 
   case "${STRICT}" in
   '' | [Nn][Oo])
-# Compare CVS $Id's first so if the file hasn't been modified
+# Compare $Id's first so if the file hasn't been modified
 # local changes will be ignored.
 # If the files have the same $Id, delete the one in temproot so the
 # user will have less to wade through if files are left to merge by hand.
 #
-CVSID1=`grep "[$]${CVS_ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null`
-CVSID2=`grep "[$]${CVS_ID_TAG}:" ${COMPFILE} 2>/dev/null` || CVSID2=none
+ID1=`grep "[$]${ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null`
+ID2=`grep "[$]${ID_TAG}:" ${COMPFILE} 2>/dev/null` || ID2=none
 
-case "${CVSID2}" in
-"${CVSID1}")
-  echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting"
+case "${ID2}" in
+"${ID1}")
+  echo " *** Temp ${COMPFILE} and installed have the same Id, deleting"
   rm "${COMPFILE}"
   ;;
 esac
@@ -1334,7 +1334,7 @@ case "${NEED_PWD_MKDB}" in
   ;;
 esac
 
-if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC
+if [ -e "${DESTDIR}/etc/localtime" -a -z "${PRE_WORLD}" ]; then# 
Ignore if TZ == UTC
   echo ''
   [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}"
   if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then
@@ -1380,29 +1380,35 @@ case "${COMP_CONFS}" in
   ;;
 esac
 
-case "${PRE_WORLD}" in
-'') ;;
-*)
-  MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf"
-
-  (echo ''
-  echo '*** Comparing make variables'
-  echo ''
-  echo "*** From ${DESTDIR}/etc/make.conf"
-  echo "*** From ${MAKE_CONF}"
-
-  for MAKE_VAR in `grep -i ^[a-z] ${DESTDIR}/etc/make.conf | cut -d '=' -f 1`; 
do
-echo ''
-grep -w ^${MAKE_VAR} ${DESTDIR}/etc/make.conf
-grep -w ^#${MAKE_VAR} ${MAKE_CONF} ||
-  echo ' * No example variable with this name'
-  done) | ${PAGER}
-  ;;
-esac
-
 if [ -n "${PRESERVE_FILES}" ]; then
   find -d $PRESERVE_FILES_DIR -type d -empty -delete 2>/dev/null
   rmdir $PRESERVE_FILES_DIR 2>/dev/null
 fi
 
 exit 0
+
+#~~~
+
+#  Copyright (c) 1998-2012 Douglas Barton
+#  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.
___

Re: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc

2012-10-03 Thread Doug Barton
Was this discussed on freebsd-rc@ at some point, and I just missed it?
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r240843 - head/usr.sbin/bsdconfig/timezone/share

2012-09-23 Thread Doug Barton
On 09/22/2012 15:16, Devin Teske wrote:
> - if : 2> /dev/null > "$_PATH_DB"; then
> + if true 2> /dev/null > "$_PATH_DB"; then
>   cat <<-EOF > "$_PATH_DB"
>   $zoneinfo
>   EOF

Is there a reason you're not using mktemp here?

-- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r240729 - in head/contrib/bind9: . lib/dns lib/dns/include/dns

2012-09-19 Thread Doug Barton
Author: dougb
Date: Thu Sep 20 04:12:09 2012
New Revision: 240729
URL: http://svn.freebsd.org/changeset/base/240729

Log:
  Upgrade to 9.8.3-P3:
  
  Prevents a crash when queried for a record whose RDATA exceeds
  65535 bytes.
  
  Prevents a crash when validating caused by using "Bad cache" data
  before it has been initialized.
  
  ISC_QUEUE handling for recursive clients was updated to address
  a race condition that could cause a memory leak. This rarely
  occurred with UDP clients, but could be a significant problem
  for a server handling a steady rate of TCP queries.
  
  A condition has been corrected where improper handling of
  zero-length RDATA could cause undesirable behavior, including
  termination of the named process.
  
  For more information: https://kb.isc.org/article/AA-00788

Modified:
  head/contrib/bind9/CHANGES
  head/contrib/bind9/lib/dns/include/dns/rdata.h
  head/contrib/bind9/lib/dns/master.c
  head/contrib/bind9/lib/dns/rdata.c
  head/contrib/bind9/lib/dns/rdataslab.c
  head/contrib/bind9/version
Directory Properties:
  head/contrib/bind9/   (props changed)

Modified: head/contrib/bind9/CHANGES
==
--- head/contrib/bind9/CHANGES  Thu Sep 20 03:48:36 2012(r240728)
+++ head/contrib/bind9/CHANGES  Thu Sep 20 04:12:09 2012(r240729)
@@ -1,3 +1,8 @@
+   --- 9.8.3-P3 released ---
+
+3364.  [security]  Named could die on specially crafted record.
+   [RT #30416]
+
--- 9.8.3-P2 released ---
 
 3346.  [security]  Bad-cache data could be used before it was

Modified: head/contrib/bind9/lib/dns/include/dns/rdata.h
==
--- head/contrib/bind9/lib/dns/include/dns/rdata.h  Thu Sep 20 03:48:36 
2012(r240728)
+++ head/contrib/bind9/lib/dns/include/dns/rdata.h  Thu Sep 20 04:12:09 
2012(r240729)
@@ -147,6 +147,17 @@ struct dns_rdata {
(((rdata)->flags & ~(DNS_RDATA_UPDATE|DNS_RDATA_OFFLINE)) == 0)
 
 /*
+ * The maximum length of a RDATA that can be sent on the wire.
+ * Max packet size (65535) less header (12), less name (1), type (2),
+ * class (2), ttl(4), length (2).
+ *
+ * None of the defined types that support name compression can exceed
+ * this and all new types are to be sent uncompressed.
+ */
+
+#define DNS_RDATA_MAXLENGTH65512U
+
+/*
  * Flags affecting rdata formatting style.  Flags 0x
  * are used by masterfile-level formatting and defined elsewhere.
  * See additional comments at dns_rdata_tofmttext().

Modified: head/contrib/bind9/lib/dns/master.c
==
--- head/contrib/bind9/lib/dns/master.c Thu Sep 20 03:48:36 2012
(r240728)
+++ head/contrib/bind9/lib/dns/master.c Thu Sep 20 04:12:09 2012
(r240729)
@@ -75,7 +75,7 @@
 /*%
  * max message size - header - root - type - class - ttl - rdlen
  */
-#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2)
+#define MINTSIZ DNS_RDATA_MAXLENGTH
 /*%
  * Size for tokens in the presentation format,
  * The largest tokens are the base64 blocks in KEY and CERT records,

Modified: head/contrib/bind9/lib/dns/rdata.c
==
--- head/contrib/bind9/lib/dns/rdata.c  Thu Sep 20 03:48:36 2012
(r240728)
+++ head/contrib/bind9/lib/dns/rdata.c  Thu Sep 20 04:12:09 2012
(r240729)
@@ -429,6 +429,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d
isc_buffer_t st;
isc_boolean_t use_default = ISC_FALSE;
isc_uint32_t activelength;
+   size_t length;
 
REQUIRE(dctx != NULL);
if (rdata != NULL) {
@@ -459,6 +460,14 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d
}
 
/*
+* Reject any rdata that expands out to more than DNS_RDATA_MAXLENGTH
+* as we cannot transmit it.
+*/
+   length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st);
+   if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH)
+   result = DNS_R_FORMERR;
+
+   /*
 * We should have consumed all of our buffer.
 */
if (result == ISC_R_SUCCESS && !buffer_empty(source))
@@ -466,8 +475,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d
 
if (rdata != NULL && result == ISC_R_SUCCESS) {
region.base = isc_buffer_used(&st);
-   region.length = isc_buffer_usedlength(target) -
-   isc_buffer_usedlength(&st);
+   region.length = length;
dns_rdata_fromregion(rdata, rdclass, type, ®ion);
}
 
@@ -602,6 +610,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d
unsigned long line;
void (*callback)(dns_rdatacallbacks_t *, const char *, ...);
isc_result_t tresult;
+   size_t length;
 
REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE

Re: svn commit: r240628 - head/sbin/ipfw

2012-09-18 Thread Doug Barton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 09/18/2012 03:36, Hiroki Sato wrote:
> Doug Barton  wrote
>   in <5058036f.1010...@freebsd.org>:
> 
> do> On 09/17/2012 19:33, Benjamin Kaduk wrote:
> do> >   Whitespace cleanup for ipfw.8 -- start each sentence on a new line,
> do>
> do> We generally don't do this at all absent other changes.
> do>
> do> We definitely don't make whitespace-only changes mixed in with other
> do> changes, as it makes the diff too hard to read.
> 
>  Please read docs/157452 before blaming the commit. 

The committer is responsible for what they finally commit. The mentor is
responsible for review to make sure that final commit meets project
guidelines.

That said, Ben properly split his changes into 2 patches for the PR, so
you should have been sure to tell him to commit it that way, and more
importantly, WHY to commit it that way.

> And I do not
>  think adding commas is not making the diff hard to read.

That wasn't my point. Mixing ws changes with content changes makes it
hard to pick out the content changes (as you well know).

Doug

- -- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBCAAGBQJQWRqjAAoJEFzGhvEaGryEt+cIAKQ0eCL/aftTelXyl6pbZT4X
UlMECcMqpdQdEtbT91qz+6Pvl3HBO1OcrkywVX3kVt7WNsIKRcBoN/Ns+6Vnvagm
G5wMY2MBoJO/v56S7JPC9E6O5YbYM03Fek6ZPNbGO9aIWAzjVhoW7ceN5J4cVErJ
Xhtasz86HGXQVpbjmbhGT17iMvXRKHS3Nj+6C48rKr9DmNyqC2snXoY7HsLCmA/z
x9GEtkbVOS+fR2REWP/6rseHCqn+MiqMtM5nMwyfHREp1noDNi2oqOtf/oDXDqAK
TAWP/nv+m81gK0VFmnpHS6Z/YhhtGUyoNzryZmfpArXtML3+GzbId1R0Y+l6rmY=
=O2Vn
-END PGP SIGNATURE-
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r240628 - head/sbin/ipfw

2012-09-17 Thread Doug Barton
On 09/17/2012 19:33, Benjamin Kaduk wrote:
>   Whitespace cleanup for ipfw.8 -- start each sentence on a new line,

We generally don't do this at all absent other changes.

We definitely don't make whitespace-only changes mixed in with other
changes, as it makes the diff too hard to read.

Your mentor should have caught this.

-- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r240090 - head/libexec/save-entropy

2012-09-04 Thread Doug Barton
Author: dougb
Date: Tue Sep  4 16:00:51 2012
New Revision: 240090
URL: http://svn.freebsd.org/changeset/base/240090

Log:
  1. Use install -d to create the entropy_dir if missing so that we can do it
 all in one command, with no permissions race.
  2. Simplify the rotation logic by cd'ing into the directory, with a test
 to make sure that it succeeds.
  3. Remove any files numbered higher than entropy_save_num. This helps when
 the user reduces the number, and may be useful for other purposes down
 the road.
  4. Simplify the rotation logic by first testing the common case (it's a
 regular file) then testing if something else exists with the same name
 using elif. Also switch from using jot to simpler countdown format.
  5. Fix logger lines and error messages to be more consistent, and wrap the
 code more consistently in the 80 column range. The "not a regular file"
 error message was mistakenly wrapped entirely in "quotes" which caused
 logger to include line-wrapping whitespace. Change that to wrap only
 the variables in quotes, which is both consistent and works better.
  6. Update copyright to reflect the fact that changes were made this year.
  
  Parts of 2-4 were taken from etc/periodic/daily/310.accounting

Modified:
  head/libexec/save-entropy/save-entropy.sh

Modified: head/libexec/save-entropy/save-entropy.sh
==
--- head/libexec/save-entropy/save-entropy.sh   Tue Sep  4 15:58:58 2012
(r240089)
+++ head/libexec/save-entropy/save-entropy.sh   Tue Sep  4 16:00:51 2012
(r240090)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2001-2006 Douglas Barton, do...@freebsd.org
+# Copyright (c) 2001-2006,2012 Douglas Barton, do...@freebsd.org
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,7 @@
 # This script is called by cron to store bits of randomness which are
 # then used to seed /dev/random on boot.
 
-# Originally developed by Doug Barton, do...@freebsd.org
+# Originally developed by Doug Barton, do...@freebsd.org
 
 PATH=/bin:/usr/bin
 
@@ -55,38 +55,36 @@ entropy_save_sz=${entropy_save_sz:-2048}
 entropy_save_num=${entropy_save_num:-8}
 
 if [ ! -d "${entropy_dir}" ]; then
-   umask 077
-   mkdir "${entropy_dir}" || {
-   logger -is -t "$0" The entropy directory "${entropy_dir}" does not \
-exist, and cannot be created.  Therefore no entropy can be saved. ;
-   exit 1;}
-   /usr/sbin/chown operator:operator "${entropy_dir}"
-   chmod 0700 "${entropy_dir}"
+   install -d -o operator -g operator -m 0700 "${entropy_dir}" || {
+   logger -is -t "$0" The entropy directory "${entropy_dir}" does \
+   not exist, and cannot be created. Therefore no entropy can \
+   be saved.; exit 1; }
 fi
 
+cd "${entropy_dir}" || {
+   logger -is -t "$0" Cannot cd to the entropy directory: 
"${entropy_dir}". \
+   Entropy file rotation is aborted.; exit 1; }
+
+for f in saved-entropy.*; do
+   case "${f}" in saved-entropy.\*) continue ;; esac   # No files match
+   [ ${f#saved-entropy\.} -ge ${entropy_save_num} ] && unlink ${f}
+done
+
 umask 377
 
-esn_m1=$(( ${entropy_save_num} - 1 ))
-for file_num in `jot $esn_m1 $esn_m1 1`; do
-   if [ -e "${entropy_dir}/saved-entropy.${file_num}" ]; then
-   if [ -f "${entropy_dir}/saved-entropy.${file_num}" ]; then
-   new_file=saved-entropy.$(( $file_num + 1 ))
-   if [ -e "${entropy_dir}/${new_file}" ]; then
-   unlink ${entropy_dir}/${new_file}
-   fi
-   mv "${entropy_dir}/saved-entropy.${file_num}" \
-   "${entropy_dir}/${new_file}"
-   else
-   logger -is -t "$0" \
-"${entropy_dir}/saved-entropy.${file_num} is not a regular file, and therefore 
\
-it will not be rotated. Entropy file harvesting is aborted."
-   exit 1
-   fi
+n=$(( ${entropy_save_num} - 1 ))
+while [ ${n} -ge 1 ]; do
+   if [ -f "saved-entropy.${n}" ]; then
+   mv "saved-entropy.${n}" "saved-entropy.$(( ${n} + 1 ))"
+   elif [ -e "saved-entropy.${n}" -o -L "saved-entropy.${n}" ]; then
+   logger -is -t "$0" \
+   "${entropy_dir}/saved-entropy.${n}" is not a regular file, and so \
+   it will not be rotated. Entropy file rotation is aborted.
+   exit 1
fi
+   n=$(( ${n} - 1 ))
 done
 
-dd if=/dev/random of="${entropy_dir}/saved-entro

Re: svn commit: r239927 - head/tools/tools/track

2012-09-02 Thread Doug Barton
On 08/31/2012 14:59, Dag-Erling Smørgrav wrote:
> Doug Barton  writes:
>> Dag-Erling Smørgrav  writes:
>>> -   \*\*\*\ Error*)
>>> +   \*\*\**)
>> Are you sure that the double ** is necessary here?
> 
> Yes, error messages generally include text in addition to the initial
> three asterisks.

D'oh. Misread the diff, sorry.

-- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r239927 - head/tools/tools/track

2012-08-30 Thread Doug Barton
On 08/30/2012 12:56 PM, Dag-Erling Sm�rgrav wrote:
> Author: des
> Date: Thu Aug 30 22:56:32 2012
> New Revision: 239927
> URL: http://svn.freebsd.org/changeset/base/239927
> 
> Log:
>   The error syntax has changed.
> 
> Modified:
>   head/tools/tools/track/track.sh
> 
> Modified: head/tools/tools/track/track.sh
> ==
> --- head/tools/tools/track/track.sh   Thu Aug 30 22:18:25 2012
> (r239926)
> +++ head/tools/tools/track/track.sh   Thu Aug 30 22:56:32 2012
> (r239927)
> @@ -35,7 +35,7 @@ do
>   \>\>\>*)
>   endl="\r\n"
>   ;;
> - \*\*\*\ Error*)
> + \*\*\**)

Are you sure that the double ** is necessary here?

>   endl="\r\n"
>   ;;
>   \=\=\=*)
> 

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r239568 - head/etc/rc.d

2012-08-23 Thread Doug Barton
On 8/22/2012 3:25 PM, David O'Brien wrote:
> On Wed, Aug 22, 2012 at 02:37:37PM -0700, Doug Barton wrote:
>> Were these changes discussed somewhere and I missed it?
> 
> They were not discussed.  I did not see the need.
> 
> This is simple functionality.  If securelevel is raised > 0, one
> cannot start up a firewall nor make major changes to time.
> Thus these components are required to be done before raising securelevel.
> 
>  
>> I'm not opposed per se, but the security aspects should be discussed on
>> freebsd-security@,
> 
> I'm sorry, I didn't feel that ensuring the software follows the
> published specification of its functionality to have such a security
> aspect.
> 
>> and it's preferable that significant changes to
>> rcorder be looked at on freebsd-rc@ as well.
> 
> I don't consider this to be a significant change.
> 
> I do have some significant changes that I do want freebsd-rc@ to
> review I will be sending soon.
> 
>> Can you hold off on MFC'ing any of this until it's been reviewed more
>> thoroughly?
> 
> Yes.

Thanks. Just to reiterate, I'm not saying that either your changes or
your methodology were wrong ... I personally would just like a little
time to review them before we move forward.

Doug

-- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r239568 - head/etc/rc.d

2012-08-22 Thread Doug Barton
Were these changes discussed somewhere and I missed it?

I'm not opposed per se, but the security aspects should be discussed on
freebsd-security@, and it's preferable that significant changes to
rcorder be looked at on freebsd-rc@ as well.

Can you hold off on MFC'ing any of this until it's been reviewed more
thoroughly?

Doug


On 08/22/2012 11:35, David E. O'Brien wrote:
> Author: obrien
> Date: Wed Aug 22 18:35:17 2012
> New Revision: 239568
> URL: http://svn.freebsd.org/changeset/base/239568
> 
> Log:
>   Add dependencies based on security(7).
> 
> Modified:
>   head/etc/rc.d/securelevel
> 
> Modified: head/etc/rc.d/securelevel
> ==
> --- head/etc/rc.d/securelevel Wed Aug 22 18:30:13 2012(r239567)
> +++ head/etc/rc.d/securelevel Wed Aug 22 18:35:17 2012(r239568)
> @@ -4,6 +4,7 @@
>  #
>  
>  # PROVIDE: securelevel
> +# REQUIRE: adjkerntz ipfw ipfilter pf
>  
>  . /etc/rc.subr
>  
> 


-- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238973 - head/sys/x86/x86

2012-08-06 Thread Doug Barton
On 08/06/2012 07:12 AM, Steve Kargl wrote:
> On Mon, Aug 06, 2012 at 12:08:36AM -0700, Doug Barton wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>> On 08/01/2012 10:32, Konstantin Belousov wrote:
>>> It should have been the text
>>
>> Forced commit? :)
>>
> 
> Try 'svn log sys/x86/x86/tsc.c | more'

Awesome. :)

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238622 - head/etc/rc.d

2012-08-06 Thread Doug Barton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 08/02/2012 22:28, Hiroki Sato wrote:
> John Hay  wrote
>   in <20120803042301.ga78...@zibbi.meraka.csir.co.za>:
> 
> jh> While you guys are here, may I add a request that we go back to prefering
> jh> IPv6 when IPv6 addresses are enabled. That is the way it was from FBSD-4
> jh> up to FBSD-8. 9 is a big POLA here.

Actually all that used to be needed was ipv6_enable. I modified the rc.d
code for this prior to 9-release to make it compatible with the old
knobs (aka, expected behavior), but hrs overruled me and installed his
version instead.

> jh> The world is past World IPv6 Launch
> jh> and I think people expect that if they configure IPv6 addresses, that
> jh> would be prefered. If you configure IPv6 addresses and do not want them
> jh> prefered, you are the odd one out and should have to do something.

I agree. My proposal was that if an interface is configured for IPv4 it
should get the same treatment for IPv6. That is, if it's set up for DHCP
in IPv4 then it should automatically do SLAAC/RA in IPv6; and if it's
statically configured in v4, the user should have to configure it in v6
as well (either with a static definition or by explicitly enabling RA).

I wanted to move to a model where you could simply say ifconfig_em0=auto
and have it DTRT.

> jh> Otherwise when in the future are we going to change it?
> 
>  IPv4-preferred was chosen as the default because difference of the
>  loopback performance was large.  I am a big fun to make FreeBSD
>  IPv6-capable by default and prefer IPv6, but the concern was a
>  possible negative impact for people who are using only IPv4.

Hiroki, you and Bjoern made the same argument over 2 years ago. Are you
saying that nothing has been done to improve this in that whole time? If
this is such an important problem, why hasn't it been addressed?

>  So, can we change it for 10.X now?  We cannot use "whether IPv6
>  address is configured" because ::1 is always configured in GENERIC
>  kernel.  The change will be "IPv6-preferred if the kernel has INET6
>  support".

Aren't those 2 ways to say the same thing? There is no v6 address
configured on lo0 if there is no INET6 in the kernel.

In the current regime I think it would be sufficient to prefer v6 if the
user has configured an interface with it (see below). I did this in my
version of the code that you reverted, so you can crib from that if you
need to.

>  Preferring IPv6 addresses has needed a knob in rc.conf even in 4.x:
> 
>  4.X:
>  ipv6_enable="YES"

Until you introduced the changes in 9, it was not necessary to configure
the address if you were using RA. Now even with RA it's necessary to do
ifconfig_em0_ipv6="inet6 accept_rtadv"

>  ipv6_ifconfig_em0="2001:db8::1 prefixlen 64"
> 
>  9.X and later:
>  ip6addrctl_policy="ipv6_prefer"
>  ifconfig_em0_ipv6="inet6 2001:db8::1 prefixlen 64"
> 
>  and if we change the default to ipv6_prefer, ip6addrctl_policy= line
>  will be unnecessary.

But it will still be necessary to configure the interface.

John,

In regards to your desire for this to work automatically, we're not
there yet. We don't currently have a good way to build v6 into the
kernel, and configure interfaces with it, but not actually *use* v6
unless we get a network. What you described was the end goal of the
changes I put in, which were ultimately reverted.

Doug

- -- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBCAAGBQJQH3cJAAoJEFzGhvEaGryEgkIIAIOEDh1f2pFXusK0bqytMJIo
+6A+ZGNRXkNttXDX53XQxpxQ4MO4zhQIazWV5a8IpbnkIQfAU91st/7oNREPbrr4
18AU4XGlrij5biyhL7BmmP29h5AjHQ4M++WqUxltT64xQ3wTS6HEWCqtrT+CV18S
zQK+OBCatU43Fc90FibFMA1N1WVsGpo7C2XCyDBhplwEBld3f4vuS4kBWx9XNGKu
aeKqpCgT/XL2PzHlo/YRDHTYU2GiKEFuYyesZBhfLbBw3eFpNl31U8CGT4BzRVy+
+v0n1mfJqup6ApdPeKtOtviUW+5iEEQNf2dnHxKTvihBQ8pSJUqPWeMFalpbEDk=
=f8Es
-END PGP SIGNATURE-
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238622 - head/etc/rc.d

2012-08-06 Thread Doug Barton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 08/02/2012 20:58, Hiroki Sato wrote:
> Doug Barton  wrote in
> <501af66a.8020...@freebsd.org>:
> 
> do> On 8/2/2012 2:25 PM, Maksim Yevmenkin wrote: do> > On Thu, Aug
> 2, 2012 at 1:55 PM, Hiroki Sato  wrote: do> > do>
> >>  Just curious, why ip6addrctl_enable=NO is not enough here? do> 
> do> Because the behavior of the script for =NO is to prefer v4.
> 
> No, when ip6addrctl_enable=NO the rc.d/ip6addtctl script will be 
> simply ignored.  No rule will be installed in that case.

I wondered about that, but the script has an explicit case for it.

> do> >>  I would do> >>  like to eliminate yes/no/none keywords in
> $ip6addrctl_policy because do> >>  such keywords are vague.  If we
> need the empty rule for some reason, do> >>  "empty" would be a
> better name for the policy, I think. do> do> Personally I think
> that the established meanings of "yes" and "no" are do> well
> understood, but I wouldn't object to emitting a warning for them
> to do> help the user make a more explicit selection.
> 
> I do not think ip6addrctl_policy={yes|no} is meaningful.

Aside from my argument that the script is poorly named, and the whole
interface is badly designed ... I think users who would say "yes" here
would expect that IPv6 would be preferred, and "no" to mean it would
not be. That is in fact what happens now, so in that sense at least
things seem to be meaningful. :)

> do> While we're at it, the way that the current script replicates
> the test do> for checkyesno in case is bogus, and should be
> changed. I had fixed this do> in the change set that you(hrs)
> backed out. To stick with the structure do> of the current script,
> something like this would work: do> do>
> http://people.freebsd.org/~dougb/ip6addrctl.diff do> do> That also
> brings in the warning described above.
> 
> I think additional warnings are not needed because a warning will
> be displayed when ipv6_prefer={yes|no} is defined.  I have no
> objection to use checkyesno() itself to check if the variable is
> defined as yes or no.

There is a warning in the script already, I just made it consistent;
and you were the one who suggested warnings for yes/no. But as you
know I'm prohibited from making changes to that code, so you have my
patch, do with it as you will.

Doug

- -- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBCAAGBQJQH3E0AAoJEFzGhvEaGryENTMH/R6HW7J8+2BLJEwor+VyFWUH
da9d+wrp7GSmBjY2dFko+6Z8A3McIqZDTJ9TdTKerilOMBpZkhT86ZUk1eOldBPp
rMKmMcZlK5Z/8s6l1qGGAFbfX7MFq+qQU6d8xo730o5ldRmBQhhmgH0pAZOLF2Iv
4HI1njrJ56KUnDERh0LhrJ+A5n62JyO1ML/YgGFeU5qvDevomDygmrU+zWhTftLJ
0ACW1YVyK5d8Sg5J44s66nbjMeNk1PXpdVN0CA/n03bryoI39S7kLl1iVInQ99MA
afK8UMV8TTbYd7KOlY091NaBny0K2U7LTY7iprMQ2cHE9DaXHewu3X4FFW9eXoY=
=UNRQ
-END PGP SIGNATURE-
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238973 - head/sys/x86/x86

2012-08-06 Thread Doug Barton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 08/01/2012 10:32, Konstantin Belousov wrote:
> It should have been the text

Forced commit? :)

- -- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBCAAGBQJQH210AAoJEFzGhvEaGryEQ/8H/jTrpM5C8TiyxU4A3wTieeUx
1IlDUpRaiLO65u6iWE2/NcxstL2QOnBHNmuIDSZ3MCDf7ytlH8XuDkEA0kj54zlK
/evgsR4wP9us53lWtLPG4PUcKtjU0iZ10lP4iGENbdP/5pf/pbT1sZ7NDqeXajT/
RrwiIipgdCwZRqQ9MaU/3EUUH1gA40Y7Wohm6gRT0rFEBOHagjpIpOW1oPPmNSjE
TJW30JDJXkccCn3BGjcPA93zhPcW1Hg+O6Ekr88gTp2SdGDgHhI6O27j/2zN/xgZ
GjFHVlynA4p3a+e9sfi4j0b3jLVaoz5vyaWPJmeHfKpP02wxUL9l44AF/ErodpA=
=GiTg
-END PGP SIGNATURE-
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238622 - head/etc/rc.d

2012-08-02 Thread Doug Barton
On 8/2/2012 2:25 PM, Maksim Yevmenkin wrote:
> On Thu, Aug 2, 2012 at 1:55 PM, Hiroki Sato  wrote:
>
>>  Just curious, why ip6addrctl_enable=NO is not enough here? 

Because the behavior of the script for =NO is to prefer v4.

>>  I would
>>  like to eliminate yes/no/none keywords in $ip6addrctl_policy because
>>  such keywords are vague.  If we need the empty rule for some reason,
>>  "empty" would be a better name for the policy, I think.

Personally I think that the established meanings of "yes" and "no" are
well understood, but I wouldn't object to emitting a warning for them to
help the user make a more explicit selection.

While we're at it, the way that the current script replicates the test
for checkyesno in case is bogus, and should be changed. I had fixed this
in the change set that you(hrs) backed out. To stick with the structure
of the current script, something like this would work:

http://people.freebsd.org/~dougb/ip6addrctl.diff

That also brings in the warning described above.

> i just wanted to make sure that there is a way to absolutely make sure
> that there is no default address selection policy installed. the wide
> know rule 9 of rfc 3484 is really messing things up for dns-style load
> balancing. even when ipv6 is not used.

Maksim, can you say more about this? Or point me to a reference that has
the discussion?

> personally, i don't think that
> "none" is unreasonable word for "ip6addrctl_policy", but i don't feel
> particularly strongly about it. any name will do as long as original
> functionality is preserved.

I agree that "none" is reasonable, and is in line with other rc.d knobs.
I would not object to "empty" being added as a synonym though.

One request however, is this new knob documented in rc.conf.5? If not,
can you do that please? :)

Doug

-- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238912 - head/sys/dev/netmap

2012-07-30 Thread Doug Barton
It seems this broke the build?


On 07/30/2012 11:21, Luigi Rizzo wrote:
> Author: luigi
> Date: Mon Jul 30 18:21:48 2012
> New Revision: 238912
> URL: http://svn.freebsd.org/changeset/base/238912
> 
> Log:
>   - move the inclusion of netmap headers to the common part of the code;
>   - more portable annotations for unused arguments;
> 
> Modified:
>   head/sys/dev/netmap/netmap.c
>   head/sys/dev/netmap/netmap_mem2.c
> 
> Modified: head/sys/dev/netmap/netmap.c
> ==
> --- head/sys/dev/netmap/netmap.c  Mon Jul 30 15:37:47 2012
> (r238911)
> +++ head/sys/dev/netmap/netmap.c  Mon Jul 30 18:21:48 2012
> (r238912)
> @@ -90,13 +90,14 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include  /* BIOCIMMEDIATE */
>  #include 
> -#include 
> -#include 
>  #include  /* bus_dmamap_* */
>  
>  MALLOC_DEFINE(M_NETMAP, "netmap", "Network memory map");
>  #endif /* __FreeBSD__ */
>  
> +#include 
> +#include 
> +
>  /*
>   * lock and unlock for the netmap memory allocator
>   */
> @@ -764,8 +765,8 @@ netmap_set_ringid(struct netmap_priv_d *
>   * Return 0 on success, errno otherwise.
>   */
>  static int
> -netmap_ioctl(__unused struct cdev *dev, u_long cmd, caddr_t data,
> - __unused int fflag, struct thread *td)
> +netmap_ioctl(struct cdev *dev, u_long cmd, caddr_t data,
> + int fflag, struct thread *td)
>  {
>   struct netmap_priv_d *priv = NULL;
>   struct ifnet *ifp;
> @@ -775,6 +776,8 @@ netmap_ioctl(__unused struct cdev *dev, 
>   u_int i, lim;
>   struct netmap_if *nifp;
>  
> + (void)dev;  /* UNUSED */
> + (void)fflag;/* UNUSED */
>  #ifdef linux
>  #define devfs_get_cdevpriv(pp)   \
>   ({ *(struct netmap_priv_d **)pp = ((struct file *)td)->private_data;
> \
> @@ -1551,7 +1554,7 @@ linux_netmap_poll(struct file * file, st
>  }
>  
>  static int
> -netmap_mmap(__unused struct file *f, struct vm_area_struct *vma)
> +netmap_mmap(struct file *f, struct vm_area_struct *vma)
>  {
>   int lut_skip, i, j;
>   int user_skip = 0;
> @@ -1565,6 +1568,7 @@ netmap_mmap(__unused struct file *f, str
>* vma->vm_end: end of the mapping user address space
>*/
>  
> + (void)f;/* UNUSED */
>   // XXX security checks
>  
>   for (i = 0; i < 3; i++) {  /* loop through obj_pools */
> @@ -1599,7 +1603,7 @@ netmap_start_linux(struct sk_buff *skb, 
>  }
>  
>  
> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)  // XXX was 38
>  #define LIN_IOCTL_NAME   .ioctl
>  int
>  linux_netmap_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long 
> data /* arg */)
> @@ -1623,8 +1627,9 @@ linux_netmap_ioctl(struct file *file, u_
>  
>  
>  static int
> -netmap_release(__unused struct inode *inode, struct file *file)
> +netmap_release(struct inode *inode, struct file *file)
>  {
> + (void)inode;/* UNUSED */
>   if (file->private_data)
>   netmap_dtor(file->private_data);
>   return (0);
> 
> Modified: head/sys/dev/netmap/netmap_mem2.c
> ==
> --- head/sys/dev/netmap/netmap_mem2.c Mon Jul 30 15:37:47 2012
> (r238911)
> +++ head/sys/dev/netmap/netmap_mem2.c Mon Jul 30 18:21:48 2012
> (r238912)
> @@ -25,7 +25,7 @@
>  
>  /*
>   * $FreeBSD$
> - * $Id: netmap_mem2.c 10830 2012-03-22 18:06:01Z luigi $
> + * $Id: netmap_mem2.c 11445 2012-07-30 10:49:07Z luigi $
>   *
>   * New memory allocator for netmap
>   */
> @@ -300,12 +300,13 @@ netmap_obj_free_va(struct netmap_obj_poo
>  
>  
>  static void
> -netmap_new_bufs(struct netmap_if *nifp __unused,
> +netmap_new_bufs(struct netmap_if *nifp,
>  struct netmap_slot *slot, u_int n)
>  {
>   struct netmap_obj_pool *p = nm_mem->nm_buf_pool;
>   uint32_t i = 0; /* slot counter */
>  
> + (void)nifp; /* UNUSED */
>   for (i = 0; i < n; i++) {
>   void *vaddr = netmap_buf_malloc();
>   if (vaddr == NULL) {
> 


-- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238879 - head/games/fortune/datfiles

2012-07-28 Thread Doug Barton
Author: dougb
Date: Sun Jul 29 01:01:35 2012
New Revision: 238879
URL: http://svn.freebsd.org/changeset/base/238879

Log:
  Add a couple of nice quotes from Edward Everett Hale

Modified:
  head/games/fortune/datfiles/fortunes

Modified: head/games/fortune/datfiles/fortunes
==
--- head/games/fortune/datfiles/fortunesSun Jul 29 00:45:24 2012
(r238878)
+++ head/games/fortune/datfiles/fortunesSun Jul 29 01:01:35 2012
(r238879)
@@ -22100,6 +22100,11 @@ planet. Tuna, chicken, sparrow-brains, e
 world that they like, but catnip is crack from home.
-- Bill Cole
 %
+I am only one, but I am one.  I cannot do everything, but I can do
+something.  And I will not let what I cannot do interfere with what
+I can do.
+   -- Edward Everett Hale, (1822 - 1909)
+%
 I am professionally trained in computer science, which is to say
 (in all seriousness) that I am extremely poorly educated.
-- Joseph Weizenbaum, "Computer Power and Human Reason"
@@ -31413,6 +31418,10 @@ Look ere ye leap.
 %
 Look out!  Behind you!
 %
+Look up and not down, look forward and not back, look out and not in,
+and lend a hand.
+   -- Edward Everett Hale, "Lowell Institute Lectures" (1869)
+%
 Look, we play the Star Spangled Banner before every game.  You want us
 to pay income taxes, too?
-- Bill Veeck, Chicago White Sox
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238722 - in head/lib/msun: . ld128 ld80 man src

2012-07-24 Thread Doug Barton
On 7/24/2012 1:53 PM, Steve Kargl wrote:
> So, I have no idea were the most current source lives.

All 3 parts of the project are in svn now. There is a primer for doc svn
on the wiki.

-- 
If you're never wrong, you're not trying hard enough


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238746 - in head/contrib/bind9: . lib/dns

2012-07-24 Thread Doug Barton
Author: dougb
Date: Tue Jul 24 18:53:28 2012
New Revision: 238746
URL: http://svn.freebsd.org/changeset/base/238746

Log:
  Heavy DNSSEC Validation Load Can Cause a "Bad Cache" Assertion Failure
  in BIND9
  
  High numbers of queries with DNSSEC validation enabled can cause an
  assertion failure in named, caused by using a "bad cache" data structure
  before it has been initialized.
  
  CVE: CVE-2012-3817
  Posting date: 24 July, 2012

Modified:
  head/contrib/bind9/CHANGES
  head/contrib/bind9/lib/dns/resolver.c
  head/contrib/bind9/lib/dns/zone.c
  head/contrib/bind9/version
Directory Properties:
  head/contrib/bind9/   (props changed)

Modified: head/contrib/bind9/CHANGES
==
--- head/contrib/bind9/CHANGES  Tue Jul 24 18:49:18 2012(r238745)
+++ head/contrib/bind9/CHANGES  Tue Jul 24 18:53:28 2012(r238746)
@@ -1,3 +1,12 @@
+   --- 9.8.3-P2 released ---
+
+3346.  [security]  Bad-cache data could be used before it was
+   initialized, causing an assert. [RT #30025]
+
+3342.  [bug]   Change #3314 broke saving of stub zones to disk
+   resulting in excessive cpu usage in some cases.
+   [RT #29952]
+
--- 9.8.3-P1 released ---
 
 3331.  [security]  dns_rdataslab_fromrdataset could produce bad

Modified: head/contrib/bind9/lib/dns/resolver.c
==
--- head/contrib/bind9/lib/dns/resolver.c   Tue Jul 24 18:49:18 2012
(r238745)
+++ head/contrib/bind9/lib/dns/resolver.c   Tue Jul 24 18:53:28 2012
(r238746)
@@ -8448,6 +8448,7 @@ dns_resolver_addbadcache(dns_resolver_t 
goto cleanup;
bad->type = type;
bad->hashval = hashval;
+   bad->expire = *expire;
isc_buffer_init(&buffer, bad + 1, name->length);
dns_name_init(&bad->name, NULL);
dns_name_copy(name, &bad->name, &buffer);
@@ -8459,8 +8460,8 @@ dns_resolver_addbadcache(dns_resolver_t 
if (resolver->badcount < resolver->badhash * 2 &&
resolver->badhash > DNS_BADCACHE_SIZE)
resizehash(resolver, &now, ISC_FALSE);
-   }
-   bad->expire = *expire;
+   } else
+   bad->expire = *expire;
  cleanup:
UNLOCK(&resolver->lock);
 }

Modified: head/contrib/bind9/lib/dns/zone.c
==
--- head/contrib/bind9/lib/dns/zone.c   Tue Jul 24 18:49:18 2012
(r238745)
+++ head/contrib/bind9/lib/dns/zone.c   Tue Jul 24 18:53:28 2012
(r238746)
@@ -8027,13 +8027,14 @@ zone_maintenance(dns_zone_t *zone) {
case dns_zone_master:
case dns_zone_slave:
case dns_zone_key:
+   case dns_zone_stub:
LOCK_ZONE(zone);
if (zone->masterfile != NULL &&
isc_time_compare(&now, &zone->dumptime) >= 0 &&
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED) &&
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDDUMP)) {
dumping = was_dumping(zone);
-   } else
+   } else 
dumping = ISC_TRUE;
UNLOCK_ZONE(zone);
if (!dumping) {
@@ -8386,7 +8387,7 @@ zone_dump(dns_zone_t *zone, isc_boolean_
goto fail;
}
 
-   if (compact) {
+   if (compact && zone->type != dns_zone_stub) {
dns_zone_t *dummy = NULL;
LOCK_ZONE(zone);
zone_iattach(zone, &dummy);
@@ -9242,7 +9243,7 @@ stub_callback(isc_task_t *task, isc_even
dns_zone_t *zone = NULL;
char master[ISC_SOCKADDR_FORMATSIZE];
char source[ISC_SOCKADDR_FORMATSIZE];
-   isc_uint32_t nscnt, cnamecnt;
+   isc_uint32_t nscnt, cnamecnt, refresh, retry, expire;
isc_result_t result;
isc_time_t now;
isc_boolean_t exiting = ISC_FALSE;
@@ -9390,19 +9391,32 @@ stub_callback(isc_task_t *task, isc_even
ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_write);
if (zone->db == NULL)
zone_attachdb(zone, stub->db);
+   result = zone_get_from_db(zone, zone->db, NULL, NULL, NULL, &refresh,
+ &retry, &expire, NULL, NULL);
+   if (result == ISC_R_SUCCESS) {
+   zone->refresh = RANGE(refresh, zone->minrefresh,
+ zone->maxrefresh);
+   zone->retry = RANGE(retry, zone->minretry, zone->maxretry);
+   zone->expire = RANGE(expire, zone->refresh + zone->retry,
+DNS_MAX_EXPIRE);
+   DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_HAVETIMERS);
+   }
ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_write);
dns_db_detach(&stub->db);
 
-  

Re: svn commit: r238514 - head/usr.bin/netstat

2012-07-16 Thread Doug Barton
On 07/16/2012 09:49, Michael Tuexen wrote:
> On Jul 16, 2012, at 5:56 PM, Garrett Cooper wrote:
> 
>> On Mon, Jul 16, 2012 at 2:17 AM, Doug Barton  wrote:
>>> Is it my imagination or did this break the build?
>>
>>Don't think so, but I'm running a buildworld with -DWITHOUT_INET
>> -DWITHOUT_INET6 and -DWITHOUT_INET -DWITH_INET6, just to be sure.
> Please let me know if there are still any issues. I think it should
> be fixed now (meaning that it compiles (which I broke) and meaning
> that it actually works (which I fixed).

I waited a while after your change and the tinderbox was still failing.
Not too long after your first mail (responding to me) it stopped
failing, so it was probably just a timing issue. Sorry for the noise.

Doug

-- 

Change is hard.



___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238514 - head/usr.bin/netstat

2012-07-16 Thread Doug Barton
Is it my imagination or did this break the build?

On 07/15/2012 23:43, Michael Tuexen wrote:
> Author: tuexen
> Date: Mon Jul 16 06:43:04 2012
> New Revision: 238514
> URL: http://svn.freebsd.org/changeset/base/238514
> 
> Log:
>   Allow netstat to be build if INET is not defined in the kernel.
>   Thanks to Garrett Cooper for reporting the issue.
>   
>   MFC after: 3 days
>   X-MFC: 238501
> 
> Modified:
>   head/usr.bin/netstat/Makefile
>   head/usr.bin/netstat/sctp.c
> 
> Modified: head/usr.bin/netstat/Makefile
> ==
> --- head/usr.bin/netstat/Makefile Mon Jul 16 02:10:26 2012
> (r238513)
> +++ head/usr.bin/netstat/Makefile Mon Jul 16 06:43:04 2012
> (r238514)
> @@ -13,6 +13,10 @@ CFLAGS+=-fno-strict-aliasing
>  CFLAGS+=-DIPSEC
>  CFLAGS+=-DSCTP
>  
> +.if ${MK_INET_SUPPORT} != "no"
> +CFLAGS+=-DINET
> +.endif
> +
>  .if ${MK_INET6_SUPPORT} != "no"
>  SRCS+=   inet6.c
>  CFLAGS+=-DINET6
> 
> Modified: head/usr.bin/netstat/sctp.c
> ==
> --- head/usr.bin/netstat/sctp.c   Mon Jul 16 02:10:26 2012
> (r238513)
> +++ head/usr.bin/netstat/sctp.c   Mon Jul 16 06:43:04 2012
> (r238514)
> @@ -107,6 +107,7 @@ struct xraddr_entry {
>   * If numeric_addr has been supplied, give
>   * numeric value, otherwise try for symbolic name.
>   */
> +#ifdef INET
>  static char *
>  inetname(struct in_addr *inp)
>  {
> @@ -146,6 +147,7 @@ inetname(struct in_addr *inp)
>   }
>   return (line);
>  }
> +#endif
>  
>  #ifdef INET6
>  static char ntop_buf[INET6_ADDRSTRLEN];
> @@ -197,9 +199,11 @@ sctp_print_address(union sctp_sockstore 
>   int width;
>  
>   switch (address->sa.sa_family) {
> +#ifdef INET
>   case AF_INET:
>   sprintf(line, "%.*s.", Wflag ? 39 : 16, 
> inetname(&address->sin.sin_addr));
>   break;
> +#endif
>  #ifdef INET6
>   case AF_INET6:
>   sprintf(line, "%.*s.", Wflag ? 39 : 16, 
> inet6name(&address->sin6.sin6_addr));
> 


-- 

Change is hard.



___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238405 - in head: . crypto/openssl crypto/openssl/apps crypto/openssl/apps/demoCA crypto/openssl/bugs crypto/openssl/certs/demo crypto/openssl/crypto crypto/openssl/crypto/aes crypto/

2012-07-12 Thread Doug Barton
On 07/12/2012 12:30 PM, Jung-uk Kim wrote:
> Log:
>   Merge OpenSSL 1.0.1c.

Can you describe how you did the merge? There are numerous red flags in
the log.

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r238118 - head/lib/libc/gen

2012-07-04 Thread Doug Barton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 07/04/2012 13:32, Andrey Chernov wrote:
> 1) /dev/urandom may not exist in jails/sandboxes

That would be a pretty serious configuration error.

- -- 

This .signature sanitized for your protection


-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBCAAGBQJP9Kw9AAoJEFzGhvEaGryEATEH/RbxtNiNYy+Ki/DL0JWVTTwq
f+kEK8bASCfJGmA+Vb+1cjEGcMT64QOvV3n4ow0xjn9xctmWVtoA8Y4Q4dRomOh6
vOlJfu5aRsZsAxsf9sV3k1psuO5IXuYBfAeGVtGBjgNMnDG46PiNBE+4q5rVntHw
sUsuyupxgRbYrCvTVbeET2wAZ+G9j8ceK56nA63KN3azAIpCktCDzSm3FlDrVWYh
zk+LpIHdpE4pbpH8znxDQoRqF+V9n6pryGiFNzkzLODvtoiL7qgrJtNEdfu3GCQI
J7tolXvMmxljYW+V3PUP5abO6RS1uCMiZi3wvo+HaZqhPVUVTw98tx+qRwBJ7zs=
=1MvW
-END PGP SIGNATURE-
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r238038 - head/sys/conf

2012-07-02 Thread Doug Barton
Author: dougb
Date: Mon Jul  2 22:14:58 2012
New Revision: 238038
URL: http://svn.freebsd.org/changeset/base/238038

Log:
  Unfortunately the change in r237958 resulted in s/install/instclean/ due to
  the aggressive pattern matching of the :C modifier. I tested build and
  install in 2 phases, however with different solutions, resulting in the
  breakage. Mea culpa.
  
  The solution is to break out the all: target. This causes a few lines of
  code duplication, but now the all: target works as it should, and the
  other targets continue to work as they did before.
  
  While I'm here, add a ===> header line to the start of each port build
  to make it easier to find/more clear in the logs.

Modified:
  head/sys/conf/kern.post.mk

Modified: head/sys/conf/kern.post.mk
==
--- head/sys/conf/kern.post.mk  Mon Jul  2 22:04:09 2012(r238037)
+++ head/sys/conf/kern.post.mk  Mon Jul  2 22:14:58 2012(r238038)
@@ -60,11 +60,21 @@ PORTSMODULESENV=\
SRC_BASE=${SRC_BASE} \
OSVERSION=${OSRELDATE} \
WRKDIRPREFIX=${WRKDIRPREFIX}
-.for __target in all install reinstall clean
+
+# The WRKDIR needs to be cleaned before building, and trying to change the 
target
+# with a :C pattern below results in install -> instclean
+all:
+.for __i in ${PORTS_MODULES}
+   @${ECHO} "===> Ports module ${__i} (all)"
+   cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean 
all
+.endfor
+
+.for __target in install reinstall clean
 ${__target}: ports-${__target}
 ports-${__target}:
 .for __i in ${PORTS_MODULES}
-   cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B 
${__target:C/all/clean all/:C/install/deinstall 
reinstall/:C/reinstall/deinstall reinstall/}
+   @${ECHO} "===> Ports module ${__i} (${__target})"
+   cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B 
${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/}
 .endfor
 .endfor
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r237748 - in head/sys/cddl/dev/dtrace: amd64 i386

2012-07-02 Thread Doug Barton
On 07/02/2012 01:00, Andriy Gapon wrote:
> on 02/07/2012 10:55 Doug Barton said the following:
>> On 06/29/2012 00:42, Andriy Gapon wrote:
>>> I haven't studied at all what the newer code brings in, but it must be some
>>> fixes and improvements, I guess :-)
>>
>> Seriously?
>>
> 
> I expected to hear from you :-)

So let me get this straight ... you intentionally inserted an
inflammatory comment that seems to indicate that you didn't actually
review the code you committed in an attempt to bait me into saying
something?


-- 

This .signature sanitized for your protection


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r237234 - head/share/man/man4

2012-07-02 Thread Doug Barton
FYI, you didn't change the substance of the text, so there is no reason
to bump .Dd.

Doug

On 06/18/2012 12:11, Marius Strobl wrote:
> Author: marius
> Date: Mon Jun 18 19:11:07 2012
> New Revision: 237234
> URL: http://svn.freebsd.org/changeset/base/237234
> 
> Log:
>   Avoid hard sentence break.
>   
>   MFC after:  3 days
> 
> Modified:
>   head/share/man/man4/ahci.4
> 
> Modified: head/share/man/man4/ahci.4
> ==
> --- head/share/man/man4/ahci.4Mon Jun 18 18:25:57 2012
> (r237233)
> +++ head/share/man/man4/ahci.4Mon Jun 18 19:11:07 2012
> (r237234)
> @@ -24,7 +24,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd December 6, 2011
> +.Dd June 18, 2012
>  .Dt AHCI 4
>  .Os
>  .Sh NAME
> @@ -101,7 +101,8 @@ setting to nonzero value limits maximum 
>  Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
>  .It Va hw.ahci.force
>  setting to nonzero value forces driver attach to some known AHCI-capable
> -chips even if they are configured for legacy IDE emulation. Default is 1.
> +chips even if they are configured for legacy IDE emulation.
> +Default is 1.
>  .El
>  .Sh DESCRIPTION
>  This driver provides the
> 


-- 

This .signature sanitized for your protection


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r237748 - in head/sys/cddl/dev/dtrace: amd64 i386

2012-07-02 Thread Doug Barton
On 06/29/2012 00:42, Andriy Gapon wrote:
> I haven't studied at all what the newer code brings in, but it must be some
> fixes and improvements, I guess :-)

Seriously?

-- 

This .signature sanitized for your protection


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r237958 - head/sys/conf

2012-07-01 Thread Doug Barton
Author: dougb
Date: Mon Jul  2 06:22:20 2012
New Revision: 237958
URL: http://svn.freebsd.org/changeset/base/237958

Log:
  For the ports modules building code, clean WRKDIR before building. This is
  important for those that use -DNO_CLEAN routinely, since it will prevent
  installing stale stuff, and even more important when the port is upgraded
  to a newer version. When the user doesn't use -DNO_CLEAN, this will create
  an infinitesimal amount of extra work, but won't hurt anything.
  
  This is necessary because the ports tree has flags that prevent the ususal
  'update the build if newer source files exist' logic from doing what it
  would do in the base.

Modified:
  head/sys/conf/kern.post.mk

Modified: head/sys/conf/kern.post.mk
==
--- head/sys/conf/kern.post.mk  Mon Jul  2 06:07:46 2012(r237957)
+++ head/sys/conf/kern.post.mk  Mon Jul  2 06:22:20 2012(r237958)
@@ -64,7 +64,7 @@ PORTSMODULESENV=\
 ${__target}: ports-${__target}
 ports-${__target}:
 .for __i in ${PORTS_MODULES}
-   cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B 
${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/}
+   cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B 
${__target:C/all/clean all/:C/install/deinstall 
reinstall/:C/reinstall/deinstall reinstall/}
 .endfor
 .endfor
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r237860 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize

2012-07-01 Thread Doug Barton
On 07/01/2012 03:05, Simon L. B. Nielsen wrote:
> Don't replace files, and even worse directories, and it breaks svn2cvs.

Isn't it possible to write a pre-commit hook to avoid this issue?

-- 

This .signature sanitized for your protection


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r237624 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/

2012-07-01 Thread Doug Barton
On 06/29/2012 10:58, Pedro Giffuni wrote:
> Now .. David pointed out I am not respecting the code
> provenance since I didn't add them to the opensolaris
> vendor area, but these files are copyrighted Joyent
> Inc (not even Illumos) so I cannot put them there
> unless we create a new vendor for Joyent

Creating a new vendor area would be the right solution, yes.

Doug

-- 

This .signature sanitized for your protection


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r237448 - head/lib/libedit

2012-06-22 Thread Doug Barton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

As a general rule, please trim out replies. This list is worse than
most in the sense that people often reply to hundreds of lines only to
add a line or 2 at the bottom.

By trimming your reply you both save electrons, and make it easier for
people to see what you have to say.


Doug
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBCAAGBQJP5NWTAAoJEFzGhvEaGryEpVsH/3I60AiJ6JODDA9mx+ufW9LG
SAr/p13YGlswZxL5LOLCLOvwjNrvK6CJieb42XI+70PYkGAGH8syKunTy9s4EPuQ
2wXWHw4jlJaUfMTOFsXOvoZIFTrH0YPRt3qZic4TdfuxWlEkqrk4G37+lVNMhdsW
0MLJD/eJC5rV3Ve/YMKB2OSPK47mukOmY0spFXG/N2NQRryOuV8N3D6ycbWGDn7q
YJwpO98YxbbyxLEV394rGwVCK8T6taJXRBOLMu9VFR0L7321TPuayPc3cLg+0hQC
owr6vN2ga0uD7vjhoKbApBTTHzWAGYVWN1LU+rpE0/b5QGZByq2Muiz5SARBncI=
=cYw2
-END PGP SIGNATURE-
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r237090 - head/sys/conf

2012-06-14 Thread Doug Barton
Author: dougb
Date: Thu Jun 14 19:30:31 2012
New Revision: 237090
URL: http://svn.freebsd.org/changeset/base/237090

Log:
  Improve the functionality of the PORTS_MODULES knob by adding
  LOCALBASE/bin and sbin to PATH, allowing dependencies to be found;
  adding SRC_BASE and OSVERSION to match the new kernel, and putting
  the related builds under MAKEOBJDIRPREFIX so that they only need
  to be built once per kernel.
  
  In addition to the PR this includes ideas/contributions from crees
  and matthew.
  
  PR:   ports/161452
  Submitted by: Garrett Cooper 

Modified:
  head/sys/conf/kern.post.mk

Modified: head/sys/conf/kern.post.mk
==
--- head/sys/conf/kern.post.mk  Thu Jun 14 18:37:00 2012(r237089)
+++ head/sys/conf/kern.post.mk  Thu Jun 14 19:30:31 2012(r237090)
@@ -36,9 +36,30 @@ modules-${target}:
 .endif
 .endfor
 
-# Handle out of tree ports 
+# Handle ports (as defined by the user) that build kernel modules
 .if !defined(NO_MODULES) && defined(PORTS_MODULES)
-PORTSMODULESENV=SYSDIR=${SYSDIR}
+#
+# The ports tree needs some environment variables defined to match the new 
kernel
+#
+# Ports search for some dependencies in PATH, so add the location of the 
installed files
+LOCALBASE?=/usr/local
+# SRC_BASE is how the ports tree refers to the location of the base source 
files
+.if !defined(SRC_BASE)
+SRC_BASE!= realpath "${SYSDIR:H}/"
+.endif
+# OSVERSION is used by some ports to determine build options
+.if !defined(OSRELDATE)
+# Definition copied from src/Makefile.inc1
+OSRELDATE!=awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
+   ${MAKEOBJDIRPREFIX}${SRC_BASE}/include/osreldate.h
+.endif
+# Keep the related ports builds in the obj directory so that they are only 
rebuilt once per kernel build
+WRKDIRPREFIX?= ${MAKEOBJDIRPREFIX}${SRC_BASE}/sys/${KERNCONF}
+PORTSMODULESENV=\
+   PATH=${PATH}:${LOCALBASE}/bin:${LOCALBASE}/sbin \
+   SRC_BASE=${SRC_BASE} \
+   OSVERSION=${OSRELDATE} \
+   WRKDIRPREFIX=${WRKDIRPREFIX}
 .for __target in all install reinstall clean
 ${__target}: ports-${__target}
 ports-${__target}:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r236822 - head/sys/kern

2012-06-09 Thread Doug Barton
According to the tinderbox these commits seem to have broken the build.
I built r236818 successfully earlier today ...

Doug

-- 

This .signature sanitized for your protection


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r236586 - in head/contrib/bind9: . lib/dns

2012-06-04 Thread Doug Barton
Author: dougb
Date: Mon Jun  4 22:11:20 2012
New Revision: 236586
URL: http://svn.freebsd.org/changeset/base/236586

Log:
  Upgrade to 9.8.3-P1, the latest from ISC. This version contains
  a critical bugfix:
  
Processing of DNS resource records where the rdata field is zero length
may cause various issues for the servers handling them.
  
Processing of these records may lead to unexpected outcomes. Recursive
servers may crash or disclose some portion of memory to the client.
Secondary servers may crash on restart after transferring a zone
containing these records. Master servers may corrupt zone data if the
zone option "auto-dnssec" is set to "maintain". Other unexpected
problems that are not listed here may also be encountered.
  
  All BIND users are strongly encouraged to upgrade.

Modified:
  head/contrib/bind9/CHANGES
  head/contrib/bind9/lib/dns/rdata.c
  head/contrib/bind9/lib/dns/rdataslab.c
  head/contrib/bind9/version
Directory Properties:
  head/contrib/bind9/   (props changed)

Modified: head/contrib/bind9/CHANGES
==
--- head/contrib/bind9/CHANGES  Mon Jun  4 22:07:05 2012(r236585)
+++ head/contrib/bind9/CHANGES  Mon Jun  4 22:11:20 2012(r236586)
@@ -1,3 +1,8 @@
+   --- 9.8.3-P1 released ---
+
+3331.  [security]  dns_rdataslab_fromrdataset could produce bad
+   rdataslabs. [RT #29644]
+   
--- 9.8.3 released ---
 
 3318.  [tuning]Reduce the amount of work performed while holding a

Modified: head/contrib/bind9/lib/dns/rdata.c
==
--- head/contrib/bind9/lib/dns/rdata.c  Mon Jun  4 22:07:05 2012
(r236585)
+++ head/contrib/bind9/lib/dns/rdata.c  Mon Jun  4 22:11:20 2012
(r236586)
@@ -329,8 +329,8 @@ dns_rdata_compare(const dns_rdata_t *rda
 
REQUIRE(rdata1 != NULL);
REQUIRE(rdata2 != NULL);
-   REQUIRE(rdata1->data != NULL);
-   REQUIRE(rdata2->data != NULL);
+   REQUIRE(rdata1->length == 0 || rdata1->data != NULL);
+   REQUIRE(rdata2->length == 0 || rdata2->data != NULL);
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1));
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2));
 
@@ -360,8 +360,8 @@ dns_rdata_casecompare(const dns_rdata_t 
 
REQUIRE(rdata1 != NULL);
REQUIRE(rdata2 != NULL);
-   REQUIRE(rdata1->data != NULL);
-   REQUIRE(rdata2->data != NULL);
+   REQUIRE(rdata1->length == 0 || rdata1->data != NULL);
+   REQUIRE(rdata2->length == 0 || rdata2->data != NULL);
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1));
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2));
 

Modified: head/contrib/bind9/lib/dns/rdataslab.c
==
--- head/contrib/bind9/lib/dns/rdataslab.c  Mon Jun  4 22:07:05 2012
(r236585)
+++ head/contrib/bind9/lib/dns/rdataslab.c  Mon Jun  4 22:11:20 2012
(r236586)
@@ -126,6 +126,11 @@ isc_result_t
 dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
   isc_region_t *region, unsigned int reservelen)
 {
+   /*
+* Use &removed as a sentinal pointer for duplicate
+* rdata as rdata.data == NULL is valid.
+*/
+   static unsigned char removed;
struct xrdata  *x;
unsigned char  *rawbuf;
 #if DNS_RDATASET_FIXED
@@ -169,6 +174,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_
INSIST(result == ISC_R_SUCCESS);
dns_rdata_init(&x[i].rdata);
dns_rdataset_current(rdataset, &x[i].rdata);
+   INSIST(x[i].rdata.data != &removed);
 #if DNS_RDATASET_FIXED
x[i].order = i;
 #endif
@@ -201,8 +207,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_
 */
for (i = 1; i < nalloc; i++) {
if (compare_rdata(&x[i-1].rdata, &x[i].rdata) == 0) {
-   x[i-1].rdata.data = NULL;
-   x[i-1].rdata.length = 0;
+   x[i-1].rdata.data = &removed;
 #if DNS_RDATASET_FIXED
/*
 * Preserve the least order so A, B, A -> A, B
@@ -292,7 +297,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_
 #endif
 
for (i = 0; i < nalloc; i++) {
-   if (x[i].rdata.data == NULL)
+   if (x[i].rdata.data == &removed)
continue;
 #if DNS_RDATASET_FIXED
offsettable[x[i].order] = rawbuf - offsetbase;

Modified: head/contrib/bind9/version
==
--- head/contrib/bind9/version  Mon Jun  4 22:07:05 2012(r236585)
+++ head/contrib/bind9/version  Mon Jun  4 22:11:20 2012(r236586)
@@ -6,5 +6,5 @@
 MAJORVER=9
 MINORVER=8
 PATCHVER=3
-RELEASETYPE=
-RELEASEVER=
+RELEASETYPE=-P
+RELEASEVER=1
_

Re: svn commit: r236362 - head/share/misc

2012-05-31 Thread Doug Barton
On 5/31/2012 6:59 PM, Eitan Adler wrote:
> On 31 May 2012 18:29, Doug Barton  wrote:
>> On 5/31/2012 12:33 PM, Tom Judge wrote:
>>>   - Sort the node list while I'm here.
>>
>> This falls under the category of a "whitespace" change, which should
>> have been done as a separate commit (usually first, then substantive
>> changes second).
> 
> I figured none of the changes were really substantive so it was okay
> to sort and fix the \n at the same time.

These were the changes:

Log:
  - Fix my botched merge and correct mentor ordering. (Spotted by flo)
  - Fix missing new line in node block. (Spotted by gavin)
  - Sort the node list while I'm here.

The last is definitely WS, the second probably is, the first definitely
isn't.

hth,

Doug

-- 

This .signature sanitized for your protection
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r236362 - head/share/misc

2012-05-31 Thread Doug Barton
On 5/31/2012 12:33 PM, Tom Judge wrote:
>   - Sort the node list while I'm here.

This falls under the category of a "whitespace" change, which should
have been done as a separate commit (usually first, then substantive
changes second).

This is a tiny bit more work for you, but down the road when someone who
is !tj is reviewing the logs, diffs, etc. it really helps to make the
substantive changes stand out.

Doug

-- 

This .signature sanitized for your protection
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r236255 - head/contrib/groff/tmac

2012-05-30 Thread Doug Barton
On 05/30/2012 20:07, David O'Brien wrote:
> On Wed, May 30, 2012 at 07:34:33AM +0400, Sergey Kandaurov wrote:
>> On 29 May 2012 23:49, David E. O'Brien  wrote:
> ...
>>> Modified: head/contrib/groff/tmac/doc-common
> ...
>>> +.ds doc-operating-system-FreeBSD-8.3 � � 8.3
>>> +.ds doc-operating-system-FreeBSD-9.1 � � 9.1
>>> +.ds doc-operating-system-FreeBSD-10.0 � �10.0
>> This should be imported from savannah.gnu.org repository,
>> and not changed directly.
> 
> Unfortunately we cannot do that per r217595:
> 
>   This is a direct commit to contrib/ as we will no longer import
>   any newer groff snapshots, due to licensing issues.
> 
>> For local changes not found in the (latest) contrib doc-common
>> you should use gnu/usr.bin/groff/tmac/mdoc.local
> 
> I followed r217595, was that commit the wrong approach?

TMK all our local changes have always been made to mdoc.local. The
history on both files seems to support this as well.

Doug

-- 

This .signature sanitized for your protection
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r236196 - in head: contrib/bind9 contrib/bind9/bin/named contrib/bind9/bin/named/unix contrib/bind9/lib/bind9 contrib/bind9/lib/dns contrib/bind9/lib/dns/include/dns contrib/bind9/lib/d...

2012-05-28 Thread Doug Barton
Author: dougb
Date: Mon May 28 19:47:56 2012
New Revision: 236196
URL: http://svn.freebsd.org/changeset/base/236196

Log:
  Upgrade to BIND version 9.8.3, the latest from ISC.
  
  Feature Change
  
  *  BIND now recognizes the TLSA resource record type, created to
 support IETF DANE (DNS-based Authentication of Named Entities)
  
  Bug Fix
  
  *  The locking strategy around the handling of iterative queries
 has been tuned to reduce unnecessary contention in a multi-
 threaded environment.
  
  Other critical bug fixes are included.
  
  All BIND users are encouraged to upgrade.

Added:
  head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.c
 - copied unchanged from r236173, 
vendor/bind9/dist/lib/dns/rdata/generic/tlsa_52.c
  head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.h
 - copied unchanged from r236173, 
vendor/bind9/dist/lib/dns/rdata/generic/tlsa_52.h
Modified:
  head/contrib/bind9/CHANGES
  head/contrib/bind9/README
  head/contrib/bind9/bin/named/builtin.c
  head/contrib/bind9/bin/named/query.c
  head/contrib/bind9/bin/named/server.c
  head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c
  head/contrib/bind9/lib/bind9/api
  head/contrib/bind9/lib/bind9/check.c
  head/contrib/bind9/lib/dns/api
  head/contrib/bind9/lib/dns/dnssec.c
  head/contrib/bind9/lib/dns/include/dns/ecdb.h
  head/contrib/bind9/lib/dns/include/dns/rpz.h
  head/contrib/bind9/lib/dns/include/dns/sdb.h
  head/contrib/bind9/lib/dns/include/dns/stats.h
  head/contrib/bind9/lib/dns/include/dns/tsec.h
  head/contrib/bind9/lib/dns/include/dns/view.h
  head/contrib/bind9/lib/dns/rbtdb.c
  head/contrib/bind9/lib/dns/resolver.c
  head/contrib/bind9/lib/dns/sdb.c
  head/contrib/bind9/lib/dns/tkey.c
  head/contrib/bind9/lib/dns/zone.c
  head/contrib/bind9/lib/isc/pthreads/mutex.c
  head/contrib/bind9/lib/isccfg/api
  head/contrib/bind9/lib/isccfg/parser.c
  head/contrib/bind9/version
  head/lib/bind/dns/code.h
  head/lib/bind/dns/dns/enumtype.h
  head/lib/bind/dns/dns/rdatastruct.h
Directory Properties:
  head/contrib/bind9/   (props changed)

Modified: head/contrib/bind9/CHANGES
==
--- head/contrib/bind9/CHANGES  Mon May 28 19:44:35 2012(r236195)
+++ head/contrib/bind9/CHANGES  Mon May 28 19:47:56 2012(r236196)
@@ -1,3 +1,56 @@
+   --- 9.8.3 released ---
+
+3318.  [tuning]Reduce the amount of work performed while holding a
+   bucket lock when finshed with a fetch context.
+   [RT #29239]
+
+3314.  [bug]   The masters list could be updated while refesh_callback
+   and stub_callback were using it. [RT #26732]
+
+3313.  [protocol]  Add TLSA record type. [RT #28989]
+
+3312.  [bug]   named-checkconf didn't detect a bad dns64 clients acl.
+   [RT #27631]
+
+3311.  [bug]   Abort the zone dump if zone->db is NULL in
+   zone.c:zone_gotwritehandle. [RT #29028]
+
+3310.  [test]  Increase table size for mutex profiling. [RT #28809]
+
+3309.  [bug]   resolver.c:fctx_finddone() was not threadsafe.
+   [RT #27995]
+
+3307.  [bug]   Add missing ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS.
+   [RT #28956]
+
+3306.  [bug]   Improve DNS64 reverse zone performance. [RT #28563]
+
+3305.  [func]  Add wire format lookup method to sdb. [RT #28563]
+
+3304.  [bug]   Use hmctx, not mctx when freeing rbtdb->heaps.
+   [RT #28571]
+
+3302.  [bug]   dns_dnssec_findmatchingkeys could fail to find
+   keys if the zone name contained character that
+   required special mappings. [RT #28600]
+
+3301.  [contrib]   Update queryperf to build on darwin.  Add -R flag
+   for non-recursive queries. [RT #28565]
+
+3300.  [bug]   Named could die if gssapi was enabled in named.conf
+   but was not compiled in. [RT #28338]
+
+3299.  [bug]   Make SDB handle errors from database drivers better.
+   [RT #28534]
+
+3232.  [bug]   Zero zone->curmaster before return in
+   dns_zone_setmasterswithkeys(). [RT #26732]
+
+3183.  [bug]   Added RTLD_GLOBAL flag to dlopen call. [RT #26301]
+
+3197.  [bug]   Don't try to log the filename and line number when
+   the config parser can't open a file. [RT #22263]
+
--- 9.8.2 released ---
 
 3298.  [bug]   Named could dereference a NULL pointer in
@@ -58,9 +111,9 @@
 3274.  [bug]   Log when a zone is not reusable.  Only set loadtime
on successful loads.  [RT #27650]
 
-3273.   [bug]    responses could be returned in the additional
-section even when filter--on-v4 was in use.
-[RT #27292]
+3273. 

Re: svn commit: r235560 - head/sys/boot/forth

2012-05-17 Thread Doug Barton
On 05/17/2012 13:00, Devin Teske wrote:
> Author: dteske
> Date: Thu May 17 20:00:34 2012
> New Revision: 235560
> URL: http://svn.freebsd.org/changeset/base/235560
> 
> Log:
>   Update contact info.
>   
>   PR: N/A (mentor approved)
>   Submitted by:   dteske
>   Reviewed by:dteske (mentor approved)

All of the above is wrong. Your mentor should be helping you understand
how to properly do commit messages.

> +.An Devin Teske Aq dte...@freebsd.org .

In formal contex' we write @FreeBSD.org, FYI.

hth,

Doug
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r235107 - in head/etc: defaults rc.d

2012-05-07 Thread Doug Barton
On 05/06/2012 01:46 PM, Stanislav Sedov wrote:
> Author: stas
> Date: Sun May  6 20:46:04 2012
> New Revision: 235107
> URL: http://svn.freebsd.org/changeset/base/235107
> 
> Log:
>   - Change kfd rc script to be more conformant with rcNG conventions:
> o change rcname to kfd;
> o move mandatory options to command_args;
> o add missing "shutdown" keyword;
> o fix require line.  Kfd doesn't really need to be started before
>   daemons.
>   
>   Suggested by:   dougb
> 
> Modified:
>   head/etc/defaults/rc.conf
>   head/etc/rc.d/kfd

Thanks! :)

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend

2012-05-05 Thread Doug Barton

On Sat, 5 May 2012, Bruce Evans wrote:


On Fri, 4 May 2012, Doug Barton wrote:


On 05/04/2012 11:22 AM, Baptiste Daroussin wrote:

  fetch -s "${FETCHFILE}" >${SIZEFILE}
  SIZE="`cat ${SIZEFILE}`"
-  SIZE="`expr ${SIZE} / 1024`"
+  SIZE=$((SIZE/1024))


Bug; should be '$SIZE/'

No this is perfectly valid


Yes, that works, but it's not our usual style. However, the point is
moot as that whole block should be reduced down to:

SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 ))


The KNF rule that there shall be spaces around binary operators should
probably apply in shell expressions too, but I don't like the spaces
on 1 side of (( and )).  Shell syntax doesn't even allow spaces between
'$' ((.


The "extra" spaces there are a personal style thing. I do it for 2 
reasons, readability primarily, but also to distinguish arithmetic 
operations from $(command) style.



The rc.d style seems to be to use backquotes and not use $(cmd), but I
prefer the opposite except possibly in shell expressions like the above
so that it is easier to separate the commands from the shell expressions.


Yeah, backticks over $() is also a personal style issue, for no 
particular good reason other than "looks better to me." :)


Doug

--

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r235005 - head/usr.sbin/pc-sysinstall/backend

2012-05-04 Thread Doug Barton
On 05/04/2012 11:22 AM, Baptiste Daroussin wrote:
>>> > >   fetch -s "${FETCHFILE}" >${SIZEFILE}
>>> > >   SIZE="`cat ${SIZEFILE}`"
>>> > > -  SIZE="`expr ${SIZE} / 1024`"
>>> > > +  SIZE=$((SIZE/1024))
>> > 
>> > Bug; should be '$SIZE/'
> No this is perfectly valid

Yes, that works, but it's not our usual style. However, the point is
moot as that whole block should be reduced down to:

SIZE=$(( `fetch -s "${FETCHFILE}"` / 1024 ))

If SIZEFILE is needed elsewhere that's a different matter, but as it is
that's a hot mess.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r234927 - in head: etc/rc.d sys/kern

2012-05-02 Thread Doug Barton
On 5/2/2012 7:25 AM, John Baldwin wrote:
>   - Simplify accounting log rotation a bit.  There is no need to re-run
> accton(8) after renaming the new log file to it's real name.

Have you thoroughly tested this change? I remember adding that on
purpose, but I couldn't tell you for sure at this point exactly why.

-- 

This .signature sanitized for your protection
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r234370 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src incl

2012-04-17 Thread Doug Barton
On 04/17/2012 00:22, Jason Evans wrote:
> Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch,
>   prior to 3.0.0 release) as contrib/jemalloc

Isn't stuff in src/contrib supposed to have a vendor/ branch? I think
obrien mentioned this to you ...

See vendor/bind9/dist/FREEBSD-Upgrade for an example if necessary.

Doug

-- 

This .signature sanitized for your protection
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r234093 - in head/etc: defaults rc.d

2012-04-11 Thread Doug Barton

On Wed, 11 Apr 2012, Doug Barton wrote:

Scripts that start persistent services should always include "KEYWORD: 
shutdown" so that they get started cleanly.


Sorry, that's "so that they get shut down cleanly."

Doug
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234165 - in head: contrib/bind9 share/doc/bind9

2012-04-11 Thread Doug Barton
Author: dougb
Date: Thu Apr 12 01:53:33 2012
New Revision: 234165
URL: http://svn.freebsd.org/changeset/base/234165

Log:
  The BIND 9.8.2 tarball was re-rolled to remove 9.8.1 release notes.
  This change was noticed by ISC at:
  
  https://lists.isc.org/pipermail/bind-users/2012-April/087345.html
  
  and verified by me both by comparing the contents of the old and new
  distfiles and by verifying the PGP signature on the new distfile.

Deleted:
  head/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.html
  head/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.pdf
  head/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.txt
  head/contrib/bind9/release-notes.css
Modified:
  head/share/doc/bind9/Makefile
Directory Properties:
  head/contrib/bind9/   (props changed)

Modified: head/share/doc/bind9/Makefile
==
--- head/share/doc/bind9/Makefile   Thu Apr 12 01:14:03 2012
(r234164)
+++ head/share/doc/bind9/Makefile   Thu Apr 12 01:53:33 2012
(r234165)
@@ -8,9 +8,7 @@ SRCDIR= ${BIND_DIR}/doc
 NO_OBJ=
 
 FILESGROUPS=   TOP ARM MISC
-TOP=   CHANGES COPYRIGHT FAQ HISTORY README \
-   RELEASE-NOTES-BIND-9.8.1.pdf RELEASE-NOTES-BIND-9.8.1.txt \
-   RELEASE-NOTES-BIND-9.8.1.html release-notes.css
+TOP=   CHANGES COPYRIGHT FAQ HISTORY README
 TOPDIR=${DOCDIR}/bind9
 ARM=   Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html \
Bv9ARM.ch04.html Bv9ARM.ch05.html Bv9ARM.ch06.html \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r234093 - in head/etc: defaults rc.d

2012-04-11 Thread Doug Barton
This script has many problems. First, new scripts in the base should 
never use BEFORE since this makes debugging rcorder issues harder. 
Please instead add this to the REQUIRE line in DAEMON. You can use 
'service -r' to get an idea of where it will be included at boot time.


Second, for new scripts the name of the file, $name, and PROVIDE should 
all the the same, in this case "kfd". That implies that the rcvar should 
be kfd_enable unless there is a very good reason for it to be 
different, which in this case there is not one that I can see. (FYI, 
the "d" in "kfd" implies "server.")


Scripts that start persistent services should always include "KEYWORD: 
shutdown" so that they get started cleanly. It's not clear to me if this 
script should also include the nojail keyword. It's also generally a 
good idea to add a REQUIRE line unless it truly doesn't matter. I 
guessed at REQUIRE: kerberos ala the kadamind script, if that's wrong 
please let me know.


Next, the arguments in the script, and the script generally, don't
follow the default format. It's very helpful when doing mass 
reviews/updates if the script looks the same as other similar scripts 
unless there is a good reason for it to be different. The reference at 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html 
should help.


It's also unclear why you are unset'ing start_cmd, but not supplying 
your own start method. The way that you're using kfd_server is also 
totally wrong, as is hard-coding kfd_flags in the script. If the -i 
argument is always needed, it should be included in command_args. If 
it's not always needed, but is generally recommended, you should include 
it in /etc/defaults/rc.conf so that the user can easily override it. 
I've assumed the latter, if it should always be included please let me 
know.


Finally, you neglected to update rc.conf.5.

The attached patch fixes the problems mentioned above, modulo the 
rc.conf.5 update which I'll leave to you. In order to avoid 
inconvenience to those tracking HEAD who want to use this new feature I 
plan to commit this in the next couple of days if I don't hear from you.


In the future it would probably be a good idea to submit patches to 
freebsd-rc@ for review.


hth,

Doug


On Tue, 10 Apr 2012, Stanislav Sedov wrote:


Author: stas
Date: Tue Apr 10 09:27:41 2012
New Revision: 234093
URL: http://svn.freebsd.org/changeset/base/234093

Log:
 - Add rc.d script for kfd, kerberos forwarded tickets daemon.

Added:
 head/etc/rc.d/kfd   (contents, props changed)
Modified:
 head/etc/defaults/rc.conf
 head/etc/rc.d/Makefile

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Tue Apr 10 07:38:58 2012(r234092)
+++ head/etc/defaults/rc.conf   Tue Apr 10 09:27:41 2012(r234093)
@@ -297,6 +297,8 @@ kadmind5_server_enable="NO"   # Run kadmin
kadmind5_server="/usr/libexec/kadmind"# path to kerberos 5 admin daemon
kpasswdd_server_enable="NO"   # Run kpasswdd (or NO)
kpasswdd_server="/usr/libexec/kpasswdd"   # path to kerberos 5 passwd daemon
+kfd_server_enable="NO"   # Run kfd (or NO)
+kfd_server="/usr/libexec/kfd"# path to kerberos 5 kfd daemon

gssd_enable="NO"  # Run the gssd daemon (or NO).
gssd_flags="" # Flags for gssd.

Modified: head/etc/rc.d/Makefile
==
--- head/etc/rc.d/Makefile  Tue Apr 10 07:38:58 2012(r234092)
+++ head/etc/rc.d/Makefile  Tue Apr 10 09:27:41 2012(r234093)
@@ -66,6 +66,7 @@ FILES=DAEMON \
kadmind \
kerberos \
keyserv \
+   kfd \
kld \
kldxref \
kpasswdd \

Added: head/etc/rc.d/kfd
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/etc/rc.d/kfd   Tue Apr 10 09:27:41 2012(r234093)
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: kfd
+# BEFORE: DAEMON
+
+. /etc/rc.subr
+
+name="kfd"
+load_rc_config $name
+rcvar="kfd_server_enable"
+unset start_cmd
+command="${kfd_server}"
+kfd_flags="-i"
+command_args="&"
+
+run_rc_command "$1"





--

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/
Index: defaults/rc.conf
===
--- defaults/rc.conf(revision 234164)
+++ defaults/rc.conf(working copy)
@@ -297,8 +297,9 @@
 kadmind5_server="/usr/libexec/kadmind" # path to kerberos 5 admin daemon
 kpasswdd_server_enable="NO"# Run kpasswdd (or NO)
 kpasswdd_server="/usr/libexec/kpasswdd"# path to kerberos 5 passwd 
daemon
-kfd_server_enable="NO" # Run kfd (or NO)
-kfd

svn commit: r233909 - head/share/doc/bind9

2012-04-04 Thread Doug Barton
Author: dougb
Date: Wed Apr  4 23:58:41 2012
New Revision: 233909
URL: http://svn.freebsd.org/changeset/base/233909

Log:
  Add Bv9ARM.pdf to the list of docs to install.

Modified:
  head/share/doc/bind9/Makefile

Modified: head/share/doc/bind9/Makefile
==
--- head/share/doc/bind9/Makefile   Wed Apr  4 23:45:15 2012
(r233908)
+++ head/share/doc/bind9/Makefile   Wed Apr  4 23:58:41 2012
(r233909)
@@ -15,7 +15,7 @@ TOPDIR=   ${DOCDIR}/bind9
 ARM=   Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html \
Bv9ARM.ch04.html Bv9ARM.ch05.html Bv9ARM.ch06.html \
Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html \
-   Bv9ARM.ch10.html Bv9ARM.html \
+   Bv9ARM.ch10.html Bv9ARM.html Bv9ARM.pdf \
man.arpaname.html man.ddns-confgen.html man.dig.html \
man.dnssec-dsfromkey.html man.dnssec-keyfromlabel.html \
man.dnssec-keygen.html man.dnssec-revoke.html \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r233294 - in head: . contrib/com_err crypto/heimdal crypto/heimdal/admin crypto/heimdal/appl crypto/heimdal/appl/afsutil crypto/heimdal/appl/ftp crypto/heimdal/appl/ftp/common crypto/h

2012-03-30 Thread Doug Barton
On 3/29/2012 4:16 AM, David Chisnall wrote:
> On 29 Mar 2012, at 04:36, Doug Barton wrote:
> 
>> All of the stuff that pkgng relies on (including the tool itself)
>> are going to be in the ports collection, where they belong. We
>> should have moved pkg_* there years ago, but this change is at
>> least a step in the right direction.
> 
> Wait... what?  Why should pkgng be in ports (other than now, while
> it's under development)?  I'd like to see it used for managing some
> of the optional parts of the base system and probably eventually
> replacing freebsd-update, not have it as another bolt-on that is not
> part of the core system.  Not to mention the bootstrapping problem if
> every user who wants to use binary packages needs to use ports to
> build pkgng.

The bootstrapping problem has been discussed in detail on -ports@,
#bsdports, etc.; and the solutions are well known, and quite simple. A)
the installer needs to be modified to install certain packages by
default, and B) we need a tiny binary in the base (something like
pkg_bootstrap, but hopefully with a better name) to bring the
ports/package tools up to date. And optionally, C) a button on whatever
post-install configurator we end up with to do the same task.

Someone else already gave part of the picture as to why this change
needs to be made, but to add a bit more detail ... We currently have (at
minimum) a 5 year cycle of introducing new features to the pkg_* tools
specifically, and often to the ports generally. No, that's not a typo.
That's how long it takes to introduce something to the newest FreeBSD
version, and then have that change percolate over time to all of the
supported FreeBSD versions. We can't continue to operate like that.

If FreeBSD is going to survive as a project it has to be able to
innovate. In order to do that we have to take the best parts of the
"FreeBSD is a complete system" model and at the same time be willing to
be honest with ourselves about where and how that model is holding us
back. The whole concept of "If it's important, it must be in the base"
is one example. The flip side of that, "If it's not in the base, it's
not important" is even more dangerous/destructive.

We absolutely have to move to a model where "The Base" is a smaller
version of what we're shipping now, and more of the 3rd party stuff is
moved out to ports only. I'm not talking about a Linux distro model
where everything is a package, but we have to stop thinking that just
because something is done in Linux means that we can never consider
adopting the best parts of the concepts for FreeBSD.

We need to see the ports as part of the "The FreeBSD System."

Doug
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r233625 - head/lib/libc/iconv

2012-03-28 Thread Doug Barton
Joel,

Thanks for doing this cleanup. It's unglamorous, but very necessary. You
probably have this planned already, but I wanted to make sure that you
have MFC'ing this work on your list. Merging back the formatting changes
makes it much easier to merge (and then verify) changes to the content
down the road.

Doug
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r233294 - in head: . contrib/com_err crypto/heimdal crypto/heimdal/admin crypto/heimdal/appl crypto/heimdal/appl/afsutil crypto/heimdal/appl/ftp crypto/heimdal/appl/ftp/common crypto/h

2012-03-28 Thread Doug Barton
On 3/27/2012 2:10 PM, Ivan Voras wrote:
> It will help both present
> development (the pkgng is also AFAIK using sqlite)

All of the stuff that pkgng relies on (including the tool itself) are
going to be in the ports collection, where they belong. We should have
moved pkg_* there years ago, but this change is at least a step in the
right direction.

Doug
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r233052 - head/share/mk

2012-03-19 Thread Doug Barton
On 3/19/2012 12:37 PM, Dimitry Andric wrote:
> It would be much nicer to be able to write:
> 
> .if defined(FOO)
>   .if defined(BAR)
> CFLAGS+=  -DFOO_BAR
>   .endif
> .endif

Take a look at /usr/ports/Mk/bsd.port.mk for how this can be done.

-- 

This .signature sanitized for your protection
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r233090 - head/usr.sbin/moused

2012-03-17 Thread Doug Barton
On 03/17/2012 09:40, Hans Petter Selasky wrote:
> Author: hselasky
> Date: Sat Mar 17 16:40:15 2012
> New Revision: 233090
> URL: http://svn.freebsd.org/changeset/base/233090
> 
> Log:
>   The UMS module is now loaded by rules in /etc/devd/usb.conf which
>   are executed by devd. Remove duplicate kldload.

Are the calls you removed hurting anything? Use of devd is not mandatory.

Doug

-- 

This .signature sanitized for your protection
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232473 - in head: share/mk sys/conf

2012-03-03 Thread Doug Barton
On 03/03/2012 12:05, Ben Kaduk wrote:
> On Sat, Mar 3, 2012 at 3:03 PM, Doug Barton  wrote:
>> On 03/03/2012 10:58, Dimitry Andric wrote:
>>> However, since it is apparently an expected use case to build using old
>>>   .mk files,
>>
>> Expected how? It shouldn't happen if you're building in /usr/src.
>> Wouldn't it be better to track down the real bug?
> 
> I, for one, am frequently building in /usr/ports.  I have not checked,
> but I could very easily see that pulling the system .mk files from the
> installed locations and not the source tree.

Building ports where the sources and the installed kernel differ is not
a supported configuration. The fact that it happens to work most of the
time is a bonus.

This is a very dangerous precedent to set.


-- 

This .signature sanitized for your protection
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232473 - in head: share/mk sys/conf

2012-03-03 Thread Doug Barton
On 03/03/2012 10:58, Dimitry Andric wrote:
> However, since it is apparently an expected use case to build using old
>   .mk files,

Expected how? It shouldn't happen if you're building in /usr/src.
Wouldn't it be better to track down the real bug?

-- 

This .signature sanitized for your protection
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232065 - head/sys/dev/fb

2012-02-23 Thread Doug Barton
On 02/23/2012 16:17, Jung-uk Kim wrote:
> I remember there were some discussions in developers@ that 
> "2009-2012" is more appropriate than "2009, 2010, 2012" or 
> "2009-2010, 2012", if my memory serves.  Anyone?

"2009, 2010, 2012" is as synonym for "2009-2010, 2012" and I see it both
ways. That's not the issue. (However, if it were 2008-2010 that is
generally preferred vs. listing all 3 years individually.)

The issue is that it's a basic tenet of copyright law that you cannot
claim copyright in a year that you didn't actually make any changes.
This makes sense if you think about it ... your rights from the last
year you changed something don't expire at the end of that year, and if
you didn't make changes in 2011 you don't have any new material that
needs protection.

For instance:

Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California.  All rights reserved.


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232080 - in head: share/man/man4 sys/net

2012-02-23 Thread Doug Barton
On 02/23/2012 15:38, Andrew Thompson wrote:

> Fixed.

Thanks for the quick response. :)


-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232065 - head/sys/dev/fb

2012-02-23 Thread Doug Barton
According to the logs you didn't make any changes to this file in 2011,
so that would be properly written as: 2009-2010, 2012


hth,

Doug


On 02/23/2012 11:16, Jung-uk Kim wrote:
> Author: jkim
> Date: Thu Feb 23 19:16:05 2012
> New Revision: 232065
> URL: http://svn.freebsd.org/changeset/base/232065
> 
> Log:
>   Update my copyright date.
> 
> Modified:
>   head/sys/dev/fb/vesa.c
> 
> Modified: head/sys/dev/fb/vesa.c
> ==
> --- head/sys/dev/fb/vesa.cThu Feb 23 19:13:19 2012(r232064)
> +++ head/sys/dev/fb/vesa.cThu Feb 23 19:16:05 2012(r232065)
> @@ -1,6 +1,6 @@
>  /*-
>   * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith
> - * Copyright (c) 2009-2010 Jung-uk Kim 
> + * Copyright (c) 2009-2012 Jung-uk Kim 
>   * All rights reserved.
>   *
>   * Redistribution and use in source and binary forms, with or without
> 



-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232080 - in head: share/man/man4 sys/net

2012-02-23 Thread Doug Barton
First, I'm always glad to see devs updating the documentation, so please
don't take this as in any way being critical, just trying to help. :)


On 02/23/2012 13:56, Andrew Thompson wrote:
> Modified: head/share/man/man4/lagg.4
> ==
> --- head/share/man/man4/lagg.4Thu Feb 23 21:54:04 2012
> (r232079)
> +++ head/share/man/man4/lagg.4Thu Feb 23 21:56:53 2012
> (r232080)
> @@ -142,10 +142,12 @@ and
>  modes will use the RSS hash from the network card if available to avoid
>  computing one, this may give poor traffic distribution if the hash is invalid
>  or uses less of the protocol header information.
> -Local hash computation can be forced by setting the
> +Local hash computation can be forced per interface by setting the

This is a great example of why we use short lines in the man page
sources. It allows people to come along later and add text without
having to make changes to multiple lines.

>  .Va net.link.lagg.X.use_flowid
>  .Xr sysctl 8
> -variable to zero where X is the interface number.
> +variable to zero where X is the interface number, the default for
> +new interfaces is set via
> +.Va net.link.lagg.default_use_flowid .

If adding a comma there was the right change the new clause should still
have started on the next line, for the reason described above. However,
what you added is actually a sentence that can/should stand on its own.


hth,

Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r231999 - head/sys/conf

2012-02-22 Thread Doug Barton
On 02/22/2012 07:05, Josh Paetzel wrote:
> -# CPU.  This behaviour is enabled by default, so this option can be used

That's not a typo, it's an alternate spelling, which we usually don't
"correct" (same with initialisation). I'm not asking for the change to
be backed out, just letting you know for future reference.


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r231862 - head/etc/defaults

2012-02-17 Thread Doug Barton
Author: dougb
Date: Fri Feb 17 07:59:37 2012
New Revision: 231862
URL: http://svn.freebsd.org/changeset/base/231862

Log:
  Increase the default shutdown timer to 90 seconds. This will allow
  certain systems that take a long time to shut down, without adversely
  affecting things that shut down quickly. It's also 30 seconds less than
  the default hard limit of 120 seconds in kern.init_shutdown_timeout.
  
  PR:   conf/109272
  Submitted by: Radim Kolar SF.NET 

Modified:
  head/etc/defaults/rc.conf

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Fri Feb 17 06:58:40 2012(r231861)
+++ head/etc/defaults/rc.conf   Fri Feb 17 07:59:37 2012(r231862)
@@ -24,7 +24,7 @@
 rc_debug="NO"  # Set to YES to enable debugging output from rc.d
 rc_info="NO"   # Enables display of informational messages at boot.
 rc_startmsgs="YES" # Show "Starting foo:" messages at boot
-rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown
+rcshutdown_timeout="90" # Seconds to wait before terminating rc.shutdown
 early_late_divider="FILESYSTEMS"   # Script that separates early/late
# stages of the boot process.  Make sure you know
# the ramifications if you change this.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r231849 - head/etc

2012-02-16 Thread Doug Barton
On 02/16/2012 17:21, Eitan Adler wrote:
>   Style: prefer the use of line continuations to +=

Thanks!


-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r231667 - in head: etc etc/defaults etc/rc.d share/man/man5

2012-02-14 Thread Doug Barton
Author: dougb
Date: Tue Feb 14 10:51:24 2012
New Revision: 231667
URL: http://svn.freebsd.org/changeset/base/231667

Log:
  Fix various issues with the NFS and RPC related scripts:
  
  1. Add new functionality to the force_depend method to incorporate the
 tests for whether the service is enabled and/or already running.
  2. Add a new option to bypass checking only that the service is enabled
 at boot time, and always check if it is running.
  3. Use this new functionality to greatly simplify the rc.d scripts that
 use force_depend.
  4. Add a force_depend for statd in lockd
  5. Remove the check that either nfs_server or nfs_client is _enable'd
 from statd and lockd. This was always overkill, and prevented using
 the {one|force}start options, as well as stop'ing on the command line.
  6. The yp* scripts had some of their arguments in various weird orders.
 Bring them into line with the model.
  7. If mountd fails to create /var/db/mountdtab, err out.
  
  Ideas, suggestions, and/or review from delphij and jilles.
  Pointy hats are completely my responsibility however.

Modified:
  head/etc/defaults/rc.conf
  head/etc/rc.d/amd
  head/etc/rc.d/apmd
  head/etc/rc.d/keyserv
  head/etc/rc.d/lockd
  head/etc/rc.d/mountd
  head/etc/rc.d/nfsd
  head/etc/rc.d/statd
  head/etc/rc.d/ypbind
  head/etc/rc.d/yppasswdd
  head/etc/rc.d/ypserv
  head/etc/rc.d/ypset
  head/etc/rc.d/ypupdated
  head/etc/rc.d/ypxfrd
  head/etc/rc.subr
  head/share/man/man5/rc.conf.5

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Tue Feb 14 10:34:27 2012(r231666)
+++ head/etc/defaults/rc.conf   Tue Feb 14 10:51:24 2012(r231667)
@@ -29,6 +29,8 @@ early_late_divider="FILESYSTEMS"  # Scrip
# stages of the boot process.  Make sure you know
# the ramifications if you change this.
# See rc.conf(5) for more details.
+always_force_depends="NO"  # Set to check that indicated dependencies are
+   # running during boot (can increase boot time).
 
 swapfile="NO"  # Set to name of swapfile if aux swapfile desired.
 apm_enable="NO"# Set to YES to enable APM BIOS functions (or 
NO).

Modified: head/etc/rc.d/amd
==
--- head/etc/rc.d/amd   Tue Feb 14 10:34:27 2012(r231666)
+++ head/etc/rc.d/amd   Tue Feb 14 10:51:24 2012(r231667)
@@ -19,15 +19,8 @@ extra_commands="reload"
 
 amd_precmd()
 {
-   if ! checkyesno nfs_client_enable; then
-   force_depend nfsclient || return 1
-   fi
-
-   if ! checkyesno rpcbind_enable  && \
-   ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
-   then
-   force_depend rpcbind || return 1
-   fi
+   force_depend nfsclient nfs_client || return 1
+   force_depend rpcbind || return 1
 
case ${amd_map_program} in
[Nn][Oo] | '')
@@ -49,7 +42,6 @@ amd_precmd()
command_args="> /var/run/amd.pid 2> /dev/null"
;;
esac
-   return 0
 }
 
 load_rc_config $name

Modified: head/etc/rc.d/apmd
==
--- head/etc/rc.d/apmd  Tue Feb 14 10:34:27 2012(r231666)
+++ head/etc/rc.d/apmd  Tue Feb 14 10:51:24 2012(r231667)
@@ -19,24 +19,18 @@ apmd_prestart()
 {
case `${SYSCTL_N} hw.machine_arch` in
i386)
-   # Enable apm if it is not already enabled
-   if ! checkyesno apm_enable  && \
-   ! /etc/rc.d/apm forcestatus 1>/dev/null 2>&1
-   then
-   force_depend apm || return 1
-   fi
+   force_depend apm || return 1
 
# Warn user about acpi apm compatibility support which
# does not work with apmd.
if [ ! -e /dev/apmctl ]; then
-   warn "/dev/apmctl not found; kernel is missing apm(4)"
+   warn "/dev/apmctl not found; kernel is missing apm(4)"
fi
;;
*)
return 1
;;
esac
-   return 0
 }
 
 load_rc_config $name

Modified: head/etc/rc.d/keyserv
==
--- head/etc/rc.d/keyserv   Tue Feb 14 10:34:27 2012(r231666)
+++ head/etc/rc.d/keyserv   Tue Feb 14 10:51:24 2012(r231667)
@@ -19,13 +19,7 @@ start_precmd="keyserv_prestart"
 
 keyserv_prestart()
 {
-   if ! checkyesno rpcbind_enable  && \
-   ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
-   then
-   force_depend rpcbind || return 1
-   fi
-
-   return 0
+   force_depend rpcbind || return 1
 }
 
 load_rc_config $name

Modified: head/e

Re: svn commit: r231534 - in head: etc/rc.d sbin/init

2012-02-11 Thread Doug Barton
On 02/11/2012 15:21, Ed Schouten wrote:
> Hi Doug,
> 
> * Doug Barton , 20120211 23:58:
>> New scripts in the base should not use BEFORE. Rather, LOGIN should
>> REQUIRE this script.
> 
> You mean like this?

Yes, thanks.

> I noticed there are still over 60 occurrences of
> BEFORE in the tree. Looks like there's still quite a lot of work to do
> to get rid of it then.

Quite. I tackle them when I can, but the goal at this point is to avoid
making the problem any worse. :)


Doug

> %%%
> Index: etc/rc.d/utx
> ===
> --- etc/rc.d/utx  (revision 231534)
> +++ etc/rc.d/utx  (working copy)
> @@ -5,7 +5,6 @@
>  
>  # PROVIDE: utx
>  # REQUIRE: DAEMON cleanvar
> -# BEFORE:  LOGIN
>  # KEYWORD: shutdown
>  
>  . /etc/rc.subr
> Index: etc/rc.d/LOGIN
> ===
> --- etc/rc.d/LOGIN(revision 231514)
> +++ etc/rc.d/LOGIN(working copy)
> @@ -4,7 +4,7 @@
>  #
>  
>  # PROVIDE: LOGIN
> -# REQUIRE: DAEMON
> +# REQUIRE: DAEMON utx
>  
>  #This is a dummy dependency to ensure user services such as xdm,
>  #inetd, cron and kerberos are started after everything else, in case
> %%%
> 



-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/




signature.asc
Description: OpenPGP digital signature


Re: svn commit: r231534 - in head: etc/rc.d sbin/init

2012-02-11 Thread Doug Barton
On 02/11/2012 12:47, Ed Schouten wrote:
> +# BEFORE:  LOGIN

New scripts in the base should not use BEFORE. Rather, LOGIN should
REQUIRE this script.


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r231507 - head/etc/rc.d

2012-02-10 Thread Doug Barton
Author: dougb
Date: Sat Feb 11 06:21:16 2012
New Revision: 231507
URL: http://svn.freebsd.org/changeset/base/231507

Log:
  In the days before r208307 addswap was running early in the second stage
  of rcorder. Somehow in the intervening period addswap got moved to the
  very end, which is almost certainly not what we want.
  
  This change moves it to right after kld so that for users who need it,
  they'll get it ASAP.

Modified:
  head/etc/rc.d/addswap
  head/etc/rc.d/var

Modified: head/etc/rc.d/addswap
==
--- head/etc/rc.d/addswap   Sat Feb 11 06:05:40 2012(r231506)
+++ head/etc/rc.d/addswap   Sat Feb 11 06:21:16 2012(r231507)
@@ -6,7 +6,7 @@
 #
 
 # PROVIDE: addswap
-# REQUIRE: FILESYSTEMS
+# REQUIRE: FILESYSTEMS kld
 # KEYWORD: nojail
 
 . /etc/rc.subr

Modified: head/etc/rc.d/var
==
--- head/etc/rc.d/var   Sat Feb 11 06:05:40 2012(r231506)
+++ head/etc/rc.d/var   Sat Feb 11 06:21:16 2012(r231507)
@@ -28,7 +28,7 @@
 #
 
 # PROVIDE: var
-# REQUIRE: FILESYSTEMS kld
+# REQUIRE: FILESYSTEMS kld addswap
 
 . /etc/rc.subr
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r231298 - head/etc

2012-02-10 Thread Doug Barton
On 02/09/2012 14:15, Marcel Moolenaar wrote:
> 
> On Feb 9, 2012, at 12:44 PM, Eitan Adler wrote:
> 
>> Author: eadler
>> Date: Thu Feb  9 20:44:20 2012
>> New Revision: 231298
>> URL: http://svn.freebsd.org/changeset/base/231298
>>
>> Log:
>>  Make etc/Makefile more conflict resistant
> 
> Nice. Question though: why not the less verbose
> 
> BIN1 = \
>   foo \
>   bar \
>   baz
> 
> It's probably faster too, and friendlier when
> running "make -dv"

Just for fun I ran 'make INDEX' a bunch of times (which touches every
category and subdir) the existing way, and after changing it from += to
the same syntax as in src. There was no statistically significant
difference in run time.

Is there anything else that would be useful to test to see if there is a
good reason to make this change in ports?


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r231298 - head/etc

2012-02-09 Thread Doug Barton
On 02/09/2012 14:15, Marcel Moolenaar wrote:
> 
> On Feb 9, 2012, at 12:44 PM, Eitan Adler wrote:
> 
>> Author: eadler
>> Date: Thu Feb  9 20:44:20 2012
>> New Revision: 231298
>> URL: http://svn.freebsd.org/changeset/base/231298
>>
>> Log:
>>  Make etc/Makefile more conflict resistant
> 
> Nice. Question though: why not the less verbose
> 
> BIN1 = \
>   foo \
>   bar \
>   baz

Yes, this change should be made to match the style in the rest of src.

FWIW, the style Eitan used is what's used in all of the ports category
Makefiles (which arguably should also be changed, but that's a whole
'nother windmill to tilt at).


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r231194 - in head: etc/defaults etc/rc.d share/man/man5

2012-02-08 Thread Doug Barton
Author: dougb
Date: Wed Feb  8 08:52:40 2012
New Revision: 231194
URL: http://svn.freebsd.org/changeset/base/231194

Log:
  As it stands right now, the default devfs rulesets are only loaded as a
  side effect of something else using them. If they haven't been loaded
  already but you want to use them, say for configuring a jail, you're out
  of luck.
  
  So add a knob to always load the default rulesets. While I'm here document
  the other devfs_ knobs in rc.conf.5.

Modified:
  head/etc/defaults/rc.conf
  head/etc/rc.d/devfs
  head/share/man/man5/rc.conf.5

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Wed Feb  8 08:49:30 2012(r231193)
+++ head/etc/defaults/rc.conf   Wed Feb  8 08:52:40 2012(r231194)
@@ -648,6 +648,7 @@ devfs_rulesets="/etc/defaults/devfs.rule
 devfs_system_ruleset=""# The name (NOT number) of a ruleset to apply 
to /dev
 devfs_set_rulesets=""  # A list of /mount/dev=ruleset_name settings to
# apply (must be mounted already, i.e. fstab(5))
+devfs_load_rulesets="NO"   # Enable to always load the default rulesets
 performance_cx_lowest="HIGH"   # Online CPU idle state
 performance_cpu_freq="NONE"# Online CPU frequency
 economy_cx_lowest="HIGH"   # Offline CPU idle state

Modified: head/etc/rc.d/devfs
==
--- head/etc/rc.d/devfs Wed Feb  8 08:49:30 2012(r231193)
+++ head/etc/rc.d/devfs Wed Feb  8 08:52:40 2012(r231194)
@@ -16,7 +16,8 @@ stop_cmd=':'
 
 devfs_start()
 {
-   if [ -n "$devfs_system_ruleset" -o -n "$devfs_set_rulesets" ]; then
+   if [ -n "$devfs_system_ruleset" -o -n "$devfs_set_rulesets" ] ||
+   checkyesno devfs_load_rulesets; then
devfs_init_rulesets
if [ -n "$devfs_system_ruleset" ]; then
devfs_set_ruleset $devfs_system_ruleset /dev

Modified: head/share/man/man5/rc.conf.5
==
--- head/share/man/man5/rc.conf.5   Wed Feb  8 08:49:30 2012
(r231193)
+++ head/share/man/man5/rc.conf.5   Wed Feb  8 08:52:40 2012
(r231194)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 13, 2011
+.Dd February 8, 2012
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -3673,6 +3673,25 @@ is set to
 these are the flags passed to the
 .Xr watchdogd 8
 daemon.
+.It Va devfs_rulesets
+.Pq Vt str
+List of files containing sets of rules for
+.Xr devfs 8 .
+.It Va devfs_system_ruleset
+.Pq Vt str
+Rule name(s) to apply to the system
+.Pa /dev
+itself.
+.It Va devfs_set_rulesets
+.Pq Vt str
+Pairs of already-mounted
+.Pa dev
+directories and rulesets that should be applied to them.
+For example: /mount/dev=ruleset_name
+.It Va devfs_load_rulesets
+.Pq Vt bool
+If set, always load the default rulesets listed in
+.Va devfs_rulesets .
 .It Va performance_cx_lowest
 .Pq Vt str
 CPU idle state to use while on AC power.
@@ -4532,6 +4551,7 @@ The default is 30.
 .Xr chkprintcap 8 ,
 .Xr chown 8 ,
 .Xr cron 8 ,
+.Xr devfs 8 ,
 .Xr dhclient 8 ,
 .Xr ftpd 8 ,
 .Xr geli 8 ,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-05 Thread Doug Barton
On 02/05/2012 01:59, Pawel Jakub Dawidek wrote:

> I seem to miss positives of the other approach. Leaving stale PIDs in
> pidfile is something we should avoid at all costs, so recommending that
> in the manual page is not the best recommendation. 

Which is worse ... potentially stale pidfiles that get cleaned up at
every boot, or stale directories that never do?

I'm also not sure why you think this method will leave behind a stale
pidfile. The idea is that the pidfile is pre-created with the ownership
that daemon is going to su to, for the express purpose of allowing it to
delete the pidfile when the process exits. If you're saying that this
method doesn't work then please point out the problem ASAP because
numerous ports rc.d scripts do this now.


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/




signature.asc
Description: OpenPGP digital signature


Re: svn commit: r230869 - head/usr.sbin/daemon

2012-02-01 Thread Doug Barton
Thanks!  Sorry I didn't get a chance to reply to your last message,
totally buried lately.


Doug


On 02/01/2012 08:41, Guy Helmer wrote:
> Author: ghelmer
> Date: Wed Feb  1 16:40:59 2012
> New Revision: 230869
> URL: http://svn.freebsd.org/changeset/base/230869
> 
> Log:
>   Change the notes about the pidfile to include Doug's preference
>   for pre-creating the pidfile with appropriate owner and permissions.
>   
>   Requested by dougb
> 
> Modified:
>   head/usr.sbin/daemon/daemon.8
> 
> Modified: head/usr.sbin/daemon/daemon.8
> ==
> --- head/usr.sbin/daemon/daemon.8 Wed Feb  1 15:57:49 2012
> (r230868)
> +++ head/usr.sbin/daemon/daemon.8 Wed Feb  1 16:40:59 2012
> (r230869)
> @@ -61,8 +61,9 @@ using the
>  functionality.
>  If the
>  .Fl u
> -option is used, the directory to contain the pidfile must be writable
> -by the specified user.
> +option is used, either the pidfile needs to have been pre-created
> +with appropriate ownership and permissions, or the directory to contain
> +the pidfile must be writable by the specified user.
>  Note, that the file will be created shortly before the process is
>  actually executed, and will remain after the process exits (although
>  it will be removed if the execution fails).
> 



-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r230628 - head/sys/sparc64/include

2012-01-28 Thread Doug Barton
On 01/28/2012 18:39, Julian Elischer wrote:
> Bruce these comments are valid.
> please make use of your commit bit and make the appropriate changes!

Completely aside from the pedantic value of having the person who broke
it be the one to fix it; this line of reasoning is only going DIScourage
people from pointing out problems. Are you sure that's what you want?


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r230541 - head/usr.sbin/daemon

2012-01-26 Thread Doug Barton
On 01/25/2012 06:50, Guy Helmer wrote:
> Author: ghelmer
> Date: Wed Jan 25 14:50:12 2012
> New Revision: 230541
> URL: http://svn.freebsd.org/changeset/base/230541
> 
> Log:
>   Revert 229667: After some discussion of this change, it seems it is
>   better to leave the pidfile open where it was. Add a note to the
>   man page describing pidfile strategies to use if the daemon is to
>   be run as a user other than root.

Did you see the message I sent requesting that you mention the
alternative of pre-creating the pidfile with the right permissions, and
provided a proposed text to that effect?

> Modified:
>   head/usr.sbin/daemon/daemon.8
>   head/usr.sbin/daemon/daemon.c
> 
> Modified: head/usr.sbin/daemon/daemon.8
> ==
> --- head/usr.sbin/daemon/daemon.8 Wed Jan 25 14:38:00 2012
> (r230540)
> +++ head/usr.sbin/daemon/daemon.8 Wed Jan 25 14:50:12 2012
> (r230541)
> @@ -59,6 +59,10 @@ Write the ID of the created process into
>  using the
>  .Xr pidfile 3
>  functionality.
> +If the
> +.Fl u
> +option is used, the directory to contain the pidfile must be writable
> +by the specified user.
>  Note, that the file will be created shortly before the process is
>  actually executed, and will remain after the process exits (although
>  it will be removed if the execution fails).

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r230545 - head/sys/boot/forth

2012-01-26 Thread Doug Barton
On 01/25/2012 13:35, Andriy Gapon wrote:
> on 25/01/2012 22:52 Doug Barton said the following:
>> On 01/25/2012 11:22, Andriy Gapon wrote:
>>> I have this crazy idea that we should remove the 'Safe Boot' and "ACPI' 
>>> options
>>> from the default boot menu (on platforms where they are present).
>>
>> IMO better labels on the menu would be a better option here. The ACPI
>> option in particular is important for some users who have broken ACPI.
> 
> Well, from my experience, nowadays it's a 99% chance that a PC simply won't 
> work
> at all without ACPI.  However broken it might be.
> Not sure if better labels can be of any help with that :-)

I'm not sure that removing an option that some of our users still need
is a good idea. But I'm not in charge of anything. :)

>>> Besides, 'Safe Boot' seems to be already somewhat undermined by rc.d/kld.
>>
>> If there is a way to signal that down to userspace I'm happy to modify
>> the behavior of the script.
> 
> Maybe this gets propagated via kenv.

Sorry I wasn't clear. If you (or someone else) can show me how to
definitively determine, at the time that rc.d/kld is run, whether the
user chose the "Safe Boot" option I'm happy to change the behavior of
the script accordingly.

> In this case changing a label to something like "Enable loading of configured
> kernel modules" could be an improvement.

Not sure what you meant there, sorry.


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r230545 - head/sys/boot/forth

2012-01-25 Thread Doug Barton
On 01/25/2012 11:22, Andriy Gapon wrote:
> I have this crazy idea that we should remove the 'Safe Boot' and "ACPI' 
> options
> from the default boot menu (on platforms where they are present).

IMO better labels on the menu would be a better option here. The ACPI
option in particular is important for some users who have broken ACPI.

> Besides, 'Safe Boot' seems to be already somewhat undermined by rc.d/kld.

If there is a way to signal that down to userspace I'm happy to modify
the behavior of the script.


Doug

-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r229667 - head/usr.sbin/daemon

2012-01-24 Thread Doug Barton
On 01/24/2012 07:34, Guy Helmer wrote:
> On Jan 6, 2012, at 6:16 PM, Doug Barton wrote:
> 
>> On 01/06/2012 08:18, Guy Helmer wrote:
>>> On Jan 5, 2012, at 8:58 PM, Doug Barton wrote:
>>>
>>>> On 01/05/2012 14:48, Guy Helmer wrote:
>>>>> Allow daemon(8) to run pidfile_open() before relenquishing
>>>>> privileges so pid files can be written in /var/run when started
>>>>> as root.
>>>>
>>>> I'm not sure how useful this is since when daemon is exiting it
>>>> won't be able to remove the pid file (unless I'm missing
>>>> something).
>>>>
>>>> Isn't it better to pre-create the pid file with the proper
>>>> permissions for the unprivileged user?
>>>>
>>>
>>> Would it be OK for daemon to hang around and wait for the child
>>> process to exit, then remove the pid file?
>>
>> Without having given it any kind of careful thought, that sounds Ok ...
>> but I don't understand how daemon could remove a pid file written as
>> root after it's already dropped privileges. (IOW that's the same problem
>> I was bringing up.)
>>
>>> The only other alternative I see would be to create a subdirectory
>>> that is writable by the user so the child can create and delete the
>>> pid file.
>>
>> That's functionally equivalent to pre-creating the pid file with the
>> right permissions, so it would be Ok. Various ports use each of these
>> approaches. I'm generally in favor of using the pid file only solution
>> since rc.d/cleanvar will clean all that stuff up at boot, and it's
>> preferable to not leave stale directories around for stuff that is no
>> longer running and/or installed.
> 
> Having thought about it for a while, I plan to revert the change to daemon.c 
> that was suggested in the PR, and instead add this note to the man page:

I think that reverting it is a good idea. I would add something to the
effect of what's below. I continue to maintain that pre-creating the
file is preferable to using directories since we'd like to avoid leaving
no-longer-relevant directories around if the thing is not in use any
longer.


Doug


> Index: daemon.8
> ===
> --- daemon.8  (revision 230510)
> +++ daemon.8  (working copy)
> @@ -59,6 +59,10 @@
>  using the
>  .Xr pidfile 3
>  functionality.
> +If the
> +.Fl u
> +option is used the pidfile must be pre-created with the proper
> +permissions, or the directory to contain the pidfile must be writable
> +by the specified user.
>  Note, that the file will be created shortly before the process is
>  actually executed, and will remain after the process exits (although
>  it will be removed if the execution fails).
> 
> Guy
> 
> 
> This message has been scanned by ComplianceSafe, powered by Palisade's 
> PacketSure.
> 



-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r230374 - head/etc

2012-01-20 Thread Doug Barton
Author: dougb
Date: Fri Jan 20 10:31:27 2012
New Revision: 230374
URL: http://svn.freebsd.org/changeset/base/230374

Log:
  If we're booting there is no need to waste time determining if the service
  is running or not.
  
  PR:   conf/150752
  Submitted by: YIN Xiaofeng <75394...@qq.com>

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==
--- head/etc/rc.subrFri Jan 20 10:06:28 2012(r230373)
+++ head/etc/rc.subrFri Jan 20 10:31:27 2012(r230374)
@@ -641,7 +641,7 @@ run_rc_command()
fi
fi
 
-   eval $_pidcmd   # determine the pid if necessary
+   [ -z "$autoboot" ] && eval $_pidcmd # determine the pid if necessary
 
for _elem in $_keywords; do
if [ "$_elem" != "$rc_arg" ]; then
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r230125 - head/sys/kern

2012-01-17 Thread Doug Barton
On 01/17/2012 10:48, John Baldwin wrote:
> On Tuesday, January 17, 2012 12:29:06 pm Andriy Gapon wrote:
>> on 17/01/2012 19:12 Eitan Adler said the following:
>>> To me seeing "(null)" from the output of printf indicates "There is a
>>> bug here, printf should never be given a NULL argument.".
>>> However, given that it isn't undefined here, and the objections I've
>>> received I will revert this part of the change when I get home.
>>
>> Would this be worth the hassle now that the change is already committed?
> 
> Probably not, though at some point if the printf is reworked for some other
> reason it could be removed then.  I don't think we need to add more special
> case handling for NULL string pointers passed to kernel printf in the future,
> however.

If it needs to be changed, it should be done sooner than later. It's not
as if we're carving the bits out of stone after all. :)



-- 

It's always a long day; 86400 doesn't fit into a short.

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r230122 - head

2012-01-14 Thread Doug Barton
Author: dougb
Date: Sat Jan 14 23:19:10 2012
New Revision: 230122
URL: http://svn.freebsd.org/changeset/base/230122

Log:
  For the mass rc.d changes, add a command line to make the update easier

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Sat Jan 14 23:10:18 2012(r230121)
+++ head/UPDATING   Sat Jan 14 23:19:10 2012(r230122)
@@ -28,6 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10
port installed with a script in /usr/local/etc/rc.d you can either
hand-edit the rcvar= line, or reinstall the port.
 
+   An easy way to handle the mass-update of /etc/rc.d:
+   rm /etc/rc.d/* && mergemaster -i
+
 20120109:
panic(9) now stops other CPUs in the SMP systems, disables interrupts
on the current CPU and prevents other threads from running.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r230103 - head/etc

2012-01-14 Thread Doug Barton
On 01/14/2012 04:11, Sergey Kandaurov wrote:
> On 14 January 2012 12:59, Doug Barton  wrote:
>> Author: dougb
>> Date: Sat Jan 14 08:59:02 2012
>> New Revision: 230103
>> URL: http://svn.freebsd.org/changeset/base/230103
>>
>> Log:
>>  Now that its callers have been udpated, remove set_rcvar().
>>
>>  The concept of set_rcvar() was nice in theory, but the forks
>>  it creates are a drag on the startup process, which is especially
>>  noticeable on slower systems, such as embedded ones.
>>
>> Modified:
>>  head/etc/rc.subr
>>
> 
> Hi,
> 
> rc(8) and rc.subr(8) still reference this function.

Not any more. :)  I ran out of steam last night, and so I'm finishing up
the doc stuff today. But thanks for the reminder.

> Also, it would be fine to have some adoption to the new
> set_rcvar-less order like printing The Big Warning and
> still doing its job in Y.x branch and stop doing anything
> in the next Y+1.x branch.

If that becomes necessary, we can certainly do it. This is early enough
in the 10-current cycle that I think we should be able to catch all the
stragglers well before 10-release, and I personally have no plans to MFC
the removal of set_rcvar from rc.subr. But, you know what they say about
the best-laid plans 


Doug

-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r230116 - head/share/man/man8

2012-01-14 Thread Doug Barton
Author: dougb
Date: Sat Jan 14 21:51:44 2012
New Revision: 230116
URL: http://svn.freebsd.org/changeset/base/230116

Log:
  Remove documentation for set_rcvar() now that it has been removed.

Modified:
  head/share/man/man8/rc.8
  head/share/man/man8/rc.subr.8

Modified: head/share/man/man8/rc.8
==
--- head/share/man/man8/rc.8Sat Jan 14 21:38:31 2012(r230115)
+++ head/share/man/man8/rc.8Sat Jan 14 21:51:44 2012(r230116)
@@ -35,7 +35,7 @@
 .\" @(#)rc.8   8.2 (Berkeley) 12/11/93
 .\" $FreeBSD$
 .\"
-.Dd November 17, 2009
+.Dd January 14, 2012
 .Dt RC 8
 .Os
 .Sh NAME
@@ -485,7 +485,7 @@ Most scripts require little more than th
 \&. /etc/rc.subr
 
 name="foo"
-rcvar=`set_rcvar`
+rcvar=foo_enable
 command="/usr/local/bin/foo"
 
 load_rc_config $name
@@ -506,7 +506,7 @@ The script may list and define as many c
 \&. /etc/rc.subr
 
 name="foo"
-rcvar=`set_rcvar`
+rcvar=foo_enable
 command="/usr/local/bin/foo"
 extra_commands="nop hello"
 hello_cmd="echo Hello World."

Modified: head/share/man/man8/rc.subr.8
==
--- head/share/man/man8/rc.subr.8   Sat Jan 14 21:38:31 2012
(r230115)
+++ head/share/man/man8/rc.subr.8   Sat Jan 14 21:51:44 2012
(r230116)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 18, 2007
+.Dd January 14, 2012
 .Dt RC.SUBR 8
 .Os
 .Sh NAME
@@ -73,8 +73,6 @@
 .It
 .Ic run_rc_script Ar file Ar argument
 .It
-.Ic set_rcvar Op Ar base
-.It
 .Ic wait_for_pids Op Ar pid ...
 .It
 .Ic warn Ar message
@@ -832,32 +830,6 @@ signal is sent to the parent
 process, which is assumed to be
 .Xr rc 8 .
 Otherwise, the shell exits with a non-zero status.
-.It Ic set_rcvar Op Ar base
-Set the variable name required to start a service.
-In
-.Fx
-a daemon is usually controlled by an
-.Xr rc.conf 5
-variable consisting of a daemon's name postfixed by the string
-.Dq Li "_enable" .
-This is not the case in
-.Nx .
-When the following line is included in a script:
-.Pp
-.Dl "rcvar=`set_rcvar`"
-.Pp
-this function will use the value of the
-.Va $name
-variable, which should be defined by the calling script,
-to construct the appropriate
-.Xr rc.conf 5
-knob.
-If the
-.Ar base
-argument is set it will use
-.Ar base
-instead of
-.Va $name .
 .It Ic wait_for_pids Op Ar pid ...
 Wait until all of the provided
 .Ar pids
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r230105 - head

2012-01-14 Thread Doug Barton
Author: dougb
Date: Sat Jan 14 09:32:58 2012
New Revision: 230105
URL: http://svn.freebsd.org/changeset/base/230105

Log:
  Add an entry detailing the removal of set_rcvar() from /etc/rc.subr
  
  Requested by:   Garrett Cooper 

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Sat Jan 14 09:10:20 2012(r230104)
+++ head/UPDATING   Sat Jan 14 09:32:58 2012(r230105)
@@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10
machines to maximize performance.  (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
 
+20120114:
+   The set_rcvar() function has been removed from /etc/rc.subr.  All
+   base and ports rc.d scripts have been updated, so if you have a
+   port installed with a script in /usr/local/etc/rc.d you can either
+   hand-edit the rcvar= line, or reinstall the port.
+
 20120109:
panic(9) now stops other CPUs in the SMP systems, disables interrupts
on the current CPU and prevents other threads from running.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r230103 - head/etc

2012-01-14 Thread Doug Barton
On 01/14/2012 01:26, Garrett Cooper wrote:

>   Adding an entry to UPDATING would be appreciated though…

Good point. It's done now. :)


Doug

-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r230103 - head/etc

2012-01-14 Thread Doug Barton
On 01/14/2012 01:10, Andriy Gapon wrote:
> on 14/01/2012 10:59 Doug Barton said the following:
>> Author: dougb
>> Date: Sat Jan 14 08:59:02 2012
>> New Revision: 230103
>> URL: http://svn.freebsd.org/changeset/base/230103
>>
>> Log:
>>   Now that its callers have been udpated, remove set_rcvar().
>>   
>>   The concept of set_rcvar() was nice in theory, but the forks
>>   it creates are a drag on the startup process, which is especially
>>   noticeable on slower systems, such as embedded ones.
> 
> Will this break ports that install rc.d scripts?

Please see my HEADS UP message to -current.



-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r230103 - head/etc

2012-01-14 Thread Doug Barton
Author: dougb
Date: Sat Jan 14 08:59:02 2012
New Revision: 230103
URL: http://svn.freebsd.org/changeset/base/230103

Log:
  Now that its callers have been udpated, remove set_rcvar().
  
  The concept of set_rcvar() was nice in theory, but the forks
  it creates are a drag on the startup process, which is especially
  noticeable on slower systems, such as embedded ones.

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==
--- head/etc/rc.subrSat Jan 14 08:11:40 2012(r230102)
+++ head/etc/rc.subrSat Jan 14 08:59:02 2012(r230103)
@@ -54,47 +54,6 @@ JID=`$PS -p $$ -o jid=`
 #  functions
 #  -
 
-# set_rcvar [var] [defval] [desc]
-#
-#  Echo or define a rc.conf(5) variable name.  Global variable
-#  $rcvars is used.
-#
-#  If no argument is specified, echo "${name}_enable".
-#
-#  If only a var is specified, echo "${var}_enable".
-#
-#  If var and defval are specified, the ${var} is defined as
-#  rc.conf(5) variable and the default value is ${defvar}.  An
-#  optional argument $desc can also be specified to add a
-#  description for that.
-#
-set_rcvar()
-{
-   case $# in
-   0)
-   echo ${name}_enable
-   ;;
-   1)
-   echo ${1}_enable
-   ;;
-   *)
-   debug "rcvar_define: \$$1=$2 is added" \
-   " as a rc.conf(5) variable."
-
-   local _var
-   _var=$1
-   rcvars="${rcvars# } $_var"
-   eval ${_var}_defval=\"$2\"
-   shift 2
-   # encode multiple lines of _desc
-   for l in "$@"; do
-   eval ${_var}_desc=\"\${${_var}_desc#^^}^^$l\"
-   done
-   eval ${_var}_desc=\"\${${_var}_desc#^^}\"
-   ;;
-   esac
-}
-
 # set_rcvar_obsolete oldvar [newvar] [msg]
 #  Define obsolete variable.
 #  Global variable $rcvars_obsolete is used.
@@ -856,8 +815,8 @@ $command $rc_flags $command_args"
echo ""
fi
echo "#"
-   # Get unique vars in $rcvar $rcvars
-   for _v in $rcvar $rcvars; do
+   # Get unique vars in $rcvar
+   for _v in $rcvar; do
case $v in
$_v\ *|\ *$_v|*\ $_v\ *) ;;
*)  v="${v# } $_v" ;;
@@ -1003,7 +962,7 @@ run_rc_script()
 
unset   name command command_args command_interpreter \
extra_commands pidfile procname \
-   rcvar rcvars rcvars_obsolete required_dirs required_files \
+   rcvar rcvars_obsolete required_dirs required_files \
required_vars
eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd
 
@@ -1035,7 +994,7 @@ run_rc_script()
 #
 load_rc_config()
 {
-   local _name _var _defval _v _msg _new
+   local _name _rcvar_val _var _defval _v _msg _new
_name=$1
if [ -z "$_name" ]; then
err 3 'USAGE: load_rc_config name'
@@ -1060,7 +1019,7 @@ load_rc_config()
fi
 
# Set defaults if defined.
-   for _var in $rcvar $rcvars; do
+   for _var in $rcvar; do
eval _defval=\$${_var}_defval
if [ -n "$_defval" ]; then
eval : \${$_var:=\$${_var}_defval}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r230099 - head/etc/rc.d

2012-01-13 Thread Doug Barton
Author: dougb
Date: Sat Jan 14 02:18:41 2012
New Revision: 230099
URL: http://svn.freebsd.org/changeset/base/230099

Log:
  Prepare for the removal of set_rcvar() by changing the rcvar=
  assignments to the literal values it would have returned.
  
  The concept of set_rcvar() was nice in theory, but the forks
  it creates are a drag on the startup process, which is especially
  noticeable on slower systems, such as embedded ones.
  
  During the discussion on freebsd-rc@ a preference was expressed for
  using ${name}_enable instead of the literal values. However the
  code portability concept doesn't really apply since there are so
  many other places where the literal name has to be searched for
  and replaced. Also, using the literal value is also a tiny bit
  faster than dereferencing the variables, and every little bit helps.

Modified:
  head/etc/rc.d/accounting
  head/etc/rc.d/amd
  head/etc/rc.d/apm
  head/etc/rc.d/apmd
  head/etc/rc.d/bootparams
  head/etc/rc.d/bsnmpd
  head/etc/rc.d/bthidd
  head/etc/rc.d/cleanvar
  head/etc/rc.d/cleartmp
  head/etc/rc.d/cron
  head/etc/rc.d/ddb
  head/etc/rc.d/devd
  head/etc/rc.d/dmesg
  head/etc/rc.d/ftp-proxy
  head/etc/rc.d/ftpd
  head/etc/rc.d/gptboot
  head/etc/rc.d/hastd
  head/etc/rc.d/hcsecd
  head/etc/rc.d/hostapd
  head/etc/rc.d/inetd
  head/etc/rc.d/ip6addrctl
  head/etc/rc.d/ipfilter
  head/etc/rc.d/ipfs
  head/etc/rc.d/ipmon
  head/etc/rc.d/ipnat
  head/etc/rc.d/ipsec
  head/etc/rc.d/ipxrouted
  head/etc/rc.d/jail
  head/etc/rc.d/keyserv
  head/etc/rc.d/lpd
  head/etc/rc.d/mountd
  head/etc/rc.d/moused
  head/etc/rc.d/mroute6d
  head/etc/rc.d/mrouted
  head/etc/rc.d/natd
  head/etc/rc.d/netwait
  head/etc/rc.d/newsyslog
  head/etc/rc.d/nfscbd
  head/etc/rc.d/nfsd
  head/etc/rc.d/nfsuserd
  head/etc/rc.d/nscd
  head/etc/rc.d/ntpd
  head/etc/rc.d/ntpdate
  head/etc/rc.d/pf
  head/etc/rc.d/pflog
  head/etc/rc.d/pfsync
  head/etc/rc.d/powerd
  head/etc/rc.d/ppp
  head/etc/rc.d/pppoed
  head/etc/rc.d/quota
  head/etc/rc.d/rarpd
  head/etc/rc.d/rfcomm_pppd_server
  head/etc/rc.d/route6d
  head/etc/rc.d/routed
  head/etc/rc.d/rpcbind
  head/etc/rc.d/rtadvd
  head/etc/rc.d/rtsold
  head/etc/rc.d/rwho
  head/etc/rc.d/sdpd
  head/etc/rc.d/sendmail
  head/etc/rc.d/sshd
  head/etc/rc.d/syslogd
  head/etc/rc.d/timed
  head/etc/rc.d/ubthidhci
  head/etc/rc.d/virecover
  head/etc/rc.d/watchdogd

Modified: head/etc/rc.d/accounting
==
--- head/etc/rc.d/accountingSat Jan 14 00:53:26 2012(r230098)
+++ head/etc/rc.d/accountingSat Jan 14 02:18:41 2012(r230099)
@@ -11,7 +11,7 @@
 . /etc/rc.subr
 
 name="accounting"
-rcvar=`set_rcvar`
+rcvar="accounting_enable"
 accounting_command="/usr/sbin/accton"
 accounting_file="/var/account/acct"
 

Modified: head/etc/rc.d/amd
==
--- head/etc/rc.d/amd   Sat Jan 14 00:53:26 2012(r230098)
+++ head/etc/rc.d/amd   Sat Jan 14 02:18:41 2012(r230099)
@@ -11,7 +11,7 @@
 . /etc/rc.subr
 
 name="amd"
-rcvar=`set_rcvar`
+rcvar="amd_enable"
 command="/usr/sbin/${name}"
 start_precmd="amd_precmd"
 command_args="&"

Modified: head/etc/rc.d/apm
==
--- head/etc/rc.d/apm   Sat Jan 14 00:53:26 2012(r230098)
+++ head/etc/rc.d/apm   Sat Jan 14 02:18:41 2012(r230099)
@@ -11,7 +11,7 @@
 . /etc/rc.subr
 
 name="apm"
-rcvar=`set_rcvar`
+rcvar="apm_enable"
 start_precmd="apm_precmd"
 command="/usr/sbin/${name}"
 start_cmd="${command} -e enable"

Modified: head/etc/rc.d/apmd
==
--- head/etc/rc.d/apmd  Sat Jan 14 00:53:26 2012(r230098)
+++ head/etc/rc.d/apmd  Sat Jan 14 02:18:41 2012(r230099)
@@ -11,7 +11,7 @@
 . /etc/rc.subr
 
 name="apmd"
-rcvar=`set_rcvar`
+rcvar="apmd_enable"
 command="/usr/sbin/${name}"
 start_precmd="apmd_prestart"
 

Modified: head/etc/rc.d/bootparams
==
--- head/etc/rc.d/bootparamsSat Jan 14 00:53:26 2012(r230098)
+++ head/etc/rc.d/bootparamsSat Jan 14 02:18:41 2012(r230099)
@@ -11,7 +11,7 @@
 . /etc/rc.subr
 
 name="bootparamd"
-rcvar=`set_rcvar`
+rcvar="bootparamd_enable"
 required_files="/etc/bootparams"
 command="/usr/sbin/${name}"
 

Modified: head/etc/rc.d/bsnmpd
==
--- head/etc/rc.d/bsnmpdSat Jan 14 00:53:26 2012(r230098)
+++ head/etc/rc.d/bsnmpdSat Jan 14 02:18:41 2012(r230099)
@@ -10,7 +10,7 @@
 . /etc/rc.subr
 
 name="bsnmpd"
-rcvar=`set_rcvar`
+rcvar="bsnmpd_enable"
 command="/usr/sbin/${name}"
 pidfile="/var/run/snmpd.pid"
 

Modified: head/etc/rc.d/bthidd
==
--- head/etc/rc

Re: svn commit: r229945 - in head/sbin: hastctl hastd

2012-01-10 Thread Doug Barton
On 01/10/2012 14:39, Pawel Jakub Dawidek wrote:
>   For functions that return -1 on failure check exactly for -1 and not for
>   any negative number.

what is the likelihood that at some point in the future the semantics
for those functions will change, such that more than one negative value
may be returned?


-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r229828 - in head/sys: kern ufs/ufs

2012-01-09 Thread Doug Barton
On 01/08/2012 15:06, Konstantin Belousov wrote:
> Author: kib
> Date: Sun Jan  8 23:06:53 2012
> New Revision: 229828
> URL: http://svn.freebsd.org/changeset/base/229828
> 
> Log:
>   Avoid LOR between vfs_busy() lock and covered vnode lock on quotaon().

Does this mean that if we turn witness back on the ever-present VFS LORs
will no longer be there, or does this only affect calls to quotaon()?


Doug

-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r229822 - in head/etc: . rc.d

2012-01-08 Thread Doug Barton
Author: dougb
Date: Sun Jan  8 20:25:29 2012
New Revision: 229822
URL: http://svn.freebsd.org/changeset/base/229822

Log:
  There is no longer a need to abstract ${rcvar_manpage} as we are not
  attempting to maintain compatibility with NetBSD for some years now.

Modified:
  head/etc/rc.d/hostname
  head/etc/rc.subr

Modified: head/etc/rc.d/hostname
==
--- head/etc/rc.d/hostname  Sun Jan  8 20:09:26 2012(r229821)
+++ head/etc/rc.d/hostname  Sun Jan  8 20:25:29 2012(r229822)
@@ -65,7 +65,7 @@ hostname_start()
# Null hostname is probably OK if DHCP is in use.
#
if [ -z "`list_net_interfaces dhcp`" ]; then
-   warn "\$hostname is not set -- see ${rcvar_manpage}."
+   warn "\$hostname is not set -- see rc.conf(5)."
fi
return
fi

Modified: head/etc/rc.subr
==
--- head/etc/rc.subrSun Jan  8 20:09:26 2012(r229821)
+++ head/etc/rc.subrSun Jan  8 20:25:29 2012(r229822)
@@ -32,7 +32,6 @@
 #  functions used by various rc scripts
 #
 
-: ${rcvar_manpage:='rc.conf(5)'}
 : ${RC_PID:=$$}; export RC_PID
 
 #
@@ -152,7 +151,7 @@ checkyesno()
return 1
;;
*)
-   warn "\$${1} is not set properly - see ${rcvar_manpage}."
+   warn "\$${1} is not set properly - see rc.conf(5)."
return 1
;;
esac
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r229783 - in head/etc: . namedb rc.d

2012-01-07 Thread Doug Barton
On 01/07/2012 08:10, Ulrich Spoerlein wrote:
> Modified: head/etc/namedb/named.conf

Good catch, thanks. :)


-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r228711 - head/sys/dev/usb/controller

2012-01-07 Thread Doug Barton
Is this the change that is causing all the new usb-related messages when
shutting down? If so, can it be hidden behind verbose?


Doug


On 12/19/2011 07:35, Hans Petter Selasky wrote:
> Author: hselasky
> Date: Mon Dec 19 15:35:05 2011
> New Revision: 228711
> URL: http://svn.freebsd.org/changeset/base/228711
> 
> Log:
>   Add code to wait for USB shutdown to be executed at system shutdown.
>   Add sysctl which can be used to skip this waiting.
>   
>   MFC after:  3 days
> 
> Modified:
>   head/sys/dev/usb/controller/usb_controller.c
> 
> Modified: head/sys/dev/usb/controller/usb_controller.c
> ==
> --- head/sys/dev/usb/controller/usb_controller.c  Mon Dec 19 14:55:14 
> 2011(r228710)
> +++ head/sys/dev/usb/controller/usb_controller.c  Mon Dec 19 15:35:05 
> 2011(r228711)
> @@ -87,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug
>  static int usb_no_boot_wait = 0;
>  TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait);
>  SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, 
> &usb_no_boot_wait, 0,
> -"No device enumerate waiting at boot.");
> +"No USB device enumerate waiting at boot.");
> +
> +static int usb_no_shutdown_wait = 0;
> +TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait);
> +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RDTUN, 
> &usb_no_shutdown_wait, 0,
> +"No USB device waiting at system shutdown.");
>  
>  static devclass_t usb_devclass;
>  
> @@ -277,11 +282,20 @@ usb_shutdown(device_t dev)
>   return (0);
>   }
>  
> + device_printf(bus->bdev, "Controller shutdown\n");
> +
>   USB_BUS_LOCK(bus);
>   usb_proc_msignal(&bus->explore_proc,
>   &bus->shutdown_msg[0], &bus->shutdown_msg[1]);
> + if (usb_no_shutdown_wait == 0) {
> + /* wait for shutdown callback to be executed */
> + usb_proc_mwait(&bus->explore_proc,
> + &bus->shutdown_msg[0], &bus->shutdown_msg[1]);
> + }
>   USB_BUS_UNLOCK(bus);
>  
> + device_printf(bus->bdev, "Controller shutdown complete\n");
> +
>   return (0);
>  }
>  
> 



-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r229667 - head/usr.sbin/daemon

2012-01-06 Thread Doug Barton
On 01/06/2012 08:18, Guy Helmer wrote:
> On Jan 5, 2012, at 8:58 PM, Doug Barton wrote:
> 
>> On 01/05/2012 14:48, Guy Helmer wrote:
>>> Allow daemon(8) to run pidfile_open() before relenquishing
>>> privileges so pid files can be written in /var/run when started
>>> as root.
>> 
>> I'm not sure how useful this is since when daemon is exiting it
>> won't be able to remove the pid file (unless I'm missing
>> something).
>> 
>> Isn't it better to pre-create the pid file with the proper
>> permissions for the unprivileged user?
>> 
> 
> Would it be OK for daemon to hang around and wait for the child
> process to exit, then remove the pid file?

Without having given it any kind of careful thought, that sounds Ok ...
but I don't understand how daemon could remove a pid file written as
root after it's already dropped privileges. (IOW that's the same problem
I was bringing up.)

> The only other alternative I see would be to create a subdirectory
> that is writable by the user so the child can create and delete the
> pid file.

That's functionally equivalent to pre-creating the pid file with the
right permissions, so it would be Ok. Various ports use each of these
approaches. I'm generally in favor of using the pid file only solution
since rc.d/cleanvar will clean all that stuff up at boot, and it's
preferable to not leave stale directories around for stuff that is no
longer running and/or installed.


Doug

-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r229667 - head/usr.sbin/daemon

2012-01-05 Thread Doug Barton
On 01/05/2012 14:48, Guy Helmer wrote:
>   Allow daemon(8) to run pidfile_open() before relenquishing privileges
>   so pid files can be written in /var/run when started as root.

I'm not sure how useful this is since when daemon is exiting it won't be
able to remove the pid file (unless I'm missing something).

Isn't it better to pre-create the pid file with the proper permissions
for the unprivileged user?


Doug

-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r228896 - head/contrib/netcat

2011-12-28 Thread Doug Barton
On 12/28/2011 15:03, Ulrich Spörlein wrote:
> On Wed, 2011-12-28 at 15:00:07 -0800, Doug Barton wrote:
>> On 12/28/2011 14:52, Ulrich Spörlein wrote:
>>
>>> We have
>>>
>>> http://wiki.freebsd.org/ContribSoftware
>>>
>>> that tries to track the state of anything upstream in src. 
>>
>> I've been maintaining BIND in the base for 9 1/2 years, and never knew
>> about that page ... the wiki is a good tool for some things, but IMO
>> this kind of information needs to be in the src tree where it is easily
>> available, archived for the future, etc.
> 
> Agreed. It would make branching that information a whole lot easier!
> 
> Any good ideas on how to implement this? It could be as simple as having
> all that information in /CONTRIB or something, similar to UPDATING or
> MAINTAINERS.

Well I still think a comment in the code, next to the foreign repo Id
would be the easiest way. In svn-world we tend to keep FREEBSD-Upgrade
files in $REPO/vendor/foo/dist/ rather than in src/contrib, otherwise
that might be a useful alternative.


Doug

-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r228896 - head/contrib/netcat

2011-12-28 Thread Doug Barton
On 12/28/2011 14:52, Ulrich Spörlein wrote:

> We have
> 
> http://wiki.freebsd.org/ContribSoftware
> 
> that tries to track the state of anything upstream in src. 

I've been maintaining BIND in the base for 9 1/2 years, and never knew
about that page ... the wiki is a good tool for some things, but IMO
this kind of information needs to be in the src tree where it is easily
available, archived for the future, etc.


Doug

-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r228938 - head/games/fortune/datfiles

2011-12-28 Thread Doug Barton
On 12/28/2011 14:18, Doug Barton wrote:
>   Reviewed by:French-speakers on #bsdcode [2]

Blah, that's #bsdports.


-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r228938 - head/games/fortune/datfiles

2011-12-28 Thread Doug Barton
Author: dougb
Date: Wed Dec 28 22:18:53 2011
New Revision: 228938
URL: http://svn.freebsd.org/changeset/base/228938

Log:
  1. Correct capitalization of the nobility particle for
 Francois de La Rochefoucauld introduced in r228909 [1],[2]
  
  2. Change c-cedilla introduced in the same commit to ASCII c since
 non-UTF-8 terminals will choke on the non-ASCII text. [2],[3]
  
  Pointed out by:   bf [1]
  Reviewed by:  French-speakers on #bsdcode [2]
  Requested by: uqs [3]

Modified:
  head/games/fortune/datfiles/fortunes

Modified: head/games/fortune/datfiles/fortunes
==
--- head/games/fortune/datfiles/fortunesWed Dec 28 22:10:12 2011
(r228937)
+++ head/games/fortune/datfiles/fortunesWed Dec 28 22:18:53 2011
(r228938)
@@ -8167,7 +8167,7 @@ Abscond, v.:
 %
 Absence diminishes mediocre passions and increases
 great ones, as the wind blows out candles and fans fires.
-   -- François De La Rochefoucauld
+   -- Francois de La Rochefoucauld
 %
 Absence in love is like water upon fire;
 a little quickens, but much extinguishes it.
@@ -9115,7 +9115,7 @@ All the men on my staff can type.
 %
 All the passions make us commit faults; love makes us commit the most
 ridiculous ones.
-   -- François De La Rochefoucauld
+   -- Francois de La Rochefoucauld
 %
 All the really good ideas I ever had came to me while I was milking a cow.
-- Grant Wood
@@ -13744,7 +13744,7 @@ Computers will not be perfected until th
 than the estimate the job will cost.
 %
 Conceit causes more conversation than wit.
-   -- François De La Rochefoucauld
+   -- Francois de La Rochefoucauld
 %
 Concept, n.:
Any "idea" for which an outside consultant billed you more than
@@ -27582,7 +27582,7 @@ live?"
 %
 In the misfortune of our friends we find something that is not
 displeasing to us.
-   -- François De La Rochefoucauld, "Maxims"
+   -- Francois de La Rochefoucauld, "Maxims"
 %
 In the next world, you're on your own.
 %
@@ -28538,7 +28538,7 @@ The main thing is to use it well.
 %
 It is not enough to have great qualities,
 we should also have the management of them.
-   -- François De La Rochefoucauld
+   -- Francois de La Rochefoucauld
 %
 It is not every question that deserves an answer.
-- Publilius Syrus
@@ -35780,7 +35780,7 @@ Old mail has arrived.
 %
 Old men are fond of giving good advice to console themselves for being
 no longer in a position to give bad examples.
-   -- François De La Rochefoucauld, "Maxims"
+   -- Francois de La Rochefoucauld, "Maxims"
 %
 Old Mother Hubbard went to the cupboard
 To fetch her poor daughter a dress.
@@ -52478,7 +52478,7 @@ He who practices it will have neighbors.
-- Confucius
 %
 Virtue would go far if vanity did not keep it company.
-   -- François De La Rochefoucauld
+   -- Francois de La Rochefoucauld
 %
 Visit beautiful Vergas Minnesota.
 %
@@ -52949,7 +52949,7 @@ We gave you an atomic bomb, what do you 
-- I. I. Rabi to the Atomic Energy Commission
 %
 We give advice, but we cannot give the wisdom to profit by it.
-   -- François De La Rochefoucauld
+   -- Francois de La Rochefoucauld
 %
 We gotta get out of this place,
 If it's the last thing we ever do.
@@ -53174,7 +53174,7 @@ children smart.
 %
 We only acknowledge small faults in order
 to make it appear that we are free from great ones.
-   -- François De La Rochefoucauld
+   -- Francois de La Rochefoucauld
 %
 We ought to be very grateful that we have tools.  Millions of years ago
 people did not have them, and home projects were extremely difficult.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r228896 - head/contrib/netcat

2011-12-28 Thread Doug Barton
On 12/28/2011 07:40, Ulrich Spörlein wrote:
> On Mon, 2011-12-26 at 01:14:28 -0800, Doug Barton wrote:
>> On 12/26/2011 01:07, Xin LI wrote:
>>> Author: delphij
>>> Date: Mon Dec 26 09:07:08 2011
>>> New Revision: 228896
>>> URL: http://svn.freebsd.org/changeset/base/228896
>>>
>>> Log:
>>>   Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not
>>>   apply to us).
>>
>> When I'm importing stat(1) stuff from Net/OpenBSD I don't do this. I
>> will however comment in the commit log for the next substantive change,
>> "Skipped update N.NN because the change was not relevant to us," or
>> words to that effect.
>>
>> I'm not suggesting that my way of doing this is perfect, or cannot be
>> improved. I would suggest however that this change was needless churn.
> 
> I think it was the right thing to do. It's better to have one person
> (Xin LI) figure out if the change is needed or a no-op and do the
> upgrade to match our version to upstream's version, than to have a
> discrepancy between the two and cause half a dozen developers that
> stumble upon that difference to scratch their heads and spend time in
> figuring out if we should import the change.

Fair enough. Having thought more about this my only remaining concern is
that by slipping the tag we're misrepresenting the status quo since
what's in our tree is not really that version of the file. Perhaps a
comment to the effect of "purposely skipping version 1.23 because ..."
would be better?


Doug

-- 

You can observe a lot just by watching. -- Yogi Berra

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


  1   2   3   4   5   >