drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laurentgo <...@git.apache.org>
Subject [GitHub] drill pull request #578: DRILL-4280: Kerberos Authentication
Date Mon, 31 Oct 2016 20:14:21 GMT
Github user laurentgo commented on a diff in the pull request:

    https://github.com/apache/drill/pull/578#discussion_r85796563
  
    --- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp ---
    @@ -427,6 +511,121 @@ connectionStatus_t DrillClientImpl::validateHandshake(DrillUserProperties*
prope
                             getMessage(ERR_CONN_AUTHFAIL,
                                 this->m_handshakeErrorId.c_str(),
                                 this->m_handshakeErrorMsg.c_str()));
    +            case exec::user::AUTH_REQUIRED: {
    +                DRILL_MT_LOG(DRILL_LOG(LOG_TRACE) << "Server requires SASL authentication."
<< std::endl;)
    +                SaslAuthenticatorImpl saslAuthenticator(properties);
    +                int saslResult = 0;
    +                std::string chosenMech;
    +                const char *out;
    +                unsigned outlen;
    +                saslResult = saslAuthenticator.init(m_mechanisms, chosenMech, &out,
&outlen);
    +                if (saslResult != SASL_OK) {
    +                    DRILL_MT_LOG(DRILL_LOG(LOG_TRACE) << "Authenticator init failed.
Code: " << saslResult << std::endl;)
    +                    return handleConnError(CONN_AUTH_FAILED, "User authentication init
failed.");
    +                }
    +                if (NULL == out) {
    +                    out = (&::google::protobuf::internal::kEmptyString)->c_str();
    --- End diff --
    
    we should not use protobuf internal constants. Either use the empty string "" here (it
might be okay if some of the functions you call out with are not keeping reference on it after
returning), or create a special constant.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message