summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-12-20 11:58:09 +0100
committerAllan McRae <allan@archlinux.org>2014-12-24 11:15:15 +1000
commita1c50a08c9307cd21947269bd8382add1acf2515 (patch)
treed968017840e3dced803718ee84ee8852e3549e92 /scripts
parent325e20dea15882a4cdfe1cdbddd09ffb30c0c364 (diff)
pacman-db-upgrade: set umask 022
This prevents the database from becoming inaccessible for non-root users when the script was executed with a umask of 027. Signed-off-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/pacman-db-upgrade.sh.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in
index 7b360c3c..7d01bce9 100644
--- a/scripts/pacman-db-upgrade.sh.in
+++ b/scripts/pacman-db-upgrade.sh.in
@@ -19,6 +19,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+# Avoid creating world-unreadable files
+umask 022
+
# gettext initialization
export TEXTDOMAIN='pacman-scripts'
export TEXTDOMAINDIR='@localedir@'