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

NPE when the GroupMappingServiceProvider has no group

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.7.2
    • 2.7.2
    • security
    • None
    • 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

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

            Dates

              Created:
              Updated: