|Summary:||getEntitlements in SystemHandler.java doesn't check for null GroupTypes|
|Product:||Red Hat Satellite 5||Reporter:||Justin Sherrill <jsherril>|
|Component:||Server||Assignee:||Miroslav Suchý <msuchy>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Clifford Perry <cperry>|
|Fixed In Version:||rhn421||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2007-05-09 15:41:20 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
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.