Skip to content

Commit 87e6873

Browse files
committed
MDEV-9081 - Debian: insecure debian-sys-maint password handling
Set umask so that newly created file is not readable by others. This is a quick fix to close security gap. To be replaced by MDEV-8375 - passwordless root login.
1 parent c597ed0 commit 87e6873

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

debian/mariadb-server-10.1.postinst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ EOF
157157
else
158158
pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`;
159159
if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi
160+
umask 066
160161
cat /dev/null > $dc
162+
umask 022
161163
echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc
162164
echo "[client]" >>$dc
163165
echo "host = localhost" >>$dc

0 commit comments

Comments
 (0)