lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 135b344 2/6: Diagnose and correct defective u


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 135b344 2/6: Diagnose and correct defective umask
Date: Wed, 26 Feb 2020 17:43:35 -0500 (EST)

branch: master
commit 135b344eb6d742822aac5ea330feb79c33b5eee0
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Diagnose and correct defective umask
    
    A too-restrictive corporate customization of umask has caused too many
    difficult-to-diagnose problems. Override it with the usual default value
    to prevent those problems. Complain whenever it is encountered, so that
    the offending file in /etc/ can be fixed.
---
 gwc/.zshrc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gwc/.zshrc b/gwc/.zshrc
index 7c45450..d501e17 100644
--- a/gwc/.zshrc
+++ b/gwc/.zshrc
@@ -15,6 +15,11 @@ export PATH="$MINIMAL_PATH"
 # and replace :0.0 below with the string it returns:
 export DISPLAY=":0.0"
 
+if [ "$(umask)" -ne 022 ]; then
+  printf "Overriding bogus umask %s\n", "$(umask)"
+  umask 022
+fi
+
 # Make the X clipboard available to root, for vim only. See:
 #   https://lists.nongnu.org/archive/html/lmi/2019-10/msg00000.html
 if [ "$(id -u)" -eq 0 ]; then



reply via email to

[Prev in Thread] Current Thread [Next in Thread]