8 lines
3.9 KiB
Python
8 lines
3.9 KiB
Python
|
|
||
|
from ops.data import OpsClass, OpsField, DszObject, DszCommandObject, cmd_definitions
|
||
|
import dsz
|
||
|
if ('permissions' not in cmd_definitions):
|
||
|
dszmodified = OpsClass('modified', {'removepending': OpsField('removepending', dsz.TYPE_BOOL)}, DszObject, single=True)
|
||
|
dszobject = OpsClass('object', {'group': OpsField('group', dsz.TYPE_STRING), 'type': OpsField('type', dsz.TYPE_STRING), 'owner': OpsField('owner', dsz.TYPE_STRING), 'groupdomain': OpsField('groupdomain', dsz.TYPE_STRING), 'ownerdomain': OpsField('ownerdomain', dsz.TYPE_STRING), 'name': OpsField('name', dsz.TYPE_STRING), 'permissionstring': OpsField('permissionstring', dsz.TYPE_STRING), 'flags': OpsClass('flags', {'se_dacl_auto_inherit_req': OpsField('se_dacl_auto_inherit_req', dsz.TYPE_BOOL), 'se_dacl_auto_inherited': OpsField('se_dacl_auto_inherited', dsz.TYPE_BOOL), 'se_dacl_defaulted': OpsField('se_dacl_defaulted', dsz.TYPE_BOOL), 'se_dacl_present': OpsField('se_dacl_present', dsz.TYPE_BOOL), 'se_dacl_protected': OpsField('se_dacl_protected', dsz.TYPE_BOOL), 'se_group_defaulted': OpsField('se_group_defaulted', dsz.TYPE_BOOL), 'se_owner_defaulted': OpsField('se_owner_defaulted', dsz.TYPE_BOOL), 'se_rm_control_valid': OpsField('se_rm_control_valid', dsz.TYPE_BOOL), 'se_sacl_auto_inherit_req': OpsField('se_sacl_auto_inherit_req', dsz.TYPE_BOOL), 'se_sacl_auto_inherited': OpsField('se_sacl_auto_inherited', dsz.TYPE_BOOL), 'se_sacl_defaulted': OpsField('se_sacl_defaulted', dsz.TYPE_BOOL), 'se_sacl_present': OpsField('se_sacl_present', dsz.TYPE_BOOL), 'se_sacl_protected': OpsField('se_sacl_protected', dsz.TYPE_BOOL), 'se_self_relative': OpsField('se_self_relative', dsz.TYPE_BOOL)}, DszObject, single=True), 'acl': OpsClass('acl', {'type': OpsField('type', dsz.TYPE_STRING), 'ace': OpsClass('ace', {'typevalue': OpsField('typevalue', dsz.TYPE_INT), 'user': OpsField('user', dsz.TYPE_STRING), 'type': OpsField('type', dsz.TYPE_STRING), 'domain': OpsField('domain', dsz.TYPE_STRING), 'flags': OpsClass('flags', {'inherited_ace': OpsField('inherited_ace', dsz.TYPE_BOOL), 'no_propagate_inherit_ace': OpsField('no_propagate_inherit_ace', dsz.TYPE_BOOL), 'successful_access_ace': OpsField('successful_access_ace', dsz.TYPE_BOOL), 'container_inherit_ace': OpsField('container_inherit_ace', dsz.TYPE_BOOL), 'object_inherit': OpsField('object_inherit', dsz.TYPE_BOOL), 'failed_access_ace': OpsField('failed_access_ace', dsz.TYPE_BOOL), 'inherit_only_ace': OpsField('inherit_only_ace', dsz.TYPE_BOOL)}, DszObject, single=True), 'mask': OpsClass('mask', {'write_dac': OpsField('write_dac', dsz.TYPE_BOOL), 'file_read_ea': OpsField('file_read_ea', dsz.TYPE_BOOL), 'generic_read_mask': OpsField('generic_read_mask', dsz.TYPE_BOOL), 'file_write_data': OpsField('file_write_data', dsz.TYPE_BOOL), 'read_control': OpsField('read_control', dsz.TYPE_BOOL), 'file_read_attr': OpsField('file_read_attr', dsz.TYPE_BOOL), 'file_write_attr': OpsField('file_write_attr', dsz.TYPE_BOOL), 'file_delete_child': OpsField('file_delete_child', dsz.TYPE_BOOL), 'file_read_data': OpsField('file_read_data', dsz.TYPE_BOOL), 'file_append_data': OpsField('file_append_data', dsz.TYPE_BOOL), 'file_write_ea': OpsField('file_write_ea', dsz.TYPE_BOOL), 'file_execute': OpsField('file_execute', dsz.TYPE_BOOL), 'write_owner': OpsField('write_owner', dsz.TYPE_BOOL), 'synchronize': OpsField('synchronize', dsz.TYPE_BOOL), 'generic_write_mask': OpsField('generic_write_mask', dsz.TYPE_BOOL), 'execute_file_mask': OpsField('execute_file_mask', dsz.TYPE_BOOL), 'delete_mask': OpsField('delete_mask', dsz.TYPE_BOOL), 'full_control_mask': OpsField('full_control_mask', dsz.TYPE_BOOL), 'read_write_mask': OpsField('read_write_mask', dsz.TYPE_BOOL)}, DszObject, single=True)}, DszObject, single=True)}, DszObject, single=False)}, DszObject, single=True)
|
||
|
permissionscommand = OpsClass('permissions', {'modified': dszmodified, 'object': dszobject}, DszCommandObject)
|
||
|
cmd_definitions['permissions'] = permissionscommand
|