tis-fixwaptacl 2

  • package : tis-fixwaptacl
  • version : 2
  • description : Fix inheritance ACL on wapt root folder for Win10 systems
  • maintainer : Hubert TOUVET
  • date : 2017-07-20 11:20:25
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170720-112025
  • min_os_version :
  • min_wapt_version :

setup.py

# -*- coding: utf-8 -*-
from setuphelpers import *
from winsys import fs
import difflib

uninstallkey = []

def install():
    waptroot = WAPT.wapt_base_dir
    if windows_version() >= Version('6.0'):
        with disable_file_system_redirection():
            before = run(r'icacls.exe "%s" /q'%waptroot)
            print('Remove inheritance of ACLs on %s' % waptroot)
            print(run(r'icacls.exe "%s" /inheritance:r'%waptroot))
            after = run(r'icacls.exe "%s" /q'%waptroot)
            print('Result: %s' % '\n'.join(difflib.ndiff(before.splitlines(),after.splitlines())))
    else:
        print('Nothing to do')

    

manifest

[["setup.py", "bf1ba1017d3f225fbb3db0ec1ac8b4b8d3568867"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "bc6000c41e68b1ba628d4b295f545db1f76c05f5"], ["WAPT/control", "5e12789ff558eb43d84a44be2c4c4cdf69d43742"]]