summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-08-26 13:46:42 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-08-26 13:46:42 -0500
commita2988f20dd3db239bb35994aa92cb8f3a5328051 (patch)
tree15d7cfb1fff6d9469de52c58984dee7abdf7992e /src
parent50af75074e4b85b39f140857d2eb817c604a1f07 (diff)
downloadbcfg2-a2988f20dd3db239bb35994aa92cb8f3a5328051.tar.gz
bcfg2-a2988f20dd3db239bb35994aa92cb8f3a5328051.tar.bz2
bcfg2-a2988f20dd3db239bb35994aa92cb8f3a5328051.zip
POSIX: Unset umask (Resolves #1031)
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Tools/POSIX.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py
index 6aa0b76f8..a7a0c4f63 100644
--- a/src/lib/Client/Tools/POSIX.py
+++ b/src/lib/Client/Tools/POSIX.py
@@ -115,6 +115,13 @@ class POSIX(Bcfg2.Client.Tools.Tool):
setup.parse([])
ppath = setup['ppath']
max_copies = setup['max_copies']
+ """
+ Python uses the OS mknod(2) implementation which modifies the mode
+ based on the umask of the running process (at least on some Linuxes
+ that were tested). We set this to zero so that POSIX-related paths
+ will be created as specified in the Bcfg2 configuration.
+ """
+ os.umask(0)
def canInstall(self, entry):
"""Check if entry is complete for installation."""