Bug#1013221: marked as done (sendfile: /etc/cron.weekly job complains about deprecated tempfile)
Your message dated Fri, 19 Apr 2024 00:16:37 +0200
with message-id <bd70f833-eb2b-4011-adaa-782098089242@debian.org>
and subject line Re: sendfile: /etc/cron.weekly job complains about deprecated tempfile
has caused the Debian Bug report #1013221,
regarding sendfile: /etc/cron.weekly job complains about deprecated tempfile
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)
--
1013221: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1013221
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: sendfile: /etc/cron.weekly job complains about deprecated tempfile
- From: Patrik Schindler <poc@pocnet.net>
- Date: Sun, 19 Jun 2022 12:17:23 +0200
- Message-id: <165563384326.9810.8580966098980814276.reportbug@leela.pocnet.net>
Package: sendfile
Version: 2.1b.20080616-8
Severity: normal
I'm getting an email weekly:
/etc/cron.weekly/sendfile:
WARNING: tempfile is deprecated; consider using mktemp instead.
Replacing the recommended action seems to fix the issue.
-- System Information:
Debian Release: 11.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-15-amd64 (SMP w/2 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/bash
Init: sysvinit (via /sbin/init)
Versions of packages sendfile depends on:
ii libc6 2.31-13+deb11u3
ii libdpkg-perl 1.20.10
ii libreadline8 8.1-1
ii openbsd-inetd [inet-superserver] 0.20160825-5
ii perl 5.32.1-4+deb11u2
ii update-inetd 4.51
sendfile recommends no packages.
Versions of packages sendfile suggests:
pn pgp-i <none>
-- Configuration Files:
/etc/cron.weekly/sendfile changed:
test -f /etc/sendfile.cf || exit 0
test -x /usr/bin/sendfile || exit 0
spooldir=$(sendfile -qW=spool)
cd $spooldir || exit 0
export LANG=C
maxage=$(grep '^deljunk' /etc/sendfile.cf)
test -n "$maxage" || exit 0
maxage=${maxage##*=}
maxage=${maxage/ /}
maxage=${maxage/ /}
pivot=$spooldir/pivot
touch -d now-${maxage}days $pivot
touch -d now-1day $pivot.yesterday
tmp=$(mktemp)
trap "rm -f $tmp $pivot $pivot.yesterday" INT EXIT
for i in *
do
if [ -z "$(getent passwd "$i")" ]
then
continue
fi
echo -n > $tmp
if [ -d "$i" ]
then
(
cd "$i"
for f in $(find -maxdepth 1 -name '*.h')
do
b=${f#./}
b=${b%.h}
FILE=
SIZE=
while read line
do
case $line in
FILE*) FILE=${line#FILE }
;;
SIZE*) SIZE=${line#SIZE }
SIZE=${SIZE#* }
;;
esac
done < $f
size=$(stat $b.d|grep Size)
size=${size#*Size: }
size=${size%% *}
if [ $SIZE -gt $size ]
then
if [ $b.d -ot $pivot ]
then
logger -i -p daemon.info -t sendfile "sf_cleanup: Expired partial file $b for user $i"
rm -f ${b}.{dh}
else
if [ $b.d -ot $pivot.yesterday ]
then
echo "Partial file $b will expire after $maxage days" >> $tmp
fi
fi
fi
done
)
if [ -s $tmp ]
then
(
echo "Subject: Weekly SAFT Report"
echo "From: SAFT Server <root>"
echo
echo "The following incompletely received files have been found in the SAFT"
echo "spool directory $spooldir:"
echo
cat $tmp
) | /usr/sbin/sendmail $i
fi
fi
done
/etc/logrotate.d/sendfile changed:
/var/spool/sendfile/*/log {
weekly
compress
rotate 7
missingok
nocreate
sharedscripts
}
/etc/profile.d/sendfile [Errno 2] No such file or directory: '/etc/profile.d/sendfile'
-- no debconf information
--- End Message ---
--- Begin Message ---
- To: Patrik Schindler <poc@pocnet.net>, 1013221-done@bugs.debian.org
- Subject: Re: sendfile: /etc/cron.weekly job complains about deprecated tempfile
- From: Santiago Vila <sanvila@debian.org>
- Date: Fri, 19 Apr 2024 00:16:37 +0200
- Message-id: <bd70f833-eb2b-4011-adaa-782098089242@debian.org>
- In-reply-to: <165563384326.9810.8580966098980814276.reportbug@leela.pocnet.net>
- References: <165563384326.9810.8580966098980814276.reportbug@leela.pocnet.net>
Version: 2.1b.20080616-9
Hi. I don't use or maintain sendfile myself, but according to the changelog:
* debian/sf_cleanup: Replace missing tempfile(1) call with mktemp(1).
(Closes: #969409)
this was fixed in the version above.
Thanks.
--- End Message ---
Reply to: