Repocop reports by test

  status rpm id message
fail displaylink-driver-5.8.0-alt4.63.33.x86_64 The test discovered scripts with errors which may be used by a user for damaging important system files. For example if a script uses in its work a temp file which is created in /tmp directory, then every user can create symlinks with the same name (pattern) in this directory in order to destroy or rewrite some system or another user's files. Scripts _must_ _use_ mktemp/tempfile or must use $TMPDIR. mktemp/tempfile is safest. $TMPDIR is safer than /tmp/ because libpam-tmpdir creates a subdirectory of /tmp that is only accessible by that user, and then sets TMPDIR and other variables to that. Hence, it doesn't matter nearly as much if you create a non-random filename, because nobody but you can access it. Found error in /lib/systemd/system-sleep/displaylink.sh: $ grep /tmp/ /lib/systemd/system-sleep/displaylink.sh # Copyright (c) 2015 - 2019 DisplayLink (UK) Ltd. suspend_displaylink-driver() { #flush any bytes in pipe while read 1 SUSPEND_RESULT < /tmp/PmMessagesPort_out; do : ; done; #suspend DisplayLinkManager echo "S" > /tmp/PmMessagesPort_in if [ /tmp/PmMessagesPort_out ]; then #wait until suspend of DisplayLinkManager finish read 1 SUSPEND_RESULT < /tmp/PmMessagesPort_out fi } resume_displaylink-driver() { #resume DisplayLinkManager echo "R" > /tmp/PmMessagesPort_in } main_systemd() { case "\$1/\$2" in

generated by repocop at Thu Mar 28 02:33:58 2024