Bug 204331 - Syntax error in variable assignment in security_daily_compat_var
Summary: Syntax error in variable assignment in security_daily_compat_var
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Jilles Tjoelker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-06 12:18 UTC by martin
Modified: 2015-12-28 21:36 UTC (History)
1 user (show)

See Also:
jilles: mfc-stable10+
jilles: mfc-stable9-
jilles: mfc-stable8-


Attachments
Patch to use eval for computed variable assignments (360 bytes, patch)
2015-11-06 12:18 UTC, martin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description martin 2015-11-06 12:18:51 UTC
Created attachment 162850 [details]
Patch to use eval for computed variable assignments

The shell function security_daily_compat_var in /etc/defaults/periodic.conf attempts to set the var and periodvar using incorrect shell syntax in the yes case, resulting in errors like

/etc/periodic/security/550.ipfwlimit: security_status_ipfwlimit_enable=YES: not found
/etc/periodic/security/550.ipfwlimit: security_status_ipfwlimit_period=daily: not found

It needs to use eval like in the other case.

I found this in 10.1-RELEASE but it looks like same in HEAD.
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-11-07 22:07:30 UTC
A commit references this bug:

Author: jilles
Date: Sat Nov  7 22:06:49 UTC 2015
New revision: 290515
URL: https://svnweb.freebsd.org/changeset/base/290515

Log:
  periodic: Fix backwards compatibility for daily_status_security_* vars.

  Most daily_status_security_* variables in periodic.conf were changed to
  security_status_* in SVN r254974. The compatibility code for the old names
  did not work.

  PR:		204331
  Submitted by:	martin at lispworks.com
  MFC after:	1 week

Changes:
  head/etc/defaults/periodic.conf
Comment 2 Jilles Tjoelker freebsd_committer freebsd_triage 2015-11-07 22:09:42 UTC
Committed to head, thanks.

MFC to stable/10 is planned after 1 week. The broken code is not in older branches.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-12-28 21:35:10 UTC
A commit references this bug:

Author: jilles
Date: Mon Dec 28 21:35:06 UTC 2015
New revision: 292841
URL: https://svnweb.freebsd.org/changeset/base/292841

Log:
  MFC r290515: periodic: Fix backwards compatibility for
  daily_status_security_* vars.

  Most daily_status_security_* variables in periodic.conf were changed to
  security_status_* in SVN r254974. The compatibility code for the old names
  did not work.

  PR:		204331
  Submitted by:	martin at lispworks.com

Changes:
_U  stable/10/
  stable/10/etc/defaults/periodic.conf