parameters: (self, conn, addr)
docstring: =======================================================================
          __INIT__
          =======================================================================
docstring_summary: =======================================================================
          __INIT__
          =======================================================================
docstring_tokens: ======================================================================= __INIT__ =======================================================================
function: def __init__(self, conn, addr):
          """
          =======================================================================
          __INIT__
          =======================================================================
          """
          try:
              confwab = engine.read_config_file(
                  modulename='sesman',
                  confdir='/var/wab/etc/sesman/config'
              )
              seswabconfig = confwab.get(u'sesman', {})
              SESMANCONF.conf[u'sesman'].update(seswabconfig)
              # Logger().info(" WABCONFIG SESMANCONF = '%s'" % seswabconfig)
          except Exception:
              Logger().info("Failed to load Sesman WabConfig")
          # Logger().info(" SESMANCONF = '%s'" % SESMANCONF[u'sesman'])
          if SESMANCONF[u'sesman'].get(u'debug', False):
              global DEBUG
              DEBUG = True
  
          self.rdplog = RdpProxyLog()
  
          self.cn = u'Unknown'
  
          self.proxy_conx = conn
          self.addr = addr
          self.full_path = None  # path + basename (without extension)
          self.record_filebase = None
          self.full_log_path = None
  
          self.engine = engine.Engine()
  
          self.effective_login = None
  
          # shared should be read from sesman but never written
          # except when sending
          self.shared = {}
          self._changed_keys = []
  
          self._full_user_device_account = u'Unknown'
          self.target_service_name = None
          self.target_group = None
          self.target_context = TargetContext()
  
          self.shared[u'module'] = u'login'
          self.shared[u'selector_group_filter'] = u''
          self.shared[u'selector_device_filter'] = u''
          self.shared[u'selector_proto_filter'] = u''
          self.shared[u'selector'] = u'False'
          self.shared[u'selector_current_page'] = u'1'
          self.shared[u'selector_lines_per_page'] = u'0'
          self.shared[u'real_target_device'] = MAGICASK
          self.shared[u'reporting'] = u''
  
          self._trace_type = self.engine.get_trace_type()
          self._selector_banner = self.engine.get_selector_banner()
          self.language = None
          self.pid = os.getpid()
  
          self.shared[u'target_login'] = MAGICASK
          self.shared[u'target_device'] = MAGICASK
          self.shared[u'target_host'] = MAGICASK
          self.shared[u'login'] = MAGICASK
          self.shared[u'ip_client'] = MAGICASK
          self.shared[u'target_protocol'] = MAGICASK
          self.shared[u'keyboard_layout'] = MAGICASK
  
          self.shared[u'auth_channel_answer'] = u''
          self.shared[u'auth_channel_target'] = u''
  
          self.shared[u'recording_started'] = u'False'
  
          self.shared[u'auth_notify'] = u''
  
          self.shared[u'login_language'] = MAGICASK
  
          self.internal_target = False
          self.check_session_parameters = False
  
          # Passthrough context
          self.passthrough_mode = SESMANCONF[u'sesman'].get(
              'auth_mode_passthrough', False
          )
          self.default_login = (
              SESMANCONF[u'sesman'].get('default_login', '').strip()
              or None
          )
          self.passthrough_target_login = None
          self.allow_back_selector = SESMANCONF[u'sesman'].get(
              'allow_back_to_selector', True
          )
          self.back_selector = False
          self.hide_approval_back_selector = False
          self.target_app_rights = {}
  
          self.login_message = (u"Warning! Unauthorized access to this system "
                                u"is forbidden and will be prosecuted by law.")
  
          self.shared[u'session_probe_launch_error_message'] = u''
  
          self.rtmanager = RTManager(
              self,
              self.engine.wabengine_conf.get("session_4eyes_timer", 60)
          )
          self.tun_process = None
function_tokens: def __init__ ( self , conn , addr ) : try : confwab = engine . read_config_file ( modulename = 'sesman' , confdir = '/var/wab/etc/sesman/config' ) seswabconfig = confwab . get ( u'sesman' , { } ) SESMANCONF . conf [ u'sesman' ] . update ( seswabconfig ) # Logger().info(" WABCONFIG SESMANCONF = '%s'" % seswabconfig) except Exception : Logger ( ) . info ( "Failed to load Sesman WabConfig" ) # Logger().info(" SESMANCONF = '%s'" % SESMANCONF[u'sesman']) if SESMANCONF [ u'sesman' ] . get ( u'debug' , False ) : global DEBUG DEBUG = True self . rdplog = RdpProxyLog ( ) self . cn = u'Unknown' self . proxy_conx = conn self . addr = addr self . full_path = None # path + basename (without extension) self . record_filebase = None self . full_log_path = None self . engine = engine . Engine ( ) self . effective_login = None # shared should be read from sesman but never written # except when sending self . shared = { } self . _changed_keys = [ ] self . _full_user_device_account = u'Unknown' self . target_service_name = None self . target_group = None self . target_context = TargetContext ( ) self . shared [ u'module' ] = u'login' self . shared [ u'selector_group_filter' ] = u'' self . shared [ u'selector_device_filter' ] = u'' self . shared [ u'selector_proto_filter' ] = u'' self . shared [ u'selector' ] = u'False' self . shared [ u'selector_current_page' ] = u'1' self . shared [ u'selector_lines_per_page' ] = u'0' self . shared [ u'real_target_device' ] = MAGICASK self . shared [ u'reporting' ] = u'' self . _trace_type = self . engine . get_trace_type ( ) self . _selector_banner = self . engine . get_selector_banner ( ) self . language = None self . pid = os . getpid ( ) self . shared [ u'target_login' ] = MAGICASK self . shared [ u'target_device' ] = MAGICASK self . shared [ u'target_host' ] = MAGICASK self . shared [ u'login' ] = MAGICASK self . shared [ u'ip_client' ] = MAGICASK self . shared [ u'target_protocol' ] = MAGICASK self . shared [ u'keyboard_layout' ] = MAGICASK self . shared [ u'auth_channel_answer' ] = u'' self . shared [ u'auth_channel_target' ] = u'' self . shared [ u'recording_started' ] = u'False' self . shared [ u'auth_notify' ] = u'' self . shared [ u'login_language' ] = MAGICASK self . internal_target = False self . check_session_parameters = False # Passthrough context self . passthrough_mode = SESMANCONF [ u'sesman' ] . get ( 'auth_mode_passthrough' , False ) self . default_login = ( SESMANCONF [ u'sesman' ] . get ( 'default_login' , '' ) . strip ( ) or None ) self . passthrough_target_login = None self . allow_back_selector = SESMANCONF [ u'sesman' ] . get ( 'allow_back_to_selector' , True ) self . back_selector = False self . hide_approval_back_selector = False self . target_app_rights = { } self . login_message = ( u"Warning! Unauthorized access to this system " u"is forbidden and will be prosecuted by law." ) self . shared [ u'session_probe_launch_error_message' ] = u'' self . rtmanager = RTManager ( self , self . engine . wabengine_conf . get ( "session_4eyes_timer" , 60 ) ) self . tun_process = None