Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 234190 - getEntitlements in SystemHandler.java doesn't check for null GroupTypes
Summary: getEntitlements in SystemHandler.java doesn't check for null GroupTypes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 420
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Clifford Perry
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-27 16:55 UTC by Justin Sherrill
Modified: 2007-07-31 16:17 UTC (History)
2 users (show)

Fixed In Version: rhn421
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-09 15:41:20 UTC


Attachments (Terms of Use)
patch for xmlrpc (deleted)
2007-03-29 12:24 UTC, Miroslav Suchý
no flags Details | Diff
test script (deleted)
2007-03-29 12:27 UTC, Miroslav Suchý
no flags Details

Description Justin Sherrill 2007-03-27 16:55:55 UTC
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
properly.

Comment 1 Miroslav Suchý 2007-03-29 12:24:18 UTC
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 12:27:14 UTC
Created attachment 151191 [details]
test script

This is script I used for testing this bug.

Comment 3 Miroslav Suchý 2007-03-29 13:06:29 UTC
Commited into RELEASE-4.2.0-satellite (rev. 114019)
It successfully passed my test.

Comment 8 Clifford Perry 2007-05-09 15:41:20 UTC
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.