提交 e9095c32 编写于 作者: D Daniel P. Berrangé

remote: simplify libvirtd code for deciding if SASL auth is needed

Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 49fa9e64
......@@ -534,15 +534,10 @@ daemonSetupNetworking(virNetServerPtr srv,
}
#if WITH_SASL
if (config->auth_unix_rw == REMOTE_AUTH_SASL ||
(sock_path_ro && config->auth_unix_ro == REMOTE_AUTH_SASL) ||
(ipsock && config->listen_tls && config->auth_tls == REMOTE_AUTH_SASL) ||
(ipsock && config->listen_tcp && config->auth_tcp == REMOTE_AUTH_SASL)) {
saslCtxt = virNetSASLContextNewServer(
(const char *const*)config->sasl_allowed_username_list);
if (!saslCtxt)
if (virNetServerNeedsAuth(srv, REMOTE_AUTH_SASL) &&
!(saslCtxt = virNetSASLContextNewServer(
(const char *const*)config->sasl_allowed_username_list)))
goto cleanup;
}
#endif
ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册