Changeset 1973

Show
Ignore:
Timestamp:
03/04/08 11:49:05 (9 months ago)
Author:
dsugar
Message:

bunch of cleanup
added builder to mark access problems

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mls/framework-plugin/.options

    r1764 r1973  
    99com.tresys.cdsframework/debug/navigator=false 
    1010com.tresys.cdsframework/debug/graphiceditor=false 
     11com.tresys.cdsframework/debug/accesschecks=false 
  • branches/mls/framework-plugin/.settings/org.eclipse.jdt.ui.prefs

    r1763 r1973  
    1 #Wed Nov 21 11:46:43 EST 2007 
     1#Mon Mar 03 14:34:58 EST 2008 
    22eclipse.preferences.version=1 
    33formatter_profile=_Project Format 
  • branches/mls/framework-plugin/plugin.properties

    r1878 r1973  
    4343## builder 
    4444frameworkBuilder = CDS Framework Builder 
     45AccessCheckBuilder = Access Check Builder 
    4546 
    4647## plugin Preferences 
  • branches/mls/framework-plugin/plugin.xml

    r1878 r1973  
    5454      </editor>     
    5555   </extension> 
     56   <extension 
     57         id="AccessCheckBuilder" 
     58         name="%AccessCheckBuilder" 
     59         point="org.eclipse.core.resources.builders"> 
     60      <builder 
     61            callOnEmptyDelta="false" 
     62            hasNature="false" 
     63            isConfigurable="false"> 
     64         <run 
     65               class="com.tresys.framework.plugin.builder.AccessCheckBuilder"> 
     66         </run> 
     67      </builder> 
     68   </extension> 
    5669    
    5770   <extension 
     
    5972         name="%frameworkBuilder" 
    6073         point="org.eclipse.core.resources.builders">          
    61       <builder hasNature="true"> 
     74      <builder 
     75            hasNature="true" 
     76            isConfigurable="false"> 
    6277         <run class="com.tresys.framework.plugin.builder.FrameworkBuilder"/> 
    6378      </builder> 
     
    7489      <requires-nature id="com.tresys.slide.SystemProjectNature"/> 
    7590      <requires-nature id="com.tresys.slide.SLIDEProject"/> 
     91      <builder 
     92            id="com.tresys.framework.AccessCheckBuilder"> 
     93      </builder> 
    7694   </extension> 
    7795    
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/ErrorHandler.java

    r1878 r1973  
    3737        static final public int ERROR_ENTRYPOINT_MISSING_FILE = 28; 
    3838        static final public int ERROR_DUPLICATE_ACCESS = 29; 
    39          
     39        static final public int ERROR_TE_ACCESS_DENIED = 30; 
     40        static final public int ERROR_CONSTRAINT_ACCESS_DENIED = 31; 
     41        static final public int ERROR_RBAC_ACCESS_DENIED = 32; 
    4042         
    4143        protected int warningCount = 0; 
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/PolicyGenerator.java

    r1953 r1973  
    2222import com.tresys.framework.compiler.linkage.flnkage.Ability; 
    2323import com.tresys.framework.compiler.linkage.flnkage.BaseAccessDefn; 
     24import com.tresys.framework.compiler.mls.MLSLevel; 
    2425import com.tresys.framework.compiler.policy.AccessBaseResource; 
    2526import com.tresys.framework.compiler.policy.AccessResource; 
     
    7273                } 
    7374                 
    74                 String mlsLevel = i_resource.getMLSLabel (); 
    75                 appendMLSLevel (buf, mlsLevel); 
     75                appendMLSLevel (buf, i_resource.getMLSLevel ()); 
    7676                 
    7777                buf.append(";"); 
     
    118118                } 
    119119                 
    120                 String mlsLevel = i_domain.getMLSLabel (); 
    121                 appendMLSLevel (buf, mlsLevel); 
     120                appendMLSLevel (buf, i_domain.getMLSLevel ()); 
    122121                 
    123122                buf.append(";"); 
     
    134133                buf.append(i_ep.getName()); 
    135134                 
    136                 String mlsLevel = i_ep.getMLSLabel (); 
    137                 appendMLSLevel (buf, mlsLevel); 
     135                appendMLSLevel (buf, i_ep.getMLSLevel ()); 
    138136                 
    139137                buf.append(";"); 
     
    408406        } 
    409407         
    410         protected void appendMLSLevel(StringBuffer buf, String mlsLevel) 
    411         { 
    412                 if ((null != mlsLevel) && (!mlsLevel.equals (""))) 
    413                 { 
    414                         buf.append ("\""); 
    415                         buf.append (mlsLevel); 
    416                         buf.append ("\""); 
    417                 } 
    418                  
    419                 return; 
     408        private void appendMLSLevel (StringBuffer i_buf, MLSLevel mlsLevel) 
     409        { 
     410                if (mlsLevel == null) 
     411                        return; 
     412                 
     413                i_buf.append (" \""); 
     414                i_buf.append (mlsLevel.getName ()); 
     415                i_buf.append ('"'); 
    420416        } 
    421417} 
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/linkage/Linkage.java

    r1901 r1973  
    7676        } 
    7777 
     78        public MLSSupport getMLSSupport () 
     79        { 
     80                return m_MLSSupport; 
     81        } 
     82         
    7883        /** 
    7984         * This method should return a string that may perform some basic 
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/mls/MLSSupport.java

    r1961 r1973  
    760760                return; 
    761761        } 
     762 
     763        /** 
     764         * get all of the MLS level names 
     765         * @return - String array of names 
     766         */ 
     767        public String [] getLevelNames () 
     768        { 
     769                String [] values = new String[this.size ()]; 
     770                for (Iterator _iter = this.iterator (); _iter.hasNext (); ) 
     771                { 
     772                        MLSLevel mls = (MLSLevel)_iter.next (); 
     773                        values[mls.getOrder ()] = mls.getName (); 
     774                } 
     775 
     776                return values; 
     777        } 
    762778} 
    763779 
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/Component.java

    r1964 r1973  
    2525import com.tresys.framework.compiler.AbstractToken; 
    2626import com.tresys.framework.compiler.linkage.Linkage; 
    27 import com.tresys.framework.compiler.mls.MLSSupport; 
    2827 
    2928/** 
     
    215214         * @return 
    216215         */ 
    217         public String getSensitivity (MLSSupport i_support
    218         { 
    219                 return "s0"
     216        public String getSensitivity (
     217        { 
     218                return new String ()
    220219        } 
    221220 
     
    224223         * @return 
    225224         */ 
    226         public String getFullContext (MLSSupport i_support
     225        public String getFullContext (
    227226        { 
    228227                StringBuffer buf = new StringBuffer (); 
     
    233232                buf.append (getType ()); 
    234233                 
    235                 if (i_support != null) 
     234                String sSensitivtity = getSensitivity (); 
     235                if (sSensitivtity.length () > 0) 
    236236                { 
    237237                        buf.append (':'); 
    238                         buf.append (getSensitivity (i_support)); 
     238                        buf.append (sSensitivtity); 
    239239                } 
    240240                 
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/ComponentWithDictObjects.java

    r1964 r1973  
    5454        protected final Map/*<IDictionaryObject, List<SystemResource>>*/sysResources; // associated system resources 
    5555 
    56         protected String m_sMLSString
     56        protected MLSLevel m_MLSLevel = null
    5757         
    5858        /** 
     
    6969                assocRdefsLocations = new HashMap/*<Rdef, Token>*/(); 
    7070                sysResources = new TreeMap/*<IDictionaryObject, List<SystemResource>>*/(); 
     71                 
     72                MLSSupport mlsSupport = pol.getLinkage ().getMLSSupport (); 
     73                if (mlsSupport !=  null) 
     74                        m_MLSLevel = mlsSupport.getDefaultMLSLevel (); 
    7175        } 
    7276         
     
    311315        public String getMLSLabel () 
    312316        { 
    313                 return m_sMLSString; 
     317                if (m_MLSLevel == null) 
     318                        return null; 
     319                return m_MLSLevel.getName (); 
     320        } 
     321         
     322        /* (non-Javadoc) 
     323         * @see com.tresys.framework.compiler.policy.IMLSSetting#getMLSLevel() 
     324         */ 
     325        public MLSLevel getMLSLevel () 
     326        { 
     327                return m_MLSLevel; 
    314328        } 
    315329         
     
    318332         * @see com.tresys.framework.compiler.policy.IMLSSetting#setMLSLabel(java.lang.String) 
    319333         */ 
    320         public void setMLSLabel (String i_sMLSLabel) 
    321         { 
    322                 m_sMLSString = i_sMLSLabel; 
     334        public void setMLSLabel (MLSLevel i_sMLSLabel) 
     335        { 
     336                m_MLSLevel = i_sMLSLabel; 
    323337        } 
    324338 
     
    328342         * @return 
    329343         */ 
    330         public String getSensitivity (MLSSupport i_support) 
    331         { 
    332                 if (i_support != null) 
    333                 { 
    334                         MLSLevel mlsLevel = i_support.getLevel (getMLSLabel ()); 
    335                         if (mlsLevel != null) 
    336                                 return mlsLevel.getRange (); 
    337                 } 
    338  
    339                 return "s0"; 
     344        public String getSensitivity () 
     345        { 
     346                MLSLevel mlsLevel = getMLSLevel (); 
     347                if (mlsLevel != null) 
     348                        return mlsLevel.getRange (); 
     349 
     350                return new String (); 
    340351        } 
    341352 
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/EntrypointResource.java

    r1964 r1973  
    4242        private Set/*<FileResource>*/files; 
    4343         
    44         private String m_sMLSString
     44        private MLSLevel m_MLSLevel
    4545 
    4646        /** 
     
    5656                files = new HashSet/*<FileResource>*/(); 
    5757                EPDictDef = epD; 
     58 
     59                MLSSupport mlsSupport = pol.getLinkage ().getMLSSupport (); 
     60                if (mlsSupport !=  null) 
     61                        m_MLSLevel = mlsSupport.getDefaultMLSLevel (); 
    5862        } 
    5963         
     
    6670                files.clear(); 
    6771                EPDictDef = null; 
    68                 m_sMLSString = null; 
     72                m_MLSLevel = null; 
    6973        } 
    7074 
     
    129133        public String getMLSLabel () 
    130134        { 
    131                 return m_sMLSString
     135                return m_MLSLevel.getName ()
    132136        } 
    133137         
     
    136140         * @see com.tresys.framework.compiler.policy.IMLSSetting#setMLSLabel(java.lang.String) 
    137141         */ 
    138         public void setMLSLabel (String i_sMLSLabel) 
     142        public void setMLSLabel (MLSLevel i_MLSLabel) 
    139143        { 
    140                 m_sMLSString = i_sMLSLabel; 
     144                m_MLSLevel = i_MLSLabel; 
     145        } 
     146         
     147        public MLSLevel getMLSLevel () 
     148        { 
     149                return m_MLSLevel; 
    141150        } 
    142151         
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/IDomain.java

    r1964 r1973  
    1919import com.tresys.framework.compiler.AbstractToken; 
    2020import com.tresys.framework.compiler.linkage.Linkage; 
    21 import com.tresys.framework.compiler.mls.MLSSupport; 
    2221 
    2322public interface IDomain  
     
    6564        public String getType(); 
    6665         
    67         public String getFullContext (MLSSupport i_support); 
     66        public String getFullContext (); 
    6867 
    6968        public Domain getParent(); 
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/IMLSSetting.java

    • Property svn:kewords deleted
    • Property svn:keywords set to Date Revision Id Author
    r1901 r1973  
    99 
    1010package com.tresys.framework.compiler.policy; 
     11 
     12import com.tresys.framework.compiler.mls.MLSLevel; 
    1113 
    1214/** 
     
    2325        public String getMLSLabel (); 
    2426         
     27        public MLSLevel getMLSLevel (); 
     28         
    2529        /** 
    2630         * set the MLS label used for this object 
    2731         * @param i_sLabel 
    2832         */ 
    29         public void setMLSLabel (String i_sLabel); 
     33        public void setMLSLabel (MLSLevel i_MLSLabel); 
    3034} 
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/PolicyParser.jj

    r1901 r1973  
    4343import com.tresys.framework.compiler.dictionary.EntryAccessDefn; 
    4444import com.tresys.framework.compiler.linkage.flnkage.Ability; 
     45import com.tresys.framework.compiler.mls.MLSLevel; 
     46import com.tresys.framework.compiler.mls.MLSSupport; 
    4547 
    4648import com.tresys.framework.compiler.Utility; 
     
    274276                        sLabel = sLabel.substring (1, sLabel.length()-1); 
    275277                } 
    276                  
    277                 i_obj.setMLSLabel (sLabel); 
     278 
     279                MLSSupport mlsSupport = policy.getLinkage ().getMLSSupport (); 
     280                if (mlsSupport != null) 
     281                {                
     282                        MLSLevel mlsLevel = mlsSupport.getLevel (sLabel); 
     283                        i_obj.setMLSLabel (mlsLevel); 
     284                } 
    278285        } 
    279286 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/FrameworkNature.java

    r1964 r1973  
    1717import java.io.InputStreamReader; 
    1818import java.net.URL; 
     19import java.util.ArrayList; 
    1920import java.util.Collection; 
    2021import java.util.Enumeration; 
     
    5455import com.tresys.framework.compiler.mls.MLSLevel; 
    5556import com.tresys.framework.compiler.mls.MLSSupport; 
    56 import com.tresys.framework.compiler.policy.Policy; 
    5757import com.tresys.framework.plugin.SEFramework_Plugin; 
    5858import com.tresys.framework.plugin.builder.FrameworkBuilder; 
     59import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor; 
     60import com.tresys.framework.plugin.editor.policy.graphic.model.DefaultMLSLevelUpdateVisitor; 
    5961import com.tresys.framework.plugin.preferences.MLSSettingsProjProperties; 
    6062import com.tresys.framework.plugin.preferences.PreferenceInitializer; 
     
    134136                if (event.getKey ().equals (SEFPreferencePage.MLS_UPDATE))  
    135137                { 
    136                         Iterator _iter = getSystems ().iterator (); 
    137                          
    138                         while (_iter.hasNext ()) 
     138                        IShapeVisitor isv = new DefaultMLSLevelUpdateVisitor(event); 
     139                        for (Iterator _iter = getSystems ().iterator (); _iter.hasNext (); ) 
    139140                        { 
    140141                                SELinuxSystem sels = (SELinuxSystem)_iter.next (); 
    141                                  
    142                                 sels.mlsDefinitionChanged (event); 
     142                                sels.getDiagram ().Accept (isv); 
    143143                        } 
    144144                } 
     
    146146                if (event.getKey ().equals (SEFPreferencePage.DEFAULT_MLS_LEVEL)) 
    147147                { 
    148                         Iterator _iter = getSystems ().iterator (); 
    149                          
    150                         while (_iter.hasNext ()) 
     148                        IShapeVisitor isv = new DefaultMLSLevelUpdateVisitor(event); 
     149                        for (Iterator _iter = getSystems ().iterator (); _iter.hasNext (); ) 
    151150                        { 
    152151                                SELinuxSystem sels = (SELinuxSystem)_iter.next (); 
    153                                  
    154                                 sels.mlsDefaultChanged (event); 
     152                                sels.getDiagram ().Accept (isv); 
    155153                        } 
    156154                } 
     
    158156                if (event.getKey ().equals (SEFPreferencePage.DEFAULT_MLS_LEVEL_REMOVED)) 
    159157                { 
    160                         Iterator _iter = getSystems ().iterator (); 
    161                          
    162                         while (_iter.hasNext ()) 
     158                        IShapeVisitor isv = new DefaultMLSLevelUpdateVisitor(event); 
     159                        for (Iterator _iter = getSystems ().iterator (); _iter.hasNext (); ) 
    163160                        { 
    164161                                SELinuxSystem sels = (SELinuxSystem)_iter.next (); 
    165                                  
    166                                 sels.mlsDefaultChanged (event); 
     162                                sels.getDiagram ().Accept (isv); 
    167163                        } 
    168164                } 
     
    213209                } 
    214210 
    215                 ICommand[] newCommands = new ICommand[commands.length + 1]; 
     211                ICommand[] newCommands = new ICommand[commands.length + 2]; 
    216212 
    217213                System.arraycopy(commands, 0, newCommands, 1, commands.length); 
    218                 ICommand command = desc.newCommand(); 
    219                 command.setBuilderName(FrameworkBuilder.BUILDER_ID); 
    220  
    221                 newCommands[0] = command; 
     214                newCommands[0] = desc.newCommand(); 
     215                newCommands[0].setBuilderName(FrameworkBuilder.BUILDER_ID); 
     216 
     217                newCommands[newCommands.length -1] = desc.newCommand (); 
     218                newCommands[newCommands.length -1].setBuilderName(AccessCheckBuilder.BUILDER_ID); 
    222219                 
    223220                desc.setBuildSpec(newCommands); 
     
    238235                IProjectDescription description = getProject().getDescription(); 
    239236                ICommand[] commands = description.getBuildSpec(); 
    240                 ICommand[] newCommands = new ICommand[commands.length - 1]
    241  
    242                 for (int i = 0, j = 0; i < commands.length; ++i)  
     237                ArrayList newCommands = new ArrayList (commands.length)
     238 
     239                for (int i = 0; i < commands.length; ++i)  
    243240                { 
    244241                        if (commands[i].getBuilderName().equals(FrameworkBuilder.BUILDER_ID))  
    245242                                continue; 
    246                          
    247                         newCommands[j++] = commands[i]; 
    248                 } 
    249  
    250                 description.setBuildSpec(newCommands); 
     243                        if (commands[i].getBuilderName().equals(AccessCheckBuilder.BUILDER_ID))  
     244                                continue; 
     245                         
     246                        newCommands.add (commands[i]); 
     247                } 
     248 
     249                newCommands.toArray (commands); 
     250                description.setBuildSpec(commands); 
    251251        } 
    252252 
     
    285285                 
    286286                // Load MLS Support when Project is set  
    287                 try 
    288                 { 
    289                         this.getMLSSupport (); 
    290                          
     287                MLSSupport mlsSupport = this.getMLSSupport (true); 
     288                if (mlsSupport !=  null) 
     289                { 
    291290                        // Redefine the Default MLS Level to match the definition for  
    292291                        // the new Project being assigned. 
    293                         MLSLevel mls = this._mlsConfiguration.getLevel (m_projPrefs.get (SEFPreferencePage.DEFAULT_MLS_LEVEL, MLSSettingsProjProperties.DEFAULT_MLS)); 
    294                         this._mlsConfiguration.setDefaultMLSLevel (mls); 
    295                 } 
    296                 catch (MLSInitializationException mie) 
    297                 { 
    298                         // Ignore the exception... 
    299                 } 
    300                  
     292                        MLSLevel mls = mlsSupport.getLevel (m_projPrefs.get (SEFPreferencePage.DEFAULT_MLS_LEVEL, MLSSettingsProjProperties.DEFAULT_MLS)); 
     293                        mlsSupport.setDefaultMLSLevel (mls); 
     294                } 
    301295                return; 
    302296        } 
     
    497491                                                try 
    498492                                                { 
    499                                                         SELinuxSystem system = new SELinuxSystem ((IFolder) resources[i]); 
     493                                                        SELinuxSystem system = new SELinuxSystem ((IFolder) resources[i], getMLSSupport (true)); 
    500494                                                        m_systems.add (system); 
    501495                                                } 
     
    619613         *                                                                                configuration file  
    620614         */ 
    621         public MLSSupport getMLSSupport() throws MLSInitializationException 
     615        public MLSSupport getMLSSupport (boolean bInitIfNotFound) 
    622616        { 
    623617                if (null == _mlsConfiguration) 
     
    628622                        { 
    629623                                IFile mlsConfigurationFile = this.getSupportFolder ().getFile (MLS_CONFIGURATION_FILE); 
    630                                 _mlsConfiguration = new MLSSupport(mlsConfigurationFile.getLocation ().toFile ()); 
     624                                try 
     625                                { 
     626                                        _mlsConfiguration = new MLSSupport(mlsConfigurationFile.getLocation ().toFile ()); 
     627                                } 
     628                                catch (MLSInitializationException mie) 
     629                                { 
     630                                        // Establish a minimal MLS configuration  
     631                                        // if it can't be loaded from the file system. 
     632                                        if (bInitIfNotFound) 
     633                                        { 
     634                                                IPath ipFull = mlsConfigurationFile.getLocation (); 
     635                                                File file = ipFull.toFile ();   
     636                                                _mlsConfiguration = new MLSSupport(file.getAbsolutePath ()); 
     637                                        } 
     638                                } 
    631639                        } 
    632640                } 
     
    798806                                                        if (existingSystem == null) 
    799807                                                        { 
    800                                                                 SELinuxSystem sys = new SELinuxSystem ((IFolder) res); 
     808                                                                SELinuxSystem sys = new SELinuxSystem ((IFolder) res, getMLSSupport (true)); 
    801809                                                                nat.addSystem(sys); 
    802810                                                        } 
     
    816824                                        return false; 
    817825                                 
    818                                 String sName = res.getName ().substring (0, res.getName ().length () - sExtension.length () -1); 
    819                                 if (sName.equals ("policy") && Integer.valueOf (sExtension) != null) 
    820                                 { 
    821                                         checkAccesses ((IFile) res); 
    822                                          
    823                                 } 
    824                                  
     826//                              String sName = res.getName ().substring (0, res.getName ().length () - sExtension.length () -1); 
     827//                              if (sName.equals ("policy") && Integer.valueOf (sExtension) != null) 
     828//                              { 
     829//                                      checkAccesses ((IFile) res); 
     830//                              } 
    825831                        } 
    826832                         
    827833                        return false; 
    828834                } 
    829  
    830                 //TODO - this functions but is very unstable at this point - I just want to get it committed in a rough working state 
    831                 private void checkAccesses (IFile i_policy) 
    832                 { 
    833                         boolean bRunCheckAccess = true; 
    834                         if (!bRunCheckAccess) 
    835                                 return; 
    836                          
    837                         try 
    838                         { 
    839                                 AccessCheckVisitor visitor = null; 
    840                                 try 
    841                                 { 
    842                                         visitor = new AccessCheckVisitor (i_policy, getMLSSupport ()); 
    843                                          
    844                                 } 
    845                                 catch (MLSInitializationException mie) 
    846                                 { 
    847                                         visitor = new AccessCheckVisitor (i_policy, null); 
    848                                 } 
    849  
    850                                 if (visitor != null) 
    851                                 { 
    852                                         SELinuxSystem sys = getSystem (i_policy); 
    853                                         Policy policy = sys.getPolicy (); 
    854                                          
    855                                         policy.Accept (visitor); 
    856                                 } 
    857                         } 
    858                         catch (IOException e) 
    859                         { 
    860                                 e.printStackTrace(); 
    861                         } 
    862          
    863                 } 
    864                  
    865835        } 
    866836} 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/GUIErrorHandler.java

    r1825 r1973  
    160160                } 
    161161                catch (CoreException e)  
    162                 {} 
     162                { 
     163                        e.printStackTrace (); 
     164                } 
    163165        } 
    164166         
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/SELinuxSystem.java

    r1961 r1973  
    3030import org.eclipse.core.runtime.Path; 
    3131import org.eclipse.core.runtime.PlatformObject; 
    32 import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; 
    3332import org.eclipse.jface.resource.ImageDescriptor; 
    3433import org.eclipse.swt.widgets.Display; 
     
    3938import com.tresys.framework.compiler.linkage.Linkage; 
    4039import com.tresys.framework.compiler.linkage.libselinuxjava_plugin; 
     40import com.tresys.framework.compiler.mls.MLSSupport; 
    4141import com.tresys.framework.compiler.policy.Policy; 
    4242import com.tresys.framework.compiler.systemResources.SystemResources; 
     
    4444import com.tresys.framework.plugin.SEFramework_Plugin; 
    4545import com.tresys.framework.plugin.editor.policy.graphic.GraphicPolicyRefresh; 
    46 import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor; 
    47 import com.tresys.framework.plugin.editor.policy.graphic.model.DefaultMLSLevelUpdateVisitor; 
    4846import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    4947import com.tresys.framework.plugin.preferences.SEFPreferencePage; 
     
    8987        protected final File buildPath; 
    9088 
     89        private final MLSSupport m_mlsSupport; 
    9190        protected ErrorHandler m_fsysErrorHandler; 
    9291        protected ErrorHandler m_fpolErrorHandler; 
     
    9493        protected static final boolean DEBUG = SEFramework_Plugin.getDefault ().isDebugging ("/debug/building"); 
    9594         
    96         public SELinuxSystem(IFolder folder)  
     95        public SELinuxSystem(IFolder folder, MLSSupport i_mlsSupport)  
    9796                throws IllegalArgumentException  
    9897        { 
     
    108107                        throw new IllegalArgumentException("System folder must be of the format: selinux-policy-(system name)"); 
    109108 
     109                m_mlsSupport = i_mlsSupport; 
    110110                AnalysisContainer.getContainer ().addListener (m_folder, this); 
    111111        } 
     
    423423                        String flaskPath = flaskFolder.getLocation().toString(); 
    424424 
    425                         m_linkage = new Linkage (flaskPath, null); 
     425                        m_linkage = new Linkage (flaskPath, m_mlsSupport); 
    426426                        m_linkage.LNFILESPATH = getProject ().getLocation ().toOSString (); 
    427427 
     
    694694                } 
    695695        } 
    696          
    697         public void mlsDefinitionChanged(PreferenceChangeEvent event) 
    698         { 
    699                 IShapeVisitor isv = new DefaultMLSLevelUpdateVisitor(event); 
    700                 this.m_diagram.Accept (isv); 
    701   &n