Bug 188109 - [periodic.conf] [patch] ASSERTION FAILED running individual periodic scripts on 10/11 branches
Summary: [periodic.conf] [patch] ASSERTION FAILED running individual periodic scripts ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-rc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-31 04:00 UTC by Jason Unovitch
Modified: 2015-09-22 13:17 UTC (History)
2 users (show)

See Also:


Attachments
file.diff (377 bytes, patch)
2014-03-31 04:00 UTC, Jason Unovitch
no flags Details | Diff
defaults-periodic-2.diff (558 bytes, patch)
2014-03-31 04:03 UTC, Jason Unovitch
no flags Details | Diff
defaults-periodic-3.diff (1.68 KB, patch)
2014-03-31 04:03 UTC, Jason Unovitch
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Unovitch freebsd_committer freebsd_triage 2014-03-31 04:00:00 UTC
r254974 introduced the ability to run security periodic scripts on a
daily/weekly/monthly basis.  It also introduced an assumption that the
$PERIODIC variable exported on line 81 /usr/sbin/periodic would be
defined.  This introduces a minor regression as we cannot run individual
scripts by running directly from a shell anymore.

Fix: Workaround:
env PERIODIC=security ./100.chksetuid

Fix:
Apply attached patch to provide an extra case statement entry for an empty $PERIODIC variable.

Patch attached with submission follows:
How-To-Repeat: cd /etc/periodic/security
./100.chksetuid

ASSERTION FAILED: Unexpected value for  $PERIODIC: ''
Comment 1 Jason Unovitch freebsd_committer freebsd_triage 2014-03-31 04:03:00 UTC
Two alternate version of patches I worked are attached for ideas if the 
patch submitted is not acceptable.

- Jason Unovitch
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2014-04-16 02:30:03 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to maintainer(s).
Comment 3 Jason Unovitch freebsd_committer freebsd_triage 2015-07-05 15:48:12 UTC
CC jlh@ as committer for the configurable periodic security fixes in r254974 and r255169.

Do we want to address this before 10.2-RELEASE?  The fix is a simple shell script update.  I looked into it and gjb@ weighed in in the past.  It's been broken in both 10.0 and 10.1.

https://lists.freebsd.org/pipermail/freebsd-current/2014-March/048794.html
Comment 4 Mark Felder freebsd_committer freebsd_triage 2015-07-06 19:35:27 UTC
+1

If not just to prevent future emails about it
Comment 5 Jeremie Le Hen freebsd_committer freebsd_triage 2015-07-11 16:23:39 UTC
Hi Jason,

Thanks for bringing my attention to it.  I will try to fix over the weekend :-).
-- Jeremie
Comment 6 Jason Unovitch freebsd_committer freebsd_triage 2015-07-13 01:13:16 UTC
(In reply to Jeremie Le Hen from comment #5)

If you have any feedback I will be glad to address it.  I did the patches quite a while ago but they all do fundamentally the same thing.  Only difference being the latter patches change more lines of code in order to be more clear up front.  If you have any better suggestions that would be great.

Sorry for not pursuing this earlier.  I've been getting more acquainted with Bugzilla and been digging through issues that I haven't followed up on.
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-07-13 10:15:10 UTC
A commit references this bug:

Author: jlh
Date: Mon Jul 13 10:15:02 UTC 2015
New revision: 285444
URL: https://svnweb.freebsd.org/changeset/base/285444

Log:
  Allow again periodic scripts to be run from command-line.

  PR:		188109
  Submitted by:	Jason Unovitch
  MFC after:	1 week

Changes:
  head/etc/defaults/periodic.conf
Comment 8 Jason Unovitch freebsd_committer freebsd_triage 2015-07-27 01:22:40 UTC
(In reply to Jeremie Le Hen from comment #5)

Jeremie,
I see this hasn't MFC'd to stable/10. Are we going to be able to get this in and into releng/10.2?  It would be nice to see it make the cut in release!

Thanks!
Comment 9 commit-hook freebsd_committer freebsd_triage 2015-09-22 11:39:30 UTC
A commit references this bug:

Author: jlh
Date: Tue Sep 22 11:38:59 UTC 2015
New revision: 288107
URL: https://svnweb.freebsd.org/changeset/base/288107

Log:
  Long overdue MFC r285444:
    Allow again periodic scripts to be run from command-line.

    PR:           188109
    Submitted by: Jason Unovitch

Changes:
_U  stable/10/
  stable/10/etc/defaults/periodic.conf
Comment 10 Jeremie Le Hen freebsd_committer freebsd_triage 2015-09-22 13:16:59 UTC
Sorry for the late MFC, I've little time for FreeBSD nowadays.
Considering this bug as fixed.

Thanks again for reporting it.
-- Jeremie