Package: aide
Version: 0.18.3-1+deb12u3
Severity: normal
Dear Maintainer,
Aide creates a list of files located in sources.list.d in the script:
/etc/aide/aide.settings.d/10_aide_sourceslist
for file in /etc/apt/sources.list.d/*; do
if [ -e "$file" ]; then
SOURCESLIST="$SOURCESLIST $file"
fi
done
and uses it /etc/aide/aide.settings.d/10_aide_sourceslist
awk '{print}' ${SOURCESLIST} /dev/null | sed 's/ #.*$//' | while read
-r line; do
...
done
in debian 11 it was:
cat $SOURCESLIST /dev/null | sed 's/ #.*$//' | while read deb uri dist comp; do
...
done
If there is a subdirectory in this directory (in my case it was a
backup directory created during the update to the next stable
version), the aide script crashes with an error:
Debian 12, testing, unstable
# aide --config /etc/aide/aide.conf
ERROR: /etc/aide/aide.conf.d/31_aide_apt: stderr> awk: read error
(Is a directory)
ERROR: /etc/aide/aide.conf.d/31_aide_apt: execution failed (exit status: 0)
debian 11:
# aide --config=/etc/aide/aide.conf --update
ERROR: /etc/aide/aide.conf.d/31_aide_apt: stderr> cat:
/etc/apt/sources.list.d/backup: I
s a directory
ERROR: /etc/aide/aide.conf.d/31_aide_apt: execution failed (exit status: 0)
debian 10 also displayed this error, but the script ran to the end
Ignoring the fact that this subdirectory should not be there, the
system for detecting anomalies in the system should report this as a
potential deviation from the standard in the summary, not stop
working.
Possible solutions:
Change test -e to test -f in 10_aide_sourceslist
for file in /etc/apt/sources.list.d/*; do
if [ -f "$file" ]; then
SOURCESLIST="$SOURCESLIST $file"
fi
done
Additionally, you can consider changing the regex
/etc/apt/sources.list.d/* to /etc/apt/sources.list.d/*.list
APT uses as package sources *.list files and *.sources DEB822-STYLE
format, and the latter seems to be unsupported by
/etc/aide/aide.conf.d/31_aide_apt
-- System Information:
Debian Release: 12.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.1.0-22-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages aide depends on:
ii libacl1 2.3.1-3
ii libaudit1 1:3.0.9-1
ii libc6 2.36-9+deb12u7
ii libcap2 1:2.66-4
ii libext2fs2 1.47.0-2
ii libmhash2 0.9.9.9-9
ii libpcre2-8-0 10.42-1
ii libselinux1 3.4-1+b6
ii zlib1g 1:1.2.13.dfsg-1
Versions of packages aide recommends:
ii aide-common 0.18.3-1+deb12u3
Versions of packages aide suggests:
pn figlet <none>
-- no debconf information