Changeset 2004
- Timestamp:
- 03/19/08 14:15:29 (8 months ago)
- Files:
-
- branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/custom/CPolicyRefresher.java (added)
- branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/policy/Access.java (modified) (9 diffs)
- branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/policy/AccessResource.java (modified) (5 diffs)
- branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/policy/Conditional.java (modified) (2 diffs)
- branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/translator/SELinuxPolicy.java (modified) (37 diffs)
- branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/builder/SELinuxSystem.java (modified) (11 diffs)
- branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/CDSEditorActionConstants.java (modified) (2 diffs)
- branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/action/AddCustomPolicy.java (modified) (2 diffs)
- branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/GraphicPolicyEditorContextMenuProvider.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/policy/Access.java
r1991 r2004 19 19 import com.tresys.framework.compiler.dictionary.Verb; 20 20 21 public abstract class Access 21 public abstract class Access 22 22 implements IPolicyVisitable, ICustomPolicy 23 23 { … … 33 33 34 34 /** the verb associated defining the type of access */ 35 protected Integer /* Verb*/m_verb;35 protected Integer /* Verb */m_verb; 36 36 37 37 protected final AbstractToken Token; 38 39 private boolean mIsModified; 40 41 public Access(IDomain dom, IResource res, Integer /*Verb*/verb, 42 AbstractToken token, AbstractToken bool, Boolean activeOnBool) { 38 39 public Access (IDomain dom, IResource res, Integer /* Verb */verb, AbstractToken token, AbstractToken bool, Boolean activeOnBool) 40 { 43 41 Domain = dom; 44 42 resource = res; … … 47 45 m_bool = bool; 48 46 m_onOrOff = activeOnBool; 49 mIsModified = false;50 } 51 52 public boolean equals(Object arg0){53 if (!(arg0 instanceof Access))47 } 48 49 public boolean equals (Object arg0) 50 { 51 if (! (arg0 instanceof Access)) 54 52 return false; 55 53 56 54 Access access = (Access) arg0; 57 if (!access.m_verb.equals(this.m_verb))55 if (!access.m_verb.equals (this.m_verb)) 58 56 return false; 59 57 60 if (!access.Domain.equals(this.Domain))58 if (!access.Domain.equals (this.Domain)) 61 59 return false; 62 60 … … 64 62 } 65 63 66 public AbstractToken GetNameToken() { 64 public AbstractToken GetNameToken () 65 { 67 66 return Token; 68 67 } 69 68 70 public void setVerb(Integer i_nVerb) { 69 public void setVerb (Integer i_nVerb) 70 { 71 71 m_verb = i_nVerb; 72 72 } 73 73 74 74 /** 75 * setResource - update the resource for this access. 76 * Will modify the listof accesses for the resource.75 * setResource - update the resource for this access. Will modify the list 76 * of accesses for the resource. 77 77 */ 78 78 public void setResource (IResource i_Component) 79 79 { 80 Policy pol = resource.getPolicy ();81 if (pol != null) 82 pol.Remove (this);83 else 84 resource.Remove (this);80 Policy pol = resource.getPolicy (); 81 if (pol != null) 82 pol.Remove (this); 83 else 84 resource.Remove (this); 85 85 resource = i_Component; 86 pol = resource.getPolicy(); 87 if (pol != null) 88 pol.AddAccess(this); 89 else 90 resource.Add(this); 91 } 92 93 /** 94 * setDomain - update the domain for this access. 95 * Will modify the list of accesses for the domain. 86 pol = resource.getPolicy (); 87 if (pol != null) 88 pol.AddAccess (this); 89 else 90 resource.Add (this); 91 } 92 93 /** 94 * setDomain - update the domain for this access. Will modify the list of 95 * accesses for the domain. 96 * 96 97 * @param i_domain 97 98 */ … … 100 101 Policy pol = Domain.getPolicy (); 101 102 if (pol != null) 102 pol.Remove (this);103 else 104 Domain.Remove (this);103 pol.Remove (this); 104 else 105 Domain.Remove (this); 105 106 Domain = i_domain; 106 pol = Domain.getPolicy ();107 if (pol != null) 108 pol.AddAccess (this);109 else 110 Domain.Add (this);111 } 112 113 public abstract void Accept (IPolicyVisitor i_visitor);107 pol = Domain.getPolicy (); 108 if (pol != null) 109 pol.AddAccess (this); 110 else 111 Domain.Add (this); 112 } 113 114 public abstract void Accept (IPolicyVisitor i_visitor); 114 115 115 116 /** … … 117 118 */ 118 119 public abstract void ResetToDefaults (); 119 120 120 121 /** 121 122 * clear all access definitions from the access 122 123 */ 123 124 public abstract void ClearAccess (); 124 125 125 126 /** 126 127 * Get collection of all accesses assigned to the access 128 * 127 129 * @return collection based on the type of access 128 130 */ … … 131 133 /** 132 134 * Set the access definitions to hose passed in. 133 * @param i_accessDefns - collection of access definitions to set to the access, all others will be cleared 135 * 136 * @param i_accessDefns - 137 * collection of access definitions to set to the access, all 138 * others will be cleared 134 139 * @throws VerbMismatchException 135 140 * @throws UnrevokableException … … 137 142 public abstract void SetAccessDefns (Collection i_accessDefns) 138 143 throws VerbMismatchException, UnrevokableException; 139 144 140 145 /** 141 146 * is the access definition at the default state 147 * 142 148 * @return true/false 143 149 */ 144 150 public abstract boolean isDefault (); 145 151 146 public AbstractToken getBool ()152 public AbstractToken getBool () 147 153 { 148 154 return m_bool; 149 155 } 150 156 151 public void setBool (AbstractToken i_bool)157 public void setBool (AbstractToken i_bool) 152 158 { 153 159 m_bool = i_bool; … … 156 162 } 157 163 158 public Boolean getOnOrOff ()164 public Boolean getOnOrOff () 159 165 { 160 166 return m_onOrOff; 161 167 } 162 168 163 public void setOnOrOff (Boolean orOff)169 public void setOnOrOff (Boolean orOff) 164 170 { 165 171 m_onOrOff = orOff; 166 172 } 167 173 168 public IDomain getDomain ()174 public IDomain getDomain () 169 175 { 170 176 return Domain; 171 177 } 172 178 173 public IResource getResource ()179 public IResource getResource () 174 180 { 175 181 return resource; 176 182 } 177 183 178 public String getVerb ()179 { 180 return Verb.toString (m_verb);181 } 182 183 public Integer verb ()184 public String getVerb () 185 { 186 return Verb.toString (m_verb); 187 } 188 189 public Integer verb () 184 190 { 185 191 return m_verb; 186 192 } 187 193 188 public boolean supportsCustomPolicy() 189 { 190 return true; 191 } 192 193 public boolean hasCustomization() 194 { 195 return mIsModified; 196 } 197 194 public boolean hasCustomization () 195 { 196 return false; 197 } 198 198 public void markCustomized () 199 199 { 200 mIsModified = true; 201 } 202 200 } 203 201 public void removeCustomization () 204 202 { 205 mIsModified = false; 203 } 204 public boolean supportsCustomPolicy () 205 { 206 return false; 206 207 } 207 208 branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/policy/AccessResource.java
r1995 r2004 15 15 import com.tresys.framework.compiler.AbstractToken; 16 16 import com.tresys.framework.compiler.Utility; 17 import com.tresys.framework.compiler.custom.ICustomPolicy; 17 18 import com.tresys.framework.compiler.dictionary.AccessDefn; 18 19 import com.tresys.framework.compiler.dictionary.AccessDefnGroup; … … 45 46 */ 46 47 public final class AccessResource 47 extends Access 48 extends Access 48 49 { 49 50 … … 52 53 */ 53 54 final private Map/*<rdef, Map<accessDefn>>*/accessDefs = new HashMap (); 55 56 private boolean mIsCustomized; 54 57 55 58 /** … … 69 72 ResetToDefaults(); 70 73 checkForUnrevokables(); 74 mIsCustomized = false; 71 75 } 72 76 … … 339 343 340 344 } 345 346 public boolean hasCustomization () 347 { 348 return mIsCustomized; 349 } 350 public void markCustomized () 351 { 352 mIsCustomized = true; 353 } 354 public void removeCustomization () 355 { 356 mIsCustomized = false; 357 } 358 public boolean supportsCustomPolicy () 359 { 360 return true; 361 } 341 362 } branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/policy/Conditional.java
r1991 r2004 14 14 public class Conditional 15 15 extends Component 16 implements IResource , ICustomPolicy16 implements IResource 17 17 { 18 18 protected boolean defaultState; … … 56 56 i_visitor.Visit(this); 57 57 } 58 59 public boolean supportsCustomPolicy()60 {61 return true;62 }63 64 public boolean hasCustomization()65 {66 return mIsModified;67 }68 69 public void markCustomized ()70 {71 mIsModified = true;72 }73 74 public void removeCustomization ()75 {76 mIsModified = false;77 }78 79 58 } branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/translator/SELinuxPolicy.java
r1995 r2004 4 4 # Authors: Garth Boyst <gboyst@tresys.com> 5 5 # Dave Sugar <dsugar@tresys.com> 6 # Anand Patel <apatel@tresys.com> 6 7 # 7 8 # TranslatorSeLinux.java … … 92 93 implements IPolicyVisitor 93 94 { 95 public final static String NEWLINE = System.getProperty("line.separator"); 96 97 98 private final static String XML_START = "##############################################"+ NEWLINE; 99 private final static String XML_SUMMARY_OPEN = "## <summary>"+ NEWLINE; 100 private final static String XML_SUMMARY_CLOSE = "## </summary>"+ NEWLINE; 101 private final static String XML_PARAM_OPEN = "## <param name ="; 102 private final static String XML_PARAM_CLOSE = "## </param>"+ NEWLINE; 103 104 105 94 106 private final Linkage m_linkage; 95 107 private final boolean m_bGeneratePolicyTemplate; … … 99 111 100 112 private final String m_moduleName; 113 private final String mCPolicyMacroPrefix; 101 114 102 115 final private ByteArrayOutputStream m_dataPolicy = new ByteArrayOutputStream (); … … 118 131 m_hasFileContext = false; 119 132 m_bGeneratePolicyTemplate = false; 133 mCPolicyMacroPrefix = null; 120 134 121 135 if(fcFile != null && fcFile.exists()) … … 127 141 } 128 142 129 public SELinuxPolicy (Linkage i_linkage, boolean i_bGenerateTemplates )143 public SELinuxPolicy (Linkage i_linkage, boolean i_bGenerateTemplates, String prefix) 130 144 { 131 145 m_linkage = i_linkage; 132 146 m_bGeneratePolicyTemplate = i_bGenerateTemplates; 133 147 m_moduleName = "template"; 134 } 148 mCPolicyMacroPrefix = prefix; 149 } 150 135 151 136 152 protected void finalize () … … 211 227 String sType = i_resource.GetTypeWithDictionaryObject(rdef.GetName()); 212 228 213 String sCustomName = "customize_" + i_resource.getName () + "_" + rdef.GetOutputName(); 229 // String sCustomName = "customize_" + i_resource.getName () + "_" + rdef.GetOutputName(); 230 String sCustomName = mCPolicyMacroPrefix + "_" + i_resource.getName () + "_" + rdef.GetOutputName(); 214 231 215 232 if (m_bGeneratePolicyTemplate) 216 233 { 217 234 outStream = m_bufferInterfaces; 235 StringBuffer buffer = new StringBuffer(200); 218 236 outStream.println(); 219 outStream.println("########################"); 220 outStream.println("##<summary>"); 221 outStream.println("## Customization for resource " + i_resource.getName ()); 222 outStream.println("##</summary>"); 223 outStream.println("##<param name='resource'>"); 224 outStream.println("## Type of resource being customized"); 225 outStream.println("##</param>"); 226 outStream.println("template(`" + sCustomName + "',`"); 237 buffer.append(XML_START); 238 buffer.append(XML_SUMMARY_OPEN); 239 buffer.append("## Customization for resource ").append(i_resource.getName ()).append (NEWLINE); 240 buffer.append(XML_SUMMARY_CLOSE); 241 buffer.append(XML_PARAM_OPEN); 242 buffer.append("'resource'>").append (NEWLINE); 243 buffer.append("## Type of resource being customized").append (NEWLINE); 244 buffer.append(XML_PARAM_CLOSE); 245 buffer.append("template(`").append(sCustomName).append("',`"); 246 buffer.append (NEWLINE); 247 outStream.print (buffer); 227 248 } 228 249 … … 272 293 { 273 294 outStream = m_bufferInterfaces; 274 outStream.println(); 275 outStream.println("########################"); 276 outStream.println("##<summary>"); 277 outStream.println("## Customization for domain " + i_domain.getName ()); 278 outStream.println("##</summary>"); 279 outStream.println("##<param name='domain'>"); 280 outStream.println("## Domain being customized"); 281 outStream.println("##</param>"); 282 outStream.println("template(`customize_" + i_domain.getName () + "',`"); 295 StringBuffer buffer = new StringBuffer(150); 296 buffer.append(NEWLINE); 297 298 buffer.append(XML_START); 299 buffer.append(XML_SUMMARY_OPEN); 300 buffer.append("## Customization for domain ").append(i_domain.getName ()).append(NEWLINE); 301 buffer.append(XML_SUMMARY_CLOSE); 302 buffer.append(XML_PARAM_OPEN); 303 buffer.append("'domain'>").append(NEWLINE); 304 buffer.append("## Type of resource being customized").append(NEWLINE); 305 buffer.append(XML_PARAM_CLOSE); 306 StringBuffer sCustomName = new StringBuffer("template(`"); 307 sCustomName.append(mCPolicyMacroPrefix).append("_").append(i_domain.getName ()).append("',`"); 308 sCustomName.append(NEWLINE); 309 buffer.append(sCustomName); 310 outStream.print (buffer); 283 311 } 284 312 … … 296 324 if (!m_bGeneratePolicyTemplate && i_domain.hasCustomization ()) 297 325 { 298 outStream.println ("customize_" + i_domain.getName () + "(" + sType + ")"); 326 String sCustomName = mCPolicyMacroPrefix + i_domain.getName () + "(" + sType + ")"; 327 outStream.println (sCustomName); 299 328 } 300 329 … … 302 331 { 303 332 m_linkage.MakeDomain (sType, outStream); 304 OutputAbilities (i_domain, outStream); 333 StringBuffer buffer = new StringBuffer(200); 334 OutputAbilities (i_domain, buffer); 335 outStream.print(buffer); 305 336 } 306 337 … … 376 407 if (i_domain.GetChildren().size() > 0) 377 408 { 378 makeAllowsOnSelf(i_domain, rdef.getAccessAllResource(), outStream); 409 StringBuffer buffer = new StringBuffer(100); 410 makeAllowsOnSelf(i_domain, rdef.getAccessAllResource(), buffer); 411 outStream.print(buffer); 379 412 } 380 413 } … … 483 516 if (!m_bGeneratePolicyTemplate && i_entryPoint.hasCustomization ()) 484 517 { 485 outStream.println ("customize_" + i_entryPoint.getName () + "(" + i_entryPoint.getType () + ")"); 518 String buffer = mCPolicyMacroPrefix + i_entryPoint.getName () + "(" + i_entryPoint.getType () + ")"; 519 outStream.println (buffer); 486 520 return; 487 521 } … … 490 524 { 491 525 outStream = m_bufferInterfaces; 492 outStream.println(); 493 outStream.println("########################"); 494 outStream.println("##<summary>"); 495 outStream.println("## Customization for entrypoint " + i_entryPoint.getName ()); 496 outStream.println("##</summary>"); 497 outStream.println("##<param name='entrypoint'>"); 498 outStream.println("## Entrypoint Resource being customized"); 499 outStream.println("##</param>"); 500 outStream.println("template(`customize_" + i_entryPoint.getName () + "',`"); 526 527 StringBuffer buffer = new StringBuffer(200); 528 buffer.append(XML_START); 529 buffer.append(XML_SUMMARY_OPEN); 530 buffer.append("## Customization for entrypoint ").append(i_entryPoint.getName ()).append(NEWLINE); 531 buffer.append(XML_SUMMARY_CLOSE); 532 buffer.append(XML_PARAM_OPEN); 533 buffer.append("'entrypoint'>").append(NEWLINE); 534 buffer.append("## Entrypoint Resource being customized").append(NEWLINE); 535 buffer.append(XML_PARAM_CLOSE); 536 buffer.append("template(`'"); 537 buffer.append(mCPolicyMacroPrefix).append("_").append(i_entryPoint.getName ()).append("',`"); 538 buffer.append(NEWLINE); 539 outStream.print(buffer); 501 540 } 502 541 … … 524 563 { 525 564 boolean isBoolean = false; 526 565 StringBuffer buffer = new StringBuffer(200); 527 566 if(i_access.getBool () != null) 528 567 { 529 m_bufferPolicy.println ("if(" + i_access.getBool().image +") {");568 buffer.append("if(").append(i_access.getBool().image).append(") {"); 530 569 531 570 isBoolean = true; 532 571 if (i_access.getOnOrOff ().booleanValue () == false) 533 m_bufferPolicy.println ("} else {"); 534 } 535 536 m_bufferPolicy.println("# CDSFramework access (domain baseresource verb): " + i_access.toString().replace(Utility.DELIM, ' ')); 572 buffer.append("} else {"); 573 } 574 575 buffer.append("# CDSFramework access (domain baseresource verb): "); 576 buffer.append(i_access.toString().replace(Utility.DELIM, ' ')); 537 577 538 578 IDomain domain = i_access.getDomain(); … … 541 581 542 582 // This gets all global interface calls in the verb 543 callInterfaces(domain, i_access.GetInterfaces(), m_bufferPolicy);583 callInterfaces(domain, i_access.GetInterfaces(), buffer); 544 584 545 585 // for each AccessDefn associated with this AccessResource bundle … … 549 589 BaseAccessDefn axxDefn = (BaseAccessDefn) accessDefns.next(); 550 590 551 callInterfaces(domain, axxDefn.GetAllInterfaces().values(), m_bufferPolicy);591 callInterfaces(domain, axxDefn.GetAllInterfaces().values(), buffer); 552 592 553 593 // for each AccessTarget associated with this AccessDefn … … 561 601 { 562 602 case Target.self: 563 makeAllowsOnSelf(domain, axxTarget.GetPermVectors(), m_bufferPolicy);603 makeAllowsOnSelf(domain, axxTarget.GetPermVectors(), buffer); 564 604 break; 565 605 case Target.other_read: … … 580 620 { 581 621 Component entry = (Component) iter4.next(); 582 makeAllows(domain, entry, axxTarget.GetPermVectors(), m_bufferPolicy);622 makeAllows(domain, entry, axxTarget.GetPermVectors(), buffer); 583 623 } 584 624 } … … 588 628 if(isBoolean) 589 629 { 590 m_bufferPolicy.print ("}\n"); 591 } 630 buffer.append ("}"); 631 buffer.append (NEWLINE); 632 } 633 m_bufferPolicy.print (buffer); 592 634 } 593 635 … … 635 677 Rdef rdef = (Rdef) rdefitr.next (); 636 678 637 String sCustomName = "customize_access_" + domain.getName () + "_" + resource.getName () + "_" + rdef.GetOutputName(); 679 StringBuffer sCustomName = new StringBuffer(50); 680 sCustomName.append(mCPolicyMacroPrefix).append(domain.getName ()); 681 sCustomName.append("_").append(resource.getName ()).append("_").append(rdef.GetOutputName()); 638 682 639 683 if (m_bGeneratePolicyTemplate) 640 684 { 641 685 outStream = m_bufferInterfaces; 642 outStream.println(); 643 outStream.println("########################"); 644 outStream.println("##<summary>"); 645 outStream.println("## Customization for access domain: " + domain.getName () + " resource: " + resource.getName () + " rdef: " + rdef.GetOutputName()); 646 outStream.println("##</summary>"); 647 outStream.println("##<param name='domain'>"); 648 outStream.println("## Domain accessing resource"); 649 outStream.println("##</param>"); 650 outStream.println("##<param name='resource'>"); 651 outStream.println("## Resource being accessed"); 652 outStream.println("##</param>"); 653 outStream.println("template(`" + sCustomName + "',`"); 686 StringBuffer buffer = new StringBuffer(400); 687 buffer.append(XML_START); 688 buffer.append(XML_SUMMARY_OPEN); 689 buffer.append("## Customization for access domain: ").append(domain.getName ()).append(" resource: ").append(NEWLINE); 690 buffer.append(resource.getName ()).append(" rdef: ").append(rdef.GetOutputName()).append(NEWLINE); 691 buffer.append(XML_SUMMARY_CLOSE); 692 buffer.append(XML_PARAM_OPEN); 693 buffer.append("'domain'>").append(NEWLINE); 694 buffer.append("## Domain accessing resource").append(NEWLINE); 695 buffer.append(XML_PARAM_CLOSE); 696 buffer.append(XML_PARAM_OPEN); 697 buffer.append("'resource'>").append(NEWLINE); 698 buffer.append("## Resource being accessed").append(NEWLINE); 699 buffer.append(XML_PARAM_CLOSE); 700 buffer.append("template(`").append(sCustomName).append("',`").append(NEWLINE); 701 outStream.print (buffer); 654 702 } 655 703 … … 662 710 AccessDefnGroup axxGroup = axxDefn.getAccessDefnGroup (); 663 711 664 String templateName = "framework_" 665 + axxGroup.getRdef().GetOutputName() + "_" 666 + axxGroup.getName() + "_" 667 + axxDefn.getName(); 712 StringBuffer templateName = new StringBuffer(90); 713 templateName.append("framework_"); 714 templateName.append(axxGroup.getRdef().GetOutputName ()).append("_"); 715 templateName.append(axxGroup.getName()).append("_"); 716 templateName.append(axxDefn.getName()); 668 717 669 718 if (!m_bGeneratePolicyTemplate && i_access.hasCustomization ()) 670 719 { 671 templateName = sCustomName; 672 } 673 674 outStream.print (templateName + "(" + sDomType + ","); 720 templateName = new StringBuffer(sCustomName); 721 } 722 templateName.append("(").append(sDomType).append(","); 675 723 String sResType = "$2"; 676 724 … … 686 734 } 687 735 } 688 689 outStream.println ( sResType + ")");736 templateName.append(sResType).append(")"); 737 outStream.println (templateName); 690 738 691 739 if (!(resource instanceof ControlResource)) 692 740 { 693 741 // Rdef rdef = axxDefn.getAccessDefnGroup ().getRdef (); 742 StringBuffer buffer = new StringBuffer(100); 694 743 if (rdef.GetSysResourceState (SystemResourceTypes.file) != SysResourceState.No) 695 generateParentSearchPerms (i_access.getDomain (), resource, false, outStream); 696 } 697 698 699 // Create the perms for other 700 for (Iterator iter2 = axxDefn.getAccessTargets().values().iterator(); iter2.hasNext(); ) 701 { 702 AccessTarget axxTarget = (AccessTarget) iter2.next(); 703 Integer /*Target*/target = axxTarget.getTargetName(); 704 Map accesses = null; 705 switch(target.intValue()) 706 { 707 case Target.other_read: 708 accesses = ((Resource)i_access.getResource()).GetAccessMap(Verb.read); 709 break; 710 case Target.other_write: 711 accesses = ((Resource)i_access.getResource()).GetAccessMap(Verb.write); 712 break; 713 case Target.other_readwrite: 714 accesses = ((Resource)i_access.getResource()).GetAccessMap(Verb.readwrite); 715 break; 716 } 717 718 if (accesses != null) 719 { 720 for (Iterator iter3 = accesses.keySet().iterator(); iter3.hasNext(); ) 721 { 722 Component entry = (Component) iter3.next(); 723 makeAllows(i_access.getDomain(), entry, axxTarget.GetPermVectors(), outStream); 724 } 725 } 744 generateParentSearchPerms (i_access.getDomain (), resource, false, buffer); 745 outStream.print (buffer); 746 } 747 748 749 { 750 StringBuffer buffer = new StringBuffer(100); 751 // Create the perms for other 752 for (Iterator iter2 = axxDefn.getAccessTargets().values().iterator(); iter2.hasNext(); ) 753 { 754 AccessTarget axxTarget = (AccessTarget) iter2.next(); 755 Integer /*Target*/target = axxTarget.getTargetName(); 756 Map accesses = null; 757 switch(target.intValue()) 758 { 759 case Target.other_read: 760 accesses = ((Resource)i_access.getResource()).GetAccessMap(Verb.read); 761 break; 762 case Target.other_write: 763 accesses = ((Resource)i_access.getResource()).GetAccessMap(Verb.write); 764 break; 765 case Target.other_readwrite: 766 accesses = ((Resource)i_access.getResource()).GetAccessMap(Verb.readwrite); 767 break; 768 } 769 770 if (accesses != null) 771 { 772 for (Iterator iter3 = accesses.keySet().iterator(); iter3.hasNext(); ) 773 { 774 Component entry = (Component) iter3.next(); 775 makeAllows(i_access.getDomain(), entry, axxTarget.GetPermVectors(), buffer); 776 } 777 } 778 } 779 outStream.print (buffer); 726 780 } 727 781 … … 741 795 List paths = resource.GetSystemResources (rdef); 742 796 797 StringBuffer path_buffer = new StringBuffer(100); 743 798 // make transition for each of the paths 744 799 for (Iterator itr = paths.iterator (); itr.hasNext (); ) … … 762 817 } 763 818
