def set_inheritance(obj_name, enabled, obj_type='file', clear=False):
 if (obj_type not in ['file', 'registry', 'registry32']):
  raise SaltInvocationError('obj_type called with incorrect parameter: {0}'.format(obj_name))
 if clear:
  dacl = Dacl(obj_type=obj_type)
 else:
  dacl = Dacl(obj_name, obj_type)
 return dacl.save(obj_name, (not enabled))

def set_inheritance ( obj_name , enabled , obj_type = 'file' , clear = False ) : if ( obj_type not in [ 'file' , 'registry' , 'registry32' ] ) : raise SaltInvocationError ( 'obj_type called with incorrect parameter: {0}' . format ( obj_name ) ) if clear : dacl = Dacl ( obj_type = obj_type ) else : dacl = Dacl ( obj_name , obj_type ) return dacl . save ( obj_name , ( not enabled ) )
enable or disable an objects inheritance .