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
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
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
def sasl_factory(): sasl_client = sasl.Client() sasl_client.setAttr("host", ms.host) sasl_client("service", kerberos_service_name) sasl_client.init()
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