Bug 245396 - adminutil: retrieveISIEs returns bogus data
adminutil: retrieveISIEs returns bogus data
Product: 389
Classification: Community
Component: Admin (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
Depends On:
Blocks: 240316 245369 FDS1.1.0
  Show dependency treegraph
Reported: 2007-06-22 16:15 EDT by Rich Megginson
Modified: 2015-12-07 11:55 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-07 11:55:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
diffs (7.17 KB, patch)
2007-06-22 16:15 EDT, Rich Megginson
no flags Details | Diff
cvs commit log (1.77 KB, text/plain)
2007-06-22 17:07 EDT, Rich Megginson
no flags Details

  None (edit)
Description Rich Megginson 2007-06-22 16:15:36 EDT
The retrieveISIEs function returns the correct productIDs but the productDNs are
bogus - they look like random memory addresses.
Comment 1 Rich Megginson 2007-06-22 16:15:36 EDT
Created attachment 157645 [details]
Comment 2 Rich Megginson 2007-06-22 17:07:20 EDT
Created attachment 157651 [details]
cvs commit log

Reviewed by: nkinder (Thanks!)
Fix Description: retrieveISIEs creates a list of id + DN pairs using
the ListNodePtr interface.  Each node has a name (the id) and a value
(a char ** with the DN as the first char *) and forms a linked list of
all of the values.  It then flattens the list into an array of name/value
pairs for returning.  However, instead of passing val[0] to the
addSingleValueAttribute() function for the value, it was passing val cast
to a (char *), which is entirely bogus.
The fix is to pass in ((char**)node->val)[0] which is a char * value.  Yet
another lesson in why void * is bad, and why you should not defeat the
compiler's type checker . . .
I also fixed another minor mem leak, and added @nss_inc@ to the list of include
directories - I guess it works because pkg-config mozldap[6] always returns the

nss include directory in its output . . .
Platforms tested: RHEL4
Flag day: Yes - autotool file changes
Comment 3 Rich Megginson 2008-01-03 15:53:04 EST
VERIFIED - no leaks or errors seen with valgrind on RHEL5 x86_64

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