summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-08 08:10:16 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-08 08:10:16 -0400
commite1e194a573b3803fa7f45a646bbb36b2f164a3e1 (patch)
treee9b689d1be39d38279e0a16f010e8d5e573612ef /src/lib/Bcfg2/Client
parent35851347089db1a092ec715cb183aec19f19e983 (diff)
parenteef441c1acdf1d3d483647b153f721cbab4a8517 (diff)
downloadbcfg2-e1e194a573b3803fa7f45a646bbb36b2f164a3e1.tar.gz
bcfg2-e1e194a573b3803fa7f45a646bbb36b2f164a3e1.tar.bz2
bcfg2-e1e194a573b3803fa7f45a646bbb36b2f164a3e1.zip
Merge branch 'maint'
Conflicts: doc/appendix/files/mysql.txt doc/getting_started/index.txt doc/server/plugins/structures/bundler/kernel.txt src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/interfaces.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Probes.py src/lib/Bcfg2/Server/Plugins/SSHbase.py
Diffstat (limited to 'src/lib/Bcfg2/Client')
-rw-r--r--src/lib/Bcfg2/Client/Tools/POSIX/base.py9
-rw-r--r--src/lib/Bcfg2/Client/Tools/POSIXUsers.py5
2 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/POSIX/base.py b/src/lib/Bcfg2/Client/Tools/POSIX/base.py
index 3778569a6..fb5d06e54 100644
--- a/src/lib/Bcfg2/Client/Tools/POSIX/base.py
+++ b/src/lib/Bcfg2/Client/Tools/POSIX/base.py
@@ -686,7 +686,7 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
""" os.makedirs helpfully creates all parent directories for
us, but it sets permissions according to umask, which is
probably wrong. we need to find out which directories were
- created and set permissions on those
+ created and try to set permissions on those
(http://trac.mcs.anl.gov/projects/bcfg2/ticket/1125 and
http://trac.mcs.anl.gov/projects/bcfg2/ticket/1134) """
created = []
@@ -706,8 +706,9 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
(path, err))
rv = False
- # set auto-created directories to mode 755, if you need
- # something else, you should specify it in your config
+ # set auto-created directories to mode 755 and use best effort for
+ # permissions. If you need something else, you should specify it in
+ # your config.
tmpentry = copy.deepcopy(entry)
tmpentry.set('mode', '0755')
for acl in tmpentry.findall('ACL'):
@@ -715,7 +716,7 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
oct_mode(self._norm_acl_perms(acl.get('perms')) |
ACL_MAP['x']))
for cpath in created:
- rv &= self._set_perms(tmpentry, path=cpath)
+ self._set_perms(tmpentry, path=cpath)
return rv
diff --git a/src/lib/Bcfg2/Client/Tools/POSIXUsers.py b/src/lib/Bcfg2/Client/Tools/POSIXUsers.py
index 9b40f9cea..9d7441b5c 100644
--- a/src/lib/Bcfg2/Client/Tools/POSIXUsers.py
+++ b/src/lib/Bcfg2/Client/Tools/POSIXUsers.py
@@ -196,7 +196,10 @@ class POSIXUsers(Bcfg2.Client.Tools.Tool):
# automatically determine one -- i.e., it always
# verifies
continue
- if val != entry.get(attr):
+ entval = entry.get(attr)
+ if not isinstance(entval, str):
+ entval = entval.encode('utf-8')
+ if val != entval:
errors.append("%s for %s %s is incorrect. Current %s is "
"%s, but should be %s" %
(attr.title(), entry.tag, entry.get("name"),