func init // adds using namespace sys.add_use('System.Security.AccessControl') // initialize instance sys.add_object(this.codename, 'RegistrySecurity') // makes implementation methods for properties sys._prop_init('AccessRightType', 1, 0, 0) sys._prop_init('AccessRuleType', 1, 0, 0) sys._prop_init('AuditRuleType', 1, 0, 0) // makes implementation of methods as properties sys._mtd_as_prop_init('RegistrySecurity') // initialize common events and properties include("ObjectSecurity-init") end func doAccessRuleFactory(data) if(linked("onAccessRuleFactory")) event("onAccessRuleFactory", this.codename + '.AccessRuleFactory(' + d("identityReference") + ', ' + d("accessMask") + ', ' + d("isInherited") + ', ' + d("inheritanceFlags") + ', ' + d("propagationFlags") + ', ' + d("type") + ')') else blk.println(this.codename, '.AccessRuleFactory(', d("identityReference"), ', ', d("accessMask"), ', ', d("isInherited"), ', ', d("inheritanceFlags"), ', ', d("propagationFlags"), ', ', d("type"), ');') end end func doAddAccessRule(data) blk.println(this.codename, '.AddAccessRule(', d("rule"), ');') end func doAddAuditRule(data) blk.println(this.codename, '.AddAuditRule(', d("rule"), ');') end func doAuditRuleFactory(data) if(linked("onAuditRuleFactory")) event("onAuditRuleFactory", this.codename + '.AuditRuleFactory(' + d("identityReference") + ', ' + d("accessMask") + ', ' + d("isInherited") + ', ' + d("inheritanceFlags") + ', ' + d("propagationFlags") + ', ' + d("flags") + ')') else blk.println(this.codename, '.AuditRuleFactory(', d("identityReference"), ', ', d("accessMask"), ', ', d("isInherited"), ', ', d("inheritanceFlags"), ', ', d("propagationFlags"), ', ', d("flags"), ');') end end func doRemoveAccessRule(data) if(linked("onRemoveAccessRule")) event("onRemoveAccessRule", this.codename + '.RemoveAccessRule(' + d("rule") + ')') else blk.println(this.codename, '.RemoveAccessRule(', d("rule"), ');') end end func doRemoveAccessRuleAll(data) blk.println(this.codename, '.RemoveAccessRuleAll(', d("rule"), ');') end func doRemoveAccessRuleSpecific(data) blk.println(this.codename, '.RemoveAccessRuleSpecific(', d("rule"), ');') end func doRemoveAuditRule(data) if(linked("onRemoveAuditRule")) event("onRemoveAuditRule", this.codename + '.RemoveAuditRule(' + d("rule") + ')') else blk.println(this.codename, '.RemoveAuditRule(', d("rule"), ');') end end func doRemoveAuditRuleAll(data) blk.println(this.codename, '.RemoveAuditRuleAll(', d("rule"), ');') end func doRemoveAuditRuleSpecific(data) blk.println(this.codename, '.RemoveAuditRuleSpecific(', d("rule"), ');') end func doResetAccessRule(data) blk.println(this.codename, '.ResetAccessRule(', d("rule"), ');') end func doSetAccessRule(data) blk.println(this.codename, '.SetAccessRule(', d("rule"), ');') end func doSetAuditRule(data) blk.println(this.codename, '.SetAuditRule(', d("rule"), ');') end include("CommonObjectSecurity") include("ObjectSecurity")