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ärz 14:17:14 2023 /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ärz 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/stderr | 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.
thanks a lot, please provide the git-formatted patches I will push them!
Created attachment 241967 [details] Git-formatted patch (head)
Created attachment 241968 [details] Git-formatted patch (stable/12)
Created attachment 241969 [details] Git-formatted patch (stable/13)
Here are the patches, first applied head and then cherry-picked from.
thank you added to head, will be merged in a couple of days in stable branches.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d2b4753f06dcabc090080b8c8c91bda00fc8dac3 commit d2b4753f06dcabc090080b8c8c91bda00fc8dac3 Author: Michael Osipov <michael.osipov@siemens.com> AuthorDate: 2023-05-04 12:35:59 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2023-05-15 07:26:48 +0000 periodic: Use locale-agnostic (ISO 8601) timestamp format Instead of reyling on locale-sensitive output which can be mangled when e-mailed use consistently ISO 8601 format which contains the same information as '-T'. PR: 271240 MFC After: 3 days usr.sbin/periodic/etc/security/100.chksetuid | 2 +- usr.sbin/periodic/etc/security/110.neggrpperm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
(In reply to Baptiste Daroussin from comment #6) Merci!
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e31fbe0dff0ca49670fc97eb931f8864f86d2def commit e31fbe0dff0ca49670fc97eb931f8864f86d2def Author: Michael Osipov <michael.osipov@siemens.com> AuthorDate: 2023-05-04 12:35:59 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2023-05-19 08:10:08 +0000 periodic: Use locale-agnostic (ISO 8601) timestamp format Instead of reyling on locale-sensitive output which can be mangled when e-mailed use consistently ISO 8601 format which contains the same information as '-T'. PR: 271240 MFC After: 3 days (cherry picked from commit d2b4753f06dcabc090080b8c8c91bda00fc8dac3) usr.sbin/periodic/etc/security/100.chksetuid | 2 +- usr.sbin/periodic/etc/security/110.neggrpperm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=0cf997acbf0c68988470efcba691f87c38014872 commit 0cf997acbf0c68988470efcba691f87c38014872 Author: Michael Osipov <michael.osipov@siemens.com> AuthorDate: 2023-05-04 12:35:59 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2023-05-19 08:19:55 +0000 periodic: Use locale-agnostic (ISO 8601) timestamp format Instead of reyling on locale-sensitive output which can be mangled when e-mailed use consistently ISO 8601 format which contains the same information as '-T'. PR: 271240 MFC After: 3 days (cherry picked from commit d2b4753f06dcabc090080b8c8c91bda00fc8dac3) usr.sbin/periodic/etc/security/100.chksetuid | 2 +- usr.sbin/periodic/etc/security/110.neggrpperm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)