Index by: file name | procedure name | procedure call | annotation
securityOff_proc.tcl (annotations | original source)

# 
# De-Activate security. 
#
####################################################################
# Patrick Finnegan 07/02/2007.  V1. 
####################################################################

######################################
# List current Security settings. 
######################################
proc securityOff { } {

   global AdminConfig 

   # display procedure arguments.

   set procName [ info level 0 ]

   putsLog "proc - $procName"

   foreach i [ info args $procName ]  {

      upvar 0 $i ilocal

      set propertiesArray($i) $ilocal 

   }

   putsLog "properties are.................."

   foreach { a b } [ array get propertiesArray ] {

       putsLog [ format "%-35s %s" "$a" "$b" ]

   }

   # get the Security object and display the current Security setting. 
   # there may be more than one security object.  Get the one at cell level. 
   
   set cellName                  [ $AdminConfig showAttribute [ $AdminConfig list Cell ] name ]  

   set securityId                [ $AdminConfig getid /Cell:$cellName/Security:/]

   set activeUserRegistryId      [ $AdminConfig showAttribute $securityId activeUserRegistry ]

   set activeUserRegistryRealm   [ $AdminConfig showAttribute $activeUserRegistryId realm ]
   
   putsLog "existing security propperties are:............" 

   putsLog [ format "%-5s %-30s %-50s"  " " enabled                 [ $AdminConfig showAttribute $securityId enabled              ]]
   putsLog [ format "%-5s %-30s %-50s"  " " enforceJava2Security    [ $AdminConfig showAttribute $securityId enforceJava2Security ]]
   putsLog [ format "%-5s %-30s %-50s"  " " appEnabled              [ $AdminConfig showAttribute $securityId appEnabled           ]]
   putsLog [ format "%-5s %-30s %-50s"  " " cacheTimeout            [ $AdminConfig showAttribute $securityId cacheTimeout         ]]
   putsLog [ format "%-5s %-30s %-50s"  " " activeUserRegistryRealm $activeUserRegistryRealm ]

   # set the Security properties.

   set enabled               [ list enabled false ] 

   set attrList [ list $enabled ]
  
   if { [ catch { $AdminConfig modify $securityId $attrList } r ] == 0 } {

       putsLog "************************************"
       putsLog "Security modified successfully:"
       putsLog $r 
       putsLog "************************************"

       } else {

       putsLog "************************************"
       putsLog "ERROR: problem modifying Security"
       putsLog $r 
       putsLog "************************************"
       return -code error $r

   }

}

Index by: file name | procedure name | procedure call | annotation
File generated 2007-08-07 at 13:42.