diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-11-22 22:05:31 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-11-22 22:05:31 +0000 |
commit | 9b987aee5c51c1a5132c33ffb0f87f0077d9577f (patch) | |
tree | 8b5c94737308e490beef4fd119edf9825e938a78 /src | |
parent | 872363f0c5f4b10de9f376b9340b3f7c7d1d9664 (diff) | |
download | bcfg2-9b987aee5c51c1a5132c33ffb0f87f0077d9577f.tar.gz bcfg2-9b987aee5c51c1a5132c33ffb0f87f0077d9577f.tar.bz2 bcfg2-9b987aee5c51c1a5132c33ffb0f87f0077d9577f.zip |
Add Permissions code
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2526 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Client/Tools/POSIX.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py index c6e76652e..146fa7070 100644 --- a/src/lib/Client/Tools/POSIX.py +++ b/src/lib/Client/Tools/POSIX.py @@ -161,6 +161,14 @@ class POSIX(Bcfg2.Client.Tools.Tool): except OSError: self.logger.error('Failed to create directory %s' % (entry.get('name'))) return False + return self.InstallPermissions(entry) + + def VerifyPermissions(self, entry, _): + '''Verify Permissions entry''' + return self.VerifyDirectory(entry, _) + + def InstallPermissions(self, entry): + '''Install POSIX Permissions''' try: os.chown(entry.get('name'), pwd.getpwnam(entry.get('owner'))[2], grp.getgrnam(entry.get('group'))[2]) |