[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Use mktemp instead of deprecated tempfile
Wolfgang Schweer (@schweer-guest)
gitlab at salsa.debian.org
Wed Sep 22 08:21:27 BST 2021
Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config
Commits:
ced2c870 by Wolfgang Schweer at 2021-09-22T09:18:39+02:00
Use mktemp instead of deprecated tempfile
Adjust etc/X11/Xsession-debian-edu, sbin/debian-edu-update-netblock,
share/debian-edu-config/tools/gosa-sync and testsuite/postoffice
Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>
- - - - -
5 changed files:
- debian/changelog
- etc/X11/Xsession-debian-edu
- sbin/debian-edu-update-netblock
- share/debian-edu-config/tools/gosa-sync
- testsuite/postoffice
Changes:
=====================================
debian/changelog
=====================================
@@ -10,6 +10,11 @@ debian-edu-config (2.12.3) UNRELEASED; urgency=medium
not install a desktop environment by default (modular installation).
- Use cf-agent in verbose mode for better readable logging.
* Update share/man/man8/debian-edu-ltsp-install.8 to match the changes.
+ * Use mktemp instead of deprecated tempfile, adjust:
+ - etc/X11/Xsession-debian-edu
+ - sbin/debian-edu-update-netblock
+ - share/debian-edu-config/tools/gosa-sync
+ - testsuite/postoffice
-- Wolfgang Schweer <wschweer at arcor.de> Fri, 17 Sep 2021 16:04:42 +0200
=====================================
etc/X11/Xsession-debian-edu
=====================================
@@ -70,7 +70,7 @@ ERRFILE=$HOME/.xsession-errors
# attempt to create an error file; abort if we cannot
if touch $ERRFILE 2> /dev/null && [ -w $ERRFILE ]; then
chmod 600 "$ERRFILE"
-elif ERRFILE=$(tempfile 2> /dev/null); then
+elif ERRFILE=$(mktemp 2> /dev/null); then
if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
message "Xsession: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
"\"$ERRFILE\"."
=====================================
sbin/debian-edu-update-netblock
=====================================
@@ -55,7 +55,7 @@ start_filtering() {
modprobe ip_tables
modprobe iptable_filter
- filterfile=$(tempfile)
+ filterfile=$(mktemp)
# We are the only filter firewall that should be in operation,
# so we flush all existing rules first. ... add others after
=====================================
share/debian-edu-config/tools/gosa-sync
=====================================
@@ -30,7 +30,7 @@ fi
## The new user password is in environment, $USERPASSWORD.
## Check if provided password corresponds to hash saved in ldap database:
-TMPFILE=$(tempfile)
+TMPFILE=$(mktemp)
trap "rm -f $TMPFILE" ERR SIGHUP SIGINT SIGTERM
cat <<EOF | tr -d "\n" > "$TMPFILE"
=====================================
testsuite/postoffice
=====================================
@@ -42,7 +42,7 @@ Regards,
EOF
-tmpfile=$(tempfile)
+tmpfile=$(mktemp)
smtpserver=postoffice.intern
if swaks --to postmaster at postoffice.intern --server $smtpserver > $tmpfile; then
echo "success: $0: SMTP to $smtpserver worked, email to postmaster sent."
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/ced2c8706bd421b93b66c79a91a27a1a641900eb
--
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/ced2c8706bd421b93b66c79a91a27a1a641900eb
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20210922/3e537035/attachment-0001.htm>
More information about the debian-edu-commits
mailing list