示例#1
0
 def sasl_factory():
     sasl_client = sasl.Client()
     sasl_client.setAttr("host", host)
     if use_ldap:
         sasl_client.setAttr("username", ldap_user)
         sasl_client.setAttr("password", ldap_password)
     else:
         sasl_client.setAttr("service", kerberos_service_name)
     sasl_client.init()
     return sasl_client
示例#2
0
 def sasl_factory():
     try:
         import saslwrapper as sasl
     except ImportError:
         print 'saslwrapper not found, trying to import sasl'
         import sasl
     sasl_client = sasl.Client()
     sasl_client.setAttr("host", host)
     sasl_client.setAttr("service", service)
     sasl_client.init()
     return sasl_client
示例#3
0
 def sasl_factory():
     try:
         import saslwrapper as sasl
     except ImportError:
         print 'saslwrapper not found, trying to import sasl'
         import sasl
     sasl_client = sasl.Client()
     sasl_client.setAttr("host", host)
     sasl_client.setAttr("service", service)
     if transport_type.lower() == "plain_sasl":
         sasl_client.setAttr("username", getpass.getuser())
         sasl_client.setAttr("password", getpass.getuser())
     sasl_client.init()
     return sasl_client
示例#4
0
 def sasl_factory():
     sasl_client = sasl.Client()
     sasl_client.setAttr("host", ms.host)
     sasl_client("service", kerberos_service_name)
     sasl_client.init()
示例#5
0
 def sasl_factory() -> sasl.Client:
     sasl_client = sasl.Client()
     sasl_client.setAttr("host", conn.host)
     sasl_client.setAttr("service", kerberos_service_name)
     sasl_client.init()
     return sasl_client