diff options
author | Jon Stanley <jonstanley@gmail.com> | 2009-12-10 00:34:02 -0500 |
---|---|---|
committer | Jon Stanley <jonstanley@gmail.com> | 2009-12-10 00:34:02 -0500 |
commit | 9c4793474b7c72df80ff99e93d80029cbaa23bd0 (patch) | |
tree | ec00628797306e7488abf7c43828c7ff96bed27a | |
parent | 82c14644d4723fee25b21133e50da0564990ac45 (diff) | |
download | cvssetfacl-9c4793474b7c72df80ff99e93d80029cbaa23bd0.tar.gz cvssetfacl-9c4793474b7c72df80ff99e93d80029cbaa23bd0.tar.xz cvssetfacl-9c4793474b7c72df80ff99e93d80029cbaa23bd0.zip |
Fix bug where ownership would be changed even in dry-run
-rwxr-xr-x | setacls.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -142,10 +142,10 @@ def apply_acls(acl_dict, dry_run=False): if not dry_run: acl_dict[dir].applyto(real_dir, posix1e.ACL_TYPE_DEFAULT) acl_dict[dir].applyto(real_dir, posix1e.ACL_TYPE_ACCESS) + os.chown(real_dir, 0, scm_admin_gid) else: print 'would apply the following ACL to %s' % real_dir print acl_dict[dir] - os.chown(real_dir, 0, scm_admin_gid) for file in os.listdir(real_dir): real_file = os.path.join(real_dir, file) if not dry_run: |