mirror of
https://github.com/shenmintao/aic8800d80.git
synced 2026-11-10 16:49:17 +00:00
Write the installer log to /var/log instead of a world-writable /tmp file
install.sh ran as root and created /tmp/aic8800d80_install.log with mode
666 at a fixed, predictable path. Root writing to a fixed name in /tmp is
open to symlink races (mitigated, not removed, by fs.protected_symlinks),
and a world-writable log lets any local user alter what an administrator
later reads.
The log now lives at /var/log/aic8800-install.log, is created with mode
0644 only after the root check, and failed writes before that point are
silenced instead of printing redirection errors. diagnostic_build.sh
reads the new path and falls back to the old one for logs left by
earlier installers.
(cherry picked from commit ef66811ca5)
This commit is contained in:
1 parent
0fbb11a47c
commit
33d33afe96
2 files changed
+14
-15
No files matched your search
+5
-1
@@ -19,7 +19,11 @@ NC='\033[0m'
|
||||
|
||||
DRV_NAME="aic8800"
|
||||
DRV_VERSION="1.0.0"
|
||||
INSTALL_LOG="/tmp/aic8800d80_install.log"
|
||||
INSTALL_LOG="/var/log/aic8800-install.log"
|
||||
# Installers before this change wrote their log to /tmp.
|
||||
if [ ! -f "$INSTALL_LOG" ] && [ -f /tmp/aic8800d80_install.log ]; then
|
||||
INSTALL_LOG="/tmp/aic8800d80_install.log"
|
||||
fi
|
||||
|
||||
read_dkms_conf_value() {
|
||||
local key="$1"
|
||||
|
||||
Reference in new issue
Block a user