Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Augeas 0.13.0 and 0.14.0 barf with rsyslog8 if statements. #846

Open
xbeaudouin opened this issue Oct 16, 2024 · 0 comments
Open

Augeas 0.13.0 and 0.14.0 barf with rsyslog8 if statements. #846

xbeaudouin opened this issue Oct 16, 2024 · 0 comments

Comments

@xbeaudouin
Copy link

Hello,

We have found some specific issues with augeas and rsyslog8 ìf`statements.
This has been discovered on FreeBSD and we have been able to reproduce it on Ubuntu 22.04 with augeas 0.13.0-1, and on FreeBSD on augeas 0.14.0.

Create a /tmp/etc/rsyslogd.conf with following contents:

# Consult the rsyslog.conf(5) manpage, and the comprehensive on-line
# documentation at
# https://www.rsyslog.com/doc/v8-stable/configuration/index.html
#
# Derived from
# https://cgit.freebsd.org/src/tree/usr.sbin/syslogd/syslog.conf

module(load="immark")   # provides --MARK-- message capability
module(load="imuxsock") # provides support for local system logging
module(load="imklog")   # kernel logging

*.err;kern.warning;auth.notice;mail.crit                /dev/console
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err   /var/log/message
s
security.*                      /var/log/security
auth.info;authpriv.info         /var/log/auth.log
mail.info                       /var/log/maillog
cron.*                          /var/log/cron

if $programname != "devd" then {
   *.=debug                     /var/log/debug.log
   *.emerg                      action(type="omusrmsg" users="*")
   daemon.info                  /var/log/daemon.log
}

Then just execute:

# augtool -r /tmp errors
Error in /etc/rsyslog.conf:20.0 (parse_failed)
  Get did not match entire input
  Lens: /usr/local/share/augeas/lenses/dist/rsyslog.aug:92.10-.43:

Remove the lines starting with if ..., then augtool will work perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant