<xsl:value-of select="msftscw:getString('SecurityResults/Header/Title', 'SCWAnaLocStrings.xml')"/> function getImagePath(FileName) { var strPath = "../TransformFiles/View/" + FileName; return strPath; } function changeImg(bHoverOver) { var ImgElement = null; var tdElement = null; if ( event.srcElement.tagName == "IMG" ) { tdElement = event.srcElement.parentElement; ImgElement = event.srcElement; tBodyElement = tdElement.parentElement.parentElement; tBodyToHide = tBodyElement.nextSibling; } else { tdElement = event.srcElement; ImgElement = event.srcElement.firstChild; tBodyElement = event.srcElement.parentElement.parentElement; tBodyToHide = tBodyElement.nextSibling; } if("none" == tBodyToHide.currentStyle.display) { if ( bHoverOver ) { ImgElement.src = getImagePath("RightArrowHighLight.gif"); } else { ImgElement.src = getImagePath("RightArrow.gif"); } } else { if ( bHoverOver ) { ImgElement.src = getImagePath("DownArrowHighLight.gif"); } else { ImgElement.src = getImagePath("DownArrow.gif"); } } } function changeImgForDiv(bHoverOver) { div = event.srcElement.parentElement; obj = div.nextSibling; ImgElement = div.firstChild; if("none" == obj.currentStyle.display) { if ( bHoverOver ) ImgElement.src = getImagePath("RightArrowHighLight.gif"); else ImgElement.src = getImagePath("RightArrow.gif"); } else { if ( bHoverOver ) ImgElement.src = getImagePath("DownArrowHighLight.gif"); else ImgElement.src = getImagePath("DownArrow.gif"); } } function toggleDisplayForTable() { var tBodyElement = null; var tBodyToHide = null; var ImgElement = null; var tdElement = null; if ( event.srcElement.tagName == "IMG" ) { tdElement = event.srcElement.parentElement; tBodyElement = tdElement.parentElement.parentElement; ImgElement = event.srcElement; tBodyToHide = tBodyElement.nextSibling; } else { tdElement = event.srcElement; tBodyElement = event.srcElement.parentElement.parentElement; ImgElement = event.srcElement.firstChild; tBodyToHide = tBodyElement.nextSibling; } if("none" == tBodyToHide.currentStyle.display) { tBodyToHide.style.display = "block"; ImgElement.src = getImagePath("DownArrow.gif"); } else { tBodyToHide.style.display = "none"; ImgElement.src = getImagePath("RightArrow.gif"); } } function toggleDisplay() { var div; div = event.srcElement.parentElement; var obj = div.nextSibling; bShow = ("none"==obj.currentStyle.display); if(bShow) { obj.style.display = "block"; ImgElement = div.firstChild; ImgElement.src = "../TransformFiles/view/downarrow.gif"; } else { obj.style.display = "none"; ImgElement = div.firstChild; ImgElement.src="../TransformFiles/view/rightarrow.gif"; } } function onKeyUp() { switch(event.keyCode) { case 13: case 32: toggleDisplay(); break; } } ]]>
 
 
 
 
True True
 
 
 
 
 
 
True True
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
" ; strReturn += getString("SecurityResults/Strings/NoInfo", "SCWAnaLocStrings.xml"); strReturn += ""; return strReturn; } function getExtensionErrorText() { strReturn = "
" ; strReturn += "
"; strReturn += getString("SecurityResults/Strings/ExtensionError", "SCWAnaLocStrings.xml"); strReturn += "
"; strReturn += "
"; return strReturn; } function getCell(strText, strClass, strHeader) { var strTD = ""; } function getRow() { var strReturn = ""; //------------------------------------------------------------------------- // For each argument passed in, append it to the return buffer //------------------------------------------------------------------------- for(nArgs = 0; nArgs < arguments.length; nArgs++) { strReturn += arguments[nArgs]; } //------------------------------------------------------------------------- // Return the result with a pad cell (for right whitespace) and a //------------------------------------------------------------------------- return strReturn + ""; } function GetTitleStartTag() { var strTag = "
"; strTag = strTag + ""; strTag = strTag + ""; strTag = strTag + "
"; return strTag; } function GetTitleEndTag() { strReturn = "
"; return strReturn; } function BuildFileSystemSection(SDDLnode, sectionType) { var strReturn = ""; if ( ( SDDLnode == null ) || ( SDDLnode.length <= 0 ) ) { strReturn = "
root null
"; return strReturn; } if( !CreateSDDLProcess() ) { strReturn = "
create SDDLproc.viewprocess fails
"; return strReturn; } var tempNode = SDDLnode.nextNode(); var strXPath = "./Item[@Key='Object']"; switch(sectionType) { case "FileObject": strXPath = "./Item[@Key='FileObject' and ./Property/@Key='BaselineValue' and ./Property/@Key='SystemValue']"; break; case "RegistryKey": strXPath = "./Item[@Key='RegistryObject' and ./Property/@Key='BaselineValue' and ./Property/@Key='SystemValue']"; break; case "ServiceObject": strXPath = "./Item[@Key='ServiceObject']"; break; default: strReturn = "
Section Type Error
"; return strReturn; } var nodelist = tempNode.selectNodes(strXPath); if ( ( null == nodelist ) || ( nodelist.length <= 0 ) ) { strReturn = getNoInfo(); return strReturn; } //for each file system object var strFilesystem = ""; var strTable = ""; // Find any child items for this node childXPath = "./Item[./Property[@Key='ParentBaseLineValue' and Field='"; childXPath += strFilesystem; childXPath += "']]"; childNodeList = tempNode.selectNodes(childXPath); if ( ( childNodeList != null ) && ( childNodeList.length > 0 ) ) { strChildrenTitle = getString("SecurityResults/Sections/SCETemplate/Children", "SCWAnaLocStrings.xml"); strReturn += getSDDLObjectTitle(strChildrenTitle,0); strReturn += strTable; for ( iChildIndex = 0 ; iChildIndex < childNodeList.length ; iChildIndex++) { childNode = childNodeList.item(iChildIndex); strSDDLChildNodeText = BuildSDDLNodeView(childNode, sectionType); if ( strSDDLChildNodeText.length > 0 ) { strChildSubSystem = childNode.getAttribute("Value"); strReturn += getSDDLObjectTitle(strChildSubSystem,1); strReturn += strTable; strReturn += strSDDLChildNodeText; strReturn += ""; } } strReturn += ""; } strReturn += ""; } } return strReturn; } function getSDDLObjectTitle(strTitle, bParent) { strSDDLObjectTitle = ""; if ( bParent == 1 ) { strSDDLObjectTitle = "
"; } else { strSDDLObjectTitle = "
"; } strSDDLObjectTitle += ""; strSDDLObjectTitle += ""; strSDDLObjectTitle += strTitle; strSDDLObjectTitle += "
"; return strSDDLObjectTitle ; } function BuildSDDLTable(strSDDL, strTitle, ObjectType, startupMode) { var strReturn = ""; if( strSDDL && (strSDDL.length > 0) ) { var objtype = 0; switch(ObjectType) { case "FileObject": objtype = 1; break; case "RegistryKey": objtype = 2; break case "ServiceObject": objtype = 3; break; default: break; } if( 0 == objtype ) //invalid SDDL type { strReturn = "
invalid SDDL type
"; return strReturn; } if( m_SDDL.init(objtype, strSDDL)!=0 ) { strReturn = "
" + strTitle; if( 3 == objtype ) { strReturn = strReturn + BuildServiceView(startupMode); } else { strReturn = strReturn + BuildACLView(); } strReturn = strReturn + "
"; } } else { strReturn = ""; } return strReturn; } function BuildSDDLNodeView(parentNode, sectionType) { var strReturn = ""; if( null == parentNode ) { strReturn = ""; return strReturn; } var strSDDL = ""; var strTitle = ""; var strStartupMode = ""; var startModeNode ; var SDDLnode ; switch(sectionType) { case "ServiceObject": SDDLnode = parentNode.selectSingleNode("./PropertyGroup[@Key='BaselineValue']/Property[@Key='SecurityDescriptor']/Field"); startModeNode = parentNode.selectSingleNode("./PropertyGroup[@Key='BaselineValue']/Property[@Key='StartupType']/Field"); break; default: SDDLnode = parentNode.selectSingleNode("./Property[@Key='BaselineValue']/Field"); break; } if( null == SDDLnode ) { strReturn = ""; } else { if( startModeNode ) { strStartupMode = startModeNode.text; } strSDDL = SDDLnode.text; strTitle = getString("SecurityResults/Sections/SCETemplate/FileSystem/PolicySetting", "SCWAnaLocStrings.xml"); strReturn = BuildSDDLTable(strSDDL, strTitle, sectionType, strStartupMode); } //select system setting SDDL node strStartupMode = ""; startModeNode = null; switch(sectionType) { case "ServiceObject": SDDLnode = parentNode.selectSingleNode("./PropertyGroup[@Key='SystemValue']/Property[@Key='SecurityDescriptor']/Field"); startModeNode = parentNode.selectSingleNode("./PropertyGroup[@Key='SystemValue']/Property[@Key='StartupType']/Field"); break; default: SDDLnode = parentNode.selectSingleNode("./Property[@Key='SystemValue']/Field"); break; } if( SDDLnode != null ) { if( startModeNode ) { strStartupMode = startModeNode.text; } strSDDL = SDDLnode.text; strTitle = getString("SecurityResults/Sections/SCETemplate/FileSystem/CurrentSetting", "SCWAnaLocStrings.xml"); strReturn = strReturn + BuildSDDLTable(strSDDL, strTitle, sectionType, strStartupMode); } return strReturn; } function BuildServiceView(startupMode) { var strReturn = "
"; var permission = 1; var auditing = 2; //Get Service Startup Mode strReturn = strReturn + "
"; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/Service/StartupMode", "SCWAnaLocStrings.xml"); strReturn = strReturn + "
"; var strTemp = startupMode; if( strTemp.length > 0 ) { strReturn = strReturn + "
"; switch(strTemp) { case "Automatic": strReturn = strReturn + getString("SecurityResults/Sections/Services/Table/Automatic", "SCWAnaLocStrings.xml"); break; case "Manual": strReturn = strReturn + getString("SecurityResults/Sections/Services/Table/Manual", "SCWAnaLocStrings.xml"); break; case "Disabled": strReturn = strReturn + getString("SecurityResults/Sections/Services/Table/Disabled", "SCWAnaLocStrings.xml"); break; default: break; } strReturn = strReturn + "
"; } if( m_SDDL.IsPermissionsPresent() ) { strACETable = BuildACEsTable(permission); if ( strACETable.length > 0 ) { //Get permission ACE table strReturn = strReturn + "
"; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Permissions", "SCWAnaLocStrings.xml"); strReturn = strReturn + "
"; strReturn = strReturn + strACETable; } } if( m_SDDL.IsAuditingsPresent() ) { //Get Auditing ACE table strACETable = BuildACEsTable(auditing); if ( strACETable.length > 0 ) { strReturn = strReturn + "
"; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Auditings", "SCWAnaLocStrings.xml"); strReturn = strReturn + "
"; strReturn = strReturn + strACETable; } } strReturn = strReturn + "
"; return strReturn; } function BuildACLView() { var strReturn = "
"; var permission = 1; var auditing = 2; //Get ACL owner var strTemp = m_SDDL.GetOwner(); if (strTemp.length > 0) { strReturn = strReturn + "
"; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Owner", "SCWAnaLocStrings.xml"); strReturn = strReturn + "
"; strReturn = strReturn + "
"; strReturn = strReturn + strTemp; strReturn = strReturn + "
"; } //Get ACL group strTemp = m_SDDL.GetGroup(); if (strTemp.length > 0 ) { strReturn = strReturn + "
"; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Group", "SCWAnaLocStrings.xml"); strReturn = strReturn + "
"; strReturn = strReturn + "
"; strReturn = strReturn + strTemp; strReturn = strReturn + "
"; } if( m_SDDL.IsPermissionsPresent() ) { //Get permission ACE table strACETable = BuildACEsTable(permission);; if ( strACETable.length > 0 ) { strReturn = strReturn + "
"; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Permissions", "SCWAnaLocStrings.xml"); strReturn = strReturn + "
"; strReturn = strReturn + strACETable; } //Get permission inherit info strReturn = strReturn + ""; strReturn = strReturn + "
"; var bTemp = false; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/PermissionInherit", "SCWAnaLocStrings.xml") + "" bTemp = m_SDDL.IsDACLInherited(); if( bTemp ) { strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Enabled", "SCWAnaLocStrings.xml"); } else { strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Disabled", "SCWAnaLocStrings.xml"); } strReturn = strReturn + "
"; } if( m_SDDL.IsAuditingsPresent() ) { //Get Auditing ACE table strACETable = BuildACEsTable(auditing); if ( strACETable.length > 0 ) { strReturn = strReturn + "
"; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Auditings", "SCWAnaLocStrings.xml"); strReturn = strReturn + "
"; strReturn = strReturn + strACETable; } //Get auditing inherit info strReturn = strReturn + "
"; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/InheritanceFlags", "SCWAnaLocStrings.xml"); strReturn = strReturn + "
"; strReturn = strReturn + ""; strReturn = strReturn + "
"; var bTemp = false; strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/AuditingInherit", "SCWAnaLocStrings.xml") + "" bTemp = m_SDDL.IsSACLInherited(); if( bTemp ) { strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Enabled", "SCWAnaLocStrings.xml"); } else { strReturn = strReturn + getString("SecurityResults/Sections/SCETemplate/FileSystem/Disabled", "SCWAnaLocStrings.xml"); } strReturn = strReturn + "
"; } strReturn = strReturn + "
"; return strReturn; } function BuildACEsTable(ACLtype) { var strReturn = ""; strReturn = strReturn + ""; strReturn = strReturn + ""; strReturn = strReturn + ""; if( 3 != m_SDDL.GetObjectType() ) { strReturn = strReturn + ""; } strReturn = strReturn + ""; var ACEcount = 0; if( m_SDDL ) { ACEcount = m_SDDL.GetACEsCount(ACLtype); } if( ACEcount <= 0 ) { strReturn = ""; return strReturn; } var index = 0; var type = 0; m_SDDL.MoveToFirstACE(ACLtype); var strTemp = ""; for(index=0; index"; switch(type) { case 1: strTemp = strTemp + getString("SecurityResults/Sections/SCETemplate/FileSystem/SuccessType","SCWAnaLocStrings.xml"); break; case 2: strTemp = strTemp + getString("SecurityResults/Sections/SCETemplate/FileSystem/FailureType","SCWAnaLocStrings.xml"); break; case 3: strTemp = strTemp + getString("SecurityResults/Sections/SCETemplate/FileSystem/BothType","SCWAnaLocStrings.xml"); break; case 4: strTemp = strTemp + getString("SecurityResults/Sections/SCETemplate/FileSystem/AllowType","SCWAnaLocStrings.xml"); break; case 5: strTemp = strTemp + getString("SecurityResults/Sections/SCETemplate/FileSystem/DenyType","SCWAnaLocStrings.xml"); break; default: break; } strTemp = strTemp + ""; //Get ACE Name strTemp = strTemp + ""; //Get ACE permission strTemp = strTemp + ""; //Get ACE applyto if( 3 != m_SDDL.GetObjectType() ) { strTemp = strTemp + ""; } strTemp = strTemp + ""; strReturn = strReturn + strTemp; m_SDDL.MoveToNextACE(ACLtype); } strReturn = strReturn + "
"; strReturn = strReturn + getString('SecurityResults/Sections/SCETemplate/FileSystem/Type', 'SCWAnaLocStrings.xml') + ""; strReturn = strReturn + getString('SecurityResults/Sections/SCETemplate/FileSystem/Name', 'SCWAnaLocStrings.xml') + ""; strReturn = strReturn + getString('SecurityResults/Sections/SCETemplate/FileSystem/Access', 'SCWAnaLocStrings.xml') + ""; strReturn = strReturn + getString('SecurityResults/Sections/SCETemplate/FileSystem/ApplyTo', 'SCWAnaLocStrings.xml') + "
"; strTemp = strTemp + m_SDDL.GetCurACEName(ACLtype); strTemp = strTemp + ""; // permission = 1 auditing = 2; // permission ACE uses standard permission, but if the standard is empty then uses special. // auditing ACE uses special permission if( 1 == ACLtype ) { var per = m_SDDL.GetCurACEStandardPermission(ACLtype); if( per.length <= 0 ) { per = m_SDDL.GetCurACESpecialPermission(ACLtype); } strTemp = strTemp + per; } else { strTemp = strTemp + m_SDDL.GetCurACESpecialPermission(ACLtype); } strTemp = strTemp + ""; strTemp = strTemp + m_SDDL.GetCurACEApplyTo(ACLtype); strTemp = strTemp + "
"; return strReturn; } function getACETypeString(nod, strFile) { var nIndex = 0; if(m_strArray) { for(nIndex = 0; nIndex < m_strArray.length; nIndex++) { if(strFile == m_strArray[nIndex]) { break; } } } else { m_strArray = new Array(strFile); m_arrObjs = new Array(1); } if(null == m_arrObjs[nIndex]) { m_strArray[nIndex] = strFile; m_arrObjs[nIndex] = new localization(); m_arrObjs[nIndex].loadXML(strFile); } if(!m_arrObjs[nIndex].isLoaded()) return ""; var strID = getNodeTextFromNode(nod); var strPath; switch(strID) { case "1": strPath = "SecurityResults/Sections/SCETemplate/FileSystem/SuccessType"; break; case "2": strPath = "SecurityResults/Sections/SCETemplate/FileSystem/FailureType"; break; case "3": strPath = "SecurityResults/Sections/SCETemplate/FileSystem/BothType"; break; case "4": strPath = "SecurityResults/Sections/SCETemplate/FileSystem/AllowType"; break; case "5": strPath = "SecurityResults/Sections/SCETemplate/FileSystem/DenyType"; break; default: strPath = ""; } return m_arrObjs[nIndex].getLocString(strPath); } function getACLInheritType(strID, strFile) { var nIndex = 0; if(m_strArray) { for(nIndex = 0; nIndex < m_strArray.length; nIndex++) { if(strFile == m_strArray[nIndex]) { break; } } } else { m_strArray = new Array(strFile); m_arrObjs = new Array(1); } if(null == m_arrObjs[nIndex]) { m_strArray[nIndex] = strFile; m_arrObjs[nIndex] = new localization(); m_arrObjs[nIndex].loadXML(strFile); } if(!m_arrObjs[nIndex].isLoaded()) return ""; var strPath; switch(strID) { case "True": case "TRUE": strPath = "SecurityResults/Sections/SCETemplate/FileSystem/Enabled"; break; case "False": case "FALSE": strPath = "SecurityResults/Sections/SCETemplate/FileSystem/Disabled"; break; default: strPath = ""; } return m_arrObjs[nIndex].getLocString(strPath); } function BuildServiceSection(tempNode, bNotInstalled) { strReturn = ""; ServiceItemsNode = tempNode.nextNode(); if ( bNotInstalled == 1) { xPath = "./Item[./PropertyGroup[@Key='BaselineValue' and Property/Field='Disabled'] and not ( ./PropertyGroup/@Key='SystemValue')]"; } else { xPath = "./Item[not (./PropertyGroup[@Key='BaselineValue' and Property/Field='Disabled'] and not ( ./PropertyGroup/@Key='SystemValue')) ]"; } ServiceItemNodes = ServiceItemsNode.selectNodes(xPath); if ( ( ServiceItemNodes != null) && ( ServiceItemNodes.length > 0 ) ) { strReturn += "
"; if ( bNotInstalled == 1) { strReturn += ""; } else { strReturn += ""; } strReturn += ""; if ( bNotInstalled == 1) { strReturn += getString('SecurityResults/Sections/Services/TitleNotInstalled', 'SCWAnaLocStrings.xml'); } else { strReturn += getString('SecurityResults/Sections/Services/TitleMismatch', 'SCWAnaLocStrings.xml'); } strReturn += "
"; if ( bNotInstalled == 1 ) { strReturn += "