From nobody@FreeBSD.org  Sun Oct 20 23:51:03 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id C62C46C6
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Oct 2013 23:51:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id B389D2A7B
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Oct 2013 23:51:03 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9KNp3C6022527
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Oct 2013 23:51:03 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9KNp31q022520;
	Sun, 20 Oct 2013 23:51:03 GMT
	(envelope-from nobody)
Message-Id: <201310202351.r9KNp31q022520@oldred.freebsd.org>
Date: Sun, 20 Oct 2013 23:51:03 GMT
From: Adam McDougall <mcdouga9@egr.msu.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: r254974 periodic security status regression, compatibility shim doesn't work
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183137
>Category:       conf
>Synopsis:       r254974 periodic security status regression, compatibility shim doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jlh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 21 00:00:00 UTC 2013
>Closed-Date:    Wed Oct 30 21:17:58 UTC 2013
>Last-Modified:  Fri Nov  1 16:10:00 UTC 2013
>Originator:     Adam McDougall
>Release:        10.0-ALPHA2
>Organization:
>Environment:
FreeBSD hostname 10.0-ALPHA2 FreeBSD 10.0-ALPHA2 #0 r255793: Sun Sep 22 17:05:25 EDT 2013     root@build9:/usr/obj/proto/src10/src/sys/AMD64-10  amd64

>Description:
r254974 introduced "Make the period of each periodic security script configurable" which I am quite interested in, but also with "A compatibility shim has been introduced for the old variable names".  The compat shim doesn't seem to work for me.  I will eventually update my configurations to the new standard, however this particular system was setup to use the old variables such as daily_status_security_pfdenied_enable="NO" and daily_status_security_loginfail_enable=no.  For the sake of having the shim work, I am reporting this.  This system has been reporting login failures and pf denied statistics daily which was not my intention per the variables mentioned above which I have set in /etc/periodic.conf.

I made a few attempts to change the contents of the "security_daily_compat_var" line in /etc/periodic/security/520.pfdenied but was unsuccessful.
>How-To-Repeat:
put in /etc/periodic.conf:
daily_status_security_pfdenied_enable="NO" daily_status_security_loginfail_enable=no
Run it or wait overnight, those scripts run anyway.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jlh 
Responsible-Changed-By: jlh 
Responsible-Changed-When: Mon Oct 28 20:57:48 UTC 2013 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=183137 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/183137: commit references a PR
Date: Tue, 29 Oct 2013 20:35:44 +0000 (UTC)

 Author: jlh
 Date: Tue Oct 29 20:35:35 2013
 New Revision: 257361
 URL: http://svnweb.freebsd.org/changeset/base/257361
 
 Log:
   Fix compatibility function for old daily_status_security_${name}_enable
   variable
   
   PR:	        conf/183137
   Reported by:    Adam McDougall <mcdouga9 at egr msu edu>
   MFC after:	3 days
 
 Modified:
   head/etc/defaults/periodic.conf
 
 Modified: head/etc/defaults/periodic.conf
 ==============================================================================
 --- head/etc/defaults/periodic.conf	Tue Oct 29 20:35:28 2013	(r257360)
 +++ head/etc/defaults/periodic.conf	Tue Oct 29 20:35:35 2013	(r257361)
 @@ -319,7 +319,7 @@ if [ -z "${source_periodic_confs_defined
  	security_daily_compat_var() {
  		local var=$1 dailyvar value
  
 -		dailyvar=daily_status_security${#status_security}
 +		dailyvar=daily_status_security${var#security_status}
  		periodvar=${var%enable}period
  		eval value=\"\$$dailyvar\"
  		[ -z "$value" ] && return
 @@ -331,7 +331,7 @@ if [ -z "${source_periodic_confs_defined
  			$periodvar=daily
  			;;
  		*)
 -			$var="$value"
 +                        eval $var=\"$value\"
  			;;
  		esac
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: jlh 
State-Changed-When: Wed Oct 30 21:17:57 UTC 2013 
State-Changed-Why:  
Adam confirmed this change works.  Thanks for reporting! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183137 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/183137: commit references a PR
Date: Fri,  1 Nov 2013 16:03:45 +0000 (UTC)

 Author: jlh
 Date: Fri Nov  1 16:03:38 2013
 New Revision: 257508
 URL: http://svnweb.freebsd.org/changeset/base/257508
 
 Log:
   MFC r257361:
     Fix compatibility function for old daily_status_security_${name}_enable
     variables.
   
     PR:           conf/183137
   
   MFC r257364:
     Fix indentation.
   
   Approved by:	re (gjb)
 
 Modified:
   stable/10/etc/defaults/periodic.conf
 Directory Properties:
   stable/10/etc/   (props changed)
 
 Modified: stable/10/etc/defaults/periodic.conf
 ==============================================================================
 --- stable/10/etc/defaults/periodic.conf	Fri Nov  1 15:54:57 2013	(r257507)
 +++ stable/10/etc/defaults/periodic.conf	Fri Nov  1 16:03:38 2013	(r257508)
 @@ -319,7 +319,7 @@ if [ -z "${source_periodic_confs_defined
  	security_daily_compat_var() {
  		local var=$1 dailyvar value
  
 -		dailyvar=daily_status_security${#status_security}
 +		dailyvar=daily_status_security${var#security_status}
  		periodvar=${var%enable}period
  		eval value=\"\$$dailyvar\"
  		[ -z "$value" ] && return
 @@ -331,7 +331,7 @@ if [ -z "${source_periodic_confs_defined
  			$periodvar=daily
  			;;
  		*)
 -			$var="$value"
 +			eval $var=\"$value\"
  			;;
  		esac
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
