Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 234190 - getEntitlements in SystemHandler.java doesn't check for null GroupTypes
getEntitlements in SystemHandler.java doesn't check for null GroupTypes
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Suchý
Clifford Perry
Depends On:
Blocks: 231300
  Show dependency treegraph
Reported: 2007-03-27 12:55 EDT by Justin Sherrill
Modified: 2007-07-31 12:17 EDT (History)
2 users (show)

See Also:
Fixed In Version: rhn421
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-09 11:41:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for xmlrpc (772 bytes, patch)
2007-03-29 08:24 EDT, Miroslav Suchý
no flags Details | Diff
test script (377 bytes, application/octet-stream)
2007-03-29 08:27 EDT, Miroslav Suchý
no flags Details

  None (edit)
Description Justin Sherrill 2007-03-27 12:55:55 EDT
getEntitlements doesn't check to see if the return from "group.getGroupType()"
is null before trying to call "getLabel()" on it.  The result is that this
function will return an exception whenever a system is in a user created group
(which will have groupType null within the DB).

The result of this, is that if you a script using the RHN API calls
system.getEntitlements, if the system is associated with a system group, an
internal exception will occur.

A method "getEntitlements" was added to Server.java within the 5.0 code base. 
This method does correctly check for a null return non getGroupType(), but the
getEntitlements method within SystemHandler.java was not changed to handle it
Comment 1 Miroslav Suchý 2007-03-29 08:24:18 EDT
Created attachment 151190 [details]
patch for xmlrpc

We have two option: include groups label or include group labels. As users can
label his group as eg. Provisioning, this is no way. So we just ignore the
users groups.
Comment 2 Miroslav Suchý 2007-03-29 08:27:14 EDT
Created attachment 151191 [details]
test script

This is script I used for testing this bug.
Comment 3 Miroslav Suchý 2007-03-29 09:06:29 EDT
Commited into RELEASE-4.2.0-satellite (rev. 114019)
It successfully passed my test.
Comment 8 Clifford Perry 2007-05-09 11:41:20 EDT
RHN 4.2.1 now released into production. 

Note You need to log in before you can comment on or make changes to this bug.