Re: We need to stop lower casing everything!

Mike Tremaine <mgt-DY+kYuDXiUrz68fS/h/[email protected]> Tue, 20 Oct 2020 11:57:37 -0700
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
--===============7316643708011883682==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_9B89454F-B000-48CB-8729-2AB025FAAC59"


--Apple-Mail=_9B89454F-B000-48CB-8729-2AB025FAAC59
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

The biggest ramifications I can see is the Config files are written with =
with uppercase, I assume for style. But it=E2=80=99s everywhere

Detail =3D 10
TmpDir =3D /tmp
Archives =3D Yes
# You can also disable certain services (when specifying all)
Service =3D "-afpd=E2=80=9D

In logwatch.pl there are 9 calls to lc these two are the ones that =
covert the config name / value pairs

      push @ReadConfigNames, lc $name;
      push @ReadConfigValues, getInt $value;

But over all these are files with lc in them (might be some false =
positives in the list) removing lc from the main script and pushing =
required calls down to the module level might be the way to go if you =
really want to remove it.

Rigel:scripts mgt$ grep -c -R lc . | grep -v ':0'
./logwatch.pl:9
./shared/journalctl:7
./shared/applyeurodate:2
./services/postgresql:3
./services/eximstats:1
./services/amavis:15
./services/fail2ban:1
./services/mailscanner:3
./services/dnf-rpm:8
./services/php:3
./services/evtsecurity:4
./services/http:5
./services/mysql:3
./services/citadel:12
./services/postfix:28
./services/slon:2
./services/iptables:2
./services/windows:1
./services/mdadm:2
./services/pam_unix:2
./services/sendmail:1


> On Oct 20, 2020, at 11:27 AM, Orion Poplawski <[email protected]> wrote:
>=20
> Folks -
>=20
>  It's becoming past ridiculous that logwatch lowercases everything in =
the
> configuration files.  I'm afraid I never understood the reason for it.
> Perhaps someone with a longer experience with logwatch can tell me?
>=20
>  But the latest issue is with sudo's ignore_commands - and this is =
important
> since different cased commands could conceivably be quite different.
>=20
>  So, what are the ramifications of no longer lower-casing everything?
>=20
> Orion
>=20
> --=20
> Orion Poplawski
> Manager of NWRA Technical Systems          720-772-5637
> NWRA, Boulder/CoRA Office             FAX: 303-415-9702
> 3380 Mitchell Lane                       [email protected]
> Boulder, CO 80301                 https://www.nwra.com/
>=20
>=20
> _______________________________________________
> Logwatch-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/logwatch-devel


--Apple-Mail=_9B89454F-B000-48CB-8729-2AB025FAAC59
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><span=
 style=3D"font-size: 14px;" class=3D"">The biggest ramifications I can =
see is the Config files are written with with uppercase, I assume for =
style. But it=E2=80=99s everywhere</span><div class=3D""><span =
style=3D"font-size: 14px;" class=3D""><br class=3D""></span></div><div =
class=3D""><div style=3D"margin: 0px; font-stretch: normal; line-height: =
normal;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures; font-size: 14px;" class=3D"">Detail =3D =
10</span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures; font-size: 14px;" class=3D"">TmpDir =3D =
/tmp</span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures; font-size: 14px;" class=3D"">Archives =3D =
Yes</span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal; color: rgb(64, 11, 217);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D""># You can also disable certain services (when specifying =
all)</span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><span style=3D"font-size: 14px;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">Service =3D </span><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: #b42419" =
class=3D"">"-afpd=E2=80=9D</span></span></div><div class=3D""><div =
class=3D""><span style=3D"font-size: 14px;" class=3D""><br =
class=3D""></span></div><div class=3D""><span style=3D"font-size: 14px;" =
class=3D"">In logwatch.pl there are 9 calls to lc these two are the ones =
that covert the config name / value pairs</span></div><div =
class=3D""><span style=3D"font-size: 14px;" class=3D""><br =
class=3D""></span></div><div class=3D""><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal; color: rgb(46, 174, 187);" =
class=3D""><span style=3D"font-size: 14px;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; color: #000000" =
class=3D"">&nbsp; &nbsp; &nbsp;&nbsp;</span><span =
style=3D"font-variant-ligatures: no-common-ligatures; color: #c1651c" =
class=3D"">push</span><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: #000000" class=3D""> </span><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">@ReadConfigNames</span><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: #000000" class=3D"">, </span><span =
style=3D"font-variant-ligatures: no-common-ligatures; color: #c1651c" =
class=3D"">lc</span><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: #000000" class=3D""> </span><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">$name</span><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: #000000" class=3D"">;</span></span></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal; color: =
rgb(46, 174, 187);" class=3D""><span style=3D"font-size: 14px;" =
class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures; =
color: #000000" class=3D"">&nbsp; &nbsp; &nbsp; </span><span =
style=3D"font-variant-ligatures: no-common-ligatures; color: #c1651c" =
class=3D"">push</span><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: #000000" class=3D""> </span><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">@ReadConfigValues</span><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: #000000" class=3D"">, getInt </span><span =
style=3D"font-variant-ligatures: no-common-ligatures" =
class=3D"">$value</span><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: #000000" class=3D"">;</span></span></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal; color: =
rgb(46, 174, 187);" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: rgb(0, 0, 0); font-size: 14px;" class=3D""><br=
 class=3D""></span></div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal; color: rgb(46, 174, 187);" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, =
0); font-size: 14px;" class=3D"">But over all these are files with lc in =
them (might be some false positives in the list) removing lc from the =
main script and pushing required calls down to the module level might be =
the way to go if you really want to remove it.</span></div><div =
style=3D"margin: 0px; font-stretch: normal; line-height: normal; color: =
rgb(46, 174, 187);" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures; color: rgb(0, 0, 0); font-size: 14px;" class=3D""><br=
 class=3D""></span></div><div><div style=3D"margin: 0px; font-stretch: =
normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">Rigel:scripts mgt$ grep -c -R lc . | grep -v =
':0'</span></div><div style=3D"margin: 0px; font-stretch: normal; =
line-height: normal;" class=3D""><span style=3D"font-variant-ligatures: =
no-common-ligatures; font-size: 14px;" =
class=3D"">./logwatch.pl:9</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./shared/journalctl:7</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./shared/applyeurodate:2</span></div><div style=3D"margin: =
0px; font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/postgresql:3</span></div><div style=3D"margin: =
0px; font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/eximstats:1</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/amavis:15</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/fail2ban:1</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/mailscanner:3</span></div><div style=3D"margin: =
0px; font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/dnf-rpm:8</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/php:3</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/evtsecurity:4</span></div><div style=3D"margin: =
0px; font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/http:5</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/mysql:3</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/citadel:12</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/postfix:28</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/slon:2</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/iptables:2</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/windows:1</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/mdadm:2</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/pam_unix:2</span></div><div style=3D"margin: 0px; =
font-stretch: normal; line-height: normal;" class=3D""><span =
style=3D"font-variant-ligatures: no-common-ligatures; font-size: 14px;" =
class=3D"">./services/sendmail:1</span></div></div><div><br =
class=3D""></div><div><br class=3D""><blockquote type=3D"cite" =
class=3D""><div class=3D"">On Oct 20, 2020, at 11:27 AM, Orion Poplawski =
&lt;<a href=3D"mailto:[email protected]" class=3D"">[email protected]</a>&gt; =
wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
class=3D"">Folks -<br class=3D""><br class=3D""> &nbsp;It's becoming =
past ridiculous that logwatch lowercases everything in the<br =
class=3D"">configuration files. &nbsp;I'm afraid I never understood the =
reason for it.<br class=3D"">Perhaps someone with a longer experience =
with logwatch can tell me?<br class=3D""><br class=3D""> &nbsp;But the =
latest issue is with sudo's ignore_commands - and this is important<br =
class=3D"">since different cased commands could conceivably be quite =
different.<br class=3D""><br class=3D""> &nbsp;So, what are the =
ramifications of no longer lower-casing everything?<br class=3D""><br =
class=3D"">Orion<br class=3D""><br class=3D"">-- <br class=3D"">Orion =
Poplawski<br class=3D"">Manager of NWRA Technical Systems =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;720-772-5637<br =
class=3D"">NWRA, Boulder/CoRA Office =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FA=
X: 303-415-9702<br class=3D"">3380 Mitchell Lane =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a =
href=3D"mailto:[email protected]" class=3D"">[email protected]</a><br =
class=3D"">Boulder, CO 80301 =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;<a href=3D"https://www.nwra.com/" =
class=3D"">https://www.nwra.com/</a><br class=3D""><br class=3D""><br =
class=3D"">_______________________________________________<br =
class=3D"">Logwatch-devel mailing list<br class=3D""><a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a><br =
class=3D"">https://lists.sourceforge.net/lists/listinfo/logwatch-devel<br =
class=3D""></div></div></blockquote></div><br =
class=3D""></div></div></div></body></html>=

--Apple-Mail=_9B89454F-B000-48CB-8729-2AB025FAAC59--


--===============7316643708011883682==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============7316643708011883682==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Logwatch-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/logwatch-devel

--===============7316643708011883682==--