Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11764

NPE when the GroupMappingServiceProvider has no group

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.7.2
    • Fix Version/s: 2.7.2
    • Component/s: security
    • Labels:
      None
    • Target Version/s:
    • Flags:
      Patch

      Description

      The following code can throw NPE if GroupMappingServiceProvider.getGroups() returns null.

      public List<String> load(String user) throws Exception {
      List<String> groups = fetchGroupList(user);

      if (groups.isEmpty()) {
      if (isNegativeCacheEnabled())

      { negativeCache.add(user); }

      // We throw here to prevent Cache from retaining an empty group
      throw noGroupsForUser(user);
      }

      return groups;
      }

      eg:image

        Attachments

        1. image.png
          283 kB
          runlinzhang

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              runlinzhang runlinzhang
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: