[PLUG] Whitespace in Ubuntu 22.04 rsyslog.conf

Ben Koenig techkoenig at protonmail.com
Tue Sep 13 19:21:46 UTC 2022


------- Original Message -------
On Tuesday, September 13th, 2022 at 11:07 AM, Paul Heinlein <heinlein at madboa.com> wrote:


> On Tue, 13 Sep 2022, Tomas Kuchta wrote:
> 
> > On Tue, Sep 13, 2022, 13:34 Paul Heinlein heinlein at madboa.com wrote:
> > 
> > > Just an FYI:
> > > 
> > > At work, we use a puppet template to generate /etc/rsyslog.conf on all
> > > our *nix machines. That template was failing on the first Ubuntu 22.04
> > > host we tried to integrate with our puppet configs.
> > > 
> > > In short, certain directives that encountered two spaces between
> > > directive and setting would fail, e.g.,
> > > 
> > > $FileOwner syslog
> > > $FileGroup adm
> > > 
> > > Replacing the two spaces with a single space fixed the problem.
> > > 
> > > I scoured the changelogs but couldn't find evidence that this is an
> > > intentional change.
> > > .
> > 
> > Could this be UTF issue in rsyslog config parser/regexp?
> > 
> > I have been encountering strange invisible simple parsing issues recently.
> > If this is related, I usually resolve them by replacing [ \t] or \s or \S
> > with [[:space:]] patterns and it often helps.
> 
> 
> I piped the offending lines through "od -a" and they were reported as
> standard "sp" spaces. If it's a UTF-8 issue, I can't see how I fixed
> it.
> 
> --
> Paul Heinlein
> heinlein at madboa.com
> 45°22'48" N, 122°35'36" W

I ran into something sort of similar with some package definition text files that I was parsing with python. When the text was viewed over HTTP there was a normal period, but after downloading that same period gave parsing errors as UTF-8. Some text viewers didn't even see the character, i.e. kwrite didn't display it but it was clearly there since I could backspace it out of the file without any visible change!

In the end I had to conclude that the character was corrupt. Even though it looked normal in firefox there was definitely something wrong with that string..



More information about the PLUG mailing list