Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2001 18:30:01 -0800 (PST)
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/32953: log-in-vain level should be setable in rc.conf
Message-ID:  <200112200230.fBK2U1937162@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" <cristjc@earthlink.net>
To: Ruslan Ermilov <ru@FreeBSD.ORG>
Cc: bug-followup@FreeBSD.ORG
Subject: Re: bin/32953: log-in-vain level should be setable in rc.conf
Date: Wed, 19 Dec 2001 12:13:14 -0500

 On Tue, Dec 18, 2001 at 02:52:49PM +0200, Ruslan Ermilov wrote:
 > On Mon, Dec 17, 2001 at 05:40:02PM -0800, Crist J . Clark wrote:
 [snip]
 
 > >  
 > >  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
 > >   				;;
 > >   			*)
 > >   				;;
 > 
 > Is this a stray change?  fw_verbose is boolean, at least in my version
 > of ip_fw.c.
 
 Yeah, a localization. I have different verbosity levels in the
 firewall code here. I'll send that code along if you'd like to see
 it. ;) I thought I had edited that out of the patch... until I
 actually saw my post on -bugs.
 
 [snip]
 
 > I think you should add a case for [Yy][Ee][Ss], and treat the fallback
 > case as a numeric value, without expr(1)-checking it.  There's nothing
 > wrong here as the only documented values were YES and NO, and people
 > who had it set to the other value (e.g. "YUP") will now have to fix it
 > to the right value.  :-)
 
 So, I guess you're saying, "take out the safety net,"
 
 Index: rc.network
 ===================================================================
 RCS file: /home/cjc/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	19 Dec 2001 16:59:16 -0000
 @@ -845,14 +845,16 @@
  network_pass4() {
  	echo -n 'Additional TCP options:'
  	case ${log_in_vain} in
 +	[Yy][Ee][Ss])
 +		log_in_vain=1;;
  	[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
 -		;;
 +		log_in_vain=0;;
  	esac
 +	if [ ${log_in_vain} -ne 0 ]; then
 +		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
 +	fi
  
  	echo '.'
  	network_pass4_done=YES
 
 Which will bitch like heck (but your computer won't blow up) if you
 don't give it a "YES," "NO," or an integer.
 -- 
 "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?200112200230.fBK2U1937162>