Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 May 2023 11:19:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 271240] periodic(8) output mangles in e-mails/uses non-portable/-neutral date formats
Message-ID:  <bug-271240-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271240

            Bug ID: 271240
           Summary: periodic(8) output mangles in e-mails/uses
                    non-portable/-neutral date formats
           Product: Base System
           Version: 12.4-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: michael.osipov@siemens.com

This is basically a re-report of https://github.com/freebsd/pkg/issues/2126=
 for
the base system.

Here is the diff from the setuid script (/var/log/setuid.today):
+    865 -r-sr-xr-x  1 root  wheel       6600 30 Nov. 07:24:56 2022
/usr/local/bastille/jails/deblndw013x10j/root/usr/libexec/ulog-helper
+ 231654 -rwsr-xr-x  1 root  wheel      54096 28 M=C3=83=C2=A4rz 14:17:14 2=
023
/usr/local/bastille/jails/deblndw013x10j/root/usr/local/bin/ksu
+  15861 -r-sr-sr-x  2 root  authpf     39608 30 Nov. 07:29:24 2022
/usr/local/bastille/jails/deblndw013x10j/root/usr/sbin/authpf

M=C3=A4rz is mangled because the sender (periodic(8)) cannot set the content
encoding on the e-mail. So, basically dependending on the locale the output=
 can
be mangled completely or readable if plain ASCII is used.

The source of error comes from:
root@deblndw011x2j:/etc/periodic
# grep -r "exec ls " .
./security/100.chksetuid:           \( -perm -u+s -or -perm -g+s \) -exec ls
-liTd \{\} \+ |
./security/110.neggrpperm:          -exec ls -liTd \{\} \+ | tee /dev/stder=
r |
wc -l)

After a patch it looks decent and neutral:
# ./security/110.neggrpperm

Checking negative group permissions:
525974 -------rw-  1 root  wheel  0 2023-05-04T13:02:50 /tmp/you

One needs to switch '-T' with:
 57         -exec ls -lid -D "%FT%T" \{\} \+ | tee /dev/stderr | wc -l)

Thus with '-D "%FT%T"'.

Willing to provide a Git-formatted patch for both scripts.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271240-227>