Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Dec 2001 17:40:02 -0800 (PST)
From:      "Crist J . Clark" <cjc@FreeBSD.ORG>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/32953: log-in-vain level should be setable in rc.conf
Message-ID:  <200112180140.fBI1e2477444@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/32953; it has been noted by GNATS.

From: "Crist J . Clark" <cjc@FreeBSD.ORG>
To: "David O'Brien" <obrien@NUXI.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/32953: log-in-vain level should be setable in rc.conf
Date: Mon, 17 Dec 2001 17:29:57 -0800

 On Mon, Dec 17, 2001 at 04:28:07PM -0800, David O'Brien wrote:
 
 > >Description:
 > 	We allow the turning off and on of log-in-vain in rc.conf as seen in
 > 	rc.network:
 > 
 > 		network_pass4() { 
 > 		    echo -n 'Additional TCP options:'
 > 			    case ${log_in_vain} in
 > 
 > 	Therefor we should also allow the log-in-vain level to be set in
 > 	rc.conf also.
 [snip]
 
 We should. How about this simple change which is back compaitible, but
 does not add more rc.conf knobs:
 
 Index: rc.network
 ===================================================================
 RCS file: /export/ncvs/src/etc/rc.network,v
 retrieving revision 1.119
 diff -u -r1.119 rc.network
 --- rc.network	13 Dec 2001 04:21:18 -0000	1.119
 +++ rc.network	18 Dec 2001 01:26:07 -0000
 @@ -366,7 +366,7 @@
  			case ${firewall_logging} in
  			[Yy][Ee][Ss] | '')
  				echo 'Firewall logging=YES'
 -				sysctl net.inet.ip.fw.verbose=1 >/dev/null
 +				sysctl net.inet.ip.fw.verbose="${firewall_verbose:-1}" >/dev/null
  				;;
  			*)
  				;;
 @@ -848,9 +848,12 @@
  	[Nn][Oo] | '')
  		;;
  	*)
 -		echo -n ' log_in_vain=YES'
 -		sysctl net.inet.tcp.log_in_vain=1 >/dev/null
 -		sysctl net.inet.udp.log_in_vain=1 >/dev/null
 +		if ! expr "${log_in_vain}" : '[0-9]*' >/dev/null 2>&1; then
 +		    log_in_vain=1
 +		fi
 +		echo -n " log_in_vain=${log_in_vain}"
 +		sysctl net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
 +		sysctl net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
  		;;
  	esac
  
 
 That is, if log_in_vain holds an integer value, use it. If it is
 anything else, revert to the old behavior of setting it to 1.
 --  
 "It's always funny until someone gets hurt. Then it's hilarious."
 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112180140.fBI1e2477444>