Should perform sanity checks for "override" option

Bug #2018471 reported by Chi Wai CHAN
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
logrotate-charm
New
Low
Unassigned

Bug Description

Currently, "override" option allows one to change "rotate" and "interval" directives to any value, it's not desired.

One could easily set "rotate" and "interval" to invalid value such as "rotate = -5" or "interval = decade" without problems. However, if one want to change them back to original value, then it's impossible. This is mainly because the charm uses regex to change these values [1,2].

```
/var/log/apt/term.log {
  rotate -5
  decade
  compress
  missingok
  notifempty
    rotate 5
}
/var/log/apt/history.log {
  rotate -5
  decade
  compress
  missingok
  notifempty
    rotate 5
}
```

[1] https://git.launchpad.net/charm-logrotated/tree/src/lib/lib_logrotate.py#n17
[2] https://git.launchpad.net/charm-logrotated/tree/src/lib/lib_logrotate.py#n90

Tags: bseng-1178
Eric Chen (eric-chen)
tags: added: bseng-1178
Eric Chen (eric-chen)
Changed in charm-logrotated:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.