Changeset 2014

Show
Ignore:
Timestamp:
03/27/08 09:11:18 (8 months ago)
Author:
dsugar
Message:

cleanup because of problems noticed in the test cases.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/compiler/translator/SELinuxPolicy.java

    r2010 r2014  
    195195                m_bufferInterfaces.println (); 
    196196 
    197                  
    198197                m_bufferPolicy.println ("# SEFramework policy output"); 
    199198                InitPolicy(m_bufferPolicy, m_sModuleName, null); 
     
    874873                                        List paths = resource.GetSystemResources (rdef); 
    875874         
    876                                         StringBuffer path_buffer = new StringBuffer(100); 
    877875                                        // make transition for each of the paths 
    878876                                        for (Iterator itr = paths.iterator (); itr.hasNext (); ) 
     
    896894                                                } 
    897895         
    898                                                 path_buffer.append("optional_policy(`"); 
    899                                                 path_buffer.append("\tgen_require(`"); 
    900                                                 path_buffer.append("\t\ttype ").append(sTarget).append(";"); 
    901                                                 path_buffer.append("\t')"); 
    902          
    903                                                 path_buffer.append("\tfiletrans_pattern(").append(sProcessType).append(", ").append(sTarget).append(", "); 
    904                                                 path_buffer.append(sResType).append(", ").append(sObjClass).append(");"); 
     896                                                outStream.println ("optional_policy(`"); 
     897                                                outStream.println ("\tgen_require(`"); 
     898                                                outStream.println ("\t\ttype " + sTarget + ";"); 
     899                                                outStream.println ("\t')"); 
     900         
     901                                                outStream.print ("\tfiletrans_pattern(" + sProcessType + ", " + sTarget + ", "); 
     902                                                outStream.println (sResType + ", " + sObjClass + ");"); 
     903                                                outStream.println ("')"); 
    905904                                        } 
    906                                         outStream.print (path_buffer); 
    907905                                } 
    908906                                 
     
    11521150                                         
    11531151                                        String key = compType + fileType; 
    1154                                         if (!m_dirPermSet.contains(key))  
    1155                                         { 
    1156                                                 policyStream.print ("optional_policy(`\n\tgen_require(`\n\t\ttype "); 
     1152                                        if (!m_dirPermSet.contains (key))  
     1153                                        { 
     1154                                                policyStream.println ("optional_policy(`"); 
     1155                                                policyStream.println ("\tgen_require(`"); 
     1156                                                policyStream.print ("\t\ttype "); 
    11571157                                                policyStream.print (fileType); 
    11581158                                                policyStream.println (";"); 
    1159                                                 policyStream.print ("\t"); 
    1160                                                 policyStream.print ("allow "); 
     1159                                                policyStream.println ("\t')"); 
     1160                                                policyStream.print ("\tallow "); 
    11611161                                                policyStream.print (compType); 
    11621162                                                policyStream.print (" "); 
    11631163                                                policyStream.print (fileType); 
    11641164                                                policyStream.println (":dir { search };"); 
    1165                                                 policyStream.println("')"); 
     1165                                                policyStream.println ("')"); 
     1166 
    11661167                                                m_dirPermSet.add(key); 
    11671168                                        } 
     
    18701871                        ps.print (i_sLinePrefix); 
    18711872                ps.println ("## <summary>SEFramework generated interface.</summary>"); 
     1873                ps.println (); 
    18721874        } 
    18731875