Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12567

NPE in SaslRpcServer

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.0, 2.7.1
    • 2.8.0, 3.0.0-alpha1
    • None
    • None
    • Reviewed

    Description

      if (LOG.isDebugEnabled()) {
                  String username =
                    getIdentifier(authzid, secretManager).getUser().getUserName();
                  LOG.debug("SASL server DIGEST-MD5 callback: setting "
                      + "canonicalized client ID: " + username);
                }
      

      Looking at identifier implementations, e.g. AbstractDelegationTokenIdentifier (and others), I can see that getUser method can return null. If debug logging is enabled, this NPEs.
      If getUser is not expected to return NULL, it should either be checked and erred upon better here, or the error should be allowed to happen where it would otherwise happen, not in some debug log path.

      Attachments

        1. HADOOP-12567.01.patch
          1.0 kB
          Sergey Shelukhin
        2. HADOOP-12567.patch
          1 kB
          Sergey Shelukhin

        Activity

          People

            sershe Sergey Shelukhin
            sershe Sergey Shelukhin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: