This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 239475 - adminutil: Several admin server related bugs
adminutil: Several admin server related bugs
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Admin (Show other bugs)
1.0.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
:
Depends On:
Blocks: 152373 240316 FDS1.1.0
  Show dependency treegraph
 
Reported: 2007-05-08 13:53 EDT by Rich Megginson
Modified: 2015-12-07 11:56 EST (History)
0 users

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


Attachments (Terms of Use)
list of files (645 bytes, text/plain)
2007-05-08 13:53 EDT, Rich Megginson
no flags Details
diffs (37.93 KB, patch)
2007-05-08 13:53 EDT, Rich Megginson
no flags Details | Diff
cvs commit log (2.73 KB, text/plain)
2007-05-08 15:18 EDT, Rich Megginson
no flags Details

  None (edit)
Description Rich Megginson 2007-05-08 13:53:01 EDT
I found several problems in adminutil while testing admin server:
1) I needed a function to return the SIE DN given a server ID (e.g. return
cn=slapd-localhost, cn=..... given slapd-localhost).  This is to avoid lots of
duplicate code in the admin server CGIs.  There is an SSL version as well.
2) Need to be able to force NSS initialization via ADMSSL_Init*.  There were a
couple of places where admin server would perform a SHA hash using homegrown
code.  This has been removed in favor of using NSS.  ADMSSL_Init* would fail if
not configured for SSL, so we need to force it to initialize NSS even if SSL is
not configured.
3) PSET attribute removal is just broken.  It corrupts the internal tree
structure used to hold the attr/values.
4) small memory leak in form_post.c - not a big deal as this is only used by
CGIs which usually don't free() anyway but just exit() to release their memory
5) small memory error in the new code in resource.c - does not affect any
released code
6) small memory leaks in various places in uginfo.c - also changed some code to
use PR_smprintf instead of fixed size buffers
Comment 1 Rich Megginson 2007-05-08 13:53:01 EDT
Created attachment 154347 [details]
list of files
Comment 2 Rich Megginson 2007-05-08 13:53:38 EDT
Created attachment 154348 [details]
diffs
Comment 3 Noriko Hosoi 2007-05-08 14:50:29 EDT
Your fixes look good.
Comment 4 Rich Megginson 2007-05-08 15:18:11 EDT
Created attachment 154355 [details]
cvs commit log

Reviewed by: nhosoi (Thanks!)
Fix Description:
1) I needed a function to return the SIE DN given a server ID (e.g. return
cn=slapd-localhost, cn=..... given slapd-localhost).  This is to avoid lots of
duplicate code in the admin server CGIs.  There is an SSL version as well. 
Create non-ssl and ssl function to find the SIE DN given the SIE ID.  Change
pset code to use these new functions
2) Need to be able to force NSS initialization via ADMSSL_Init*.  There were a
couple of places where admin server would perform a SHA hash using homegrown
code.  This has been removed in favor of using NSS.  ADMSSL_Init* would fail if

not configured for SSL, so we need to force it to initialize NSS even if SSL is

not configured.  Change the ADMSSL_Init* routines to accept a force parameter.
If this parameter is true, force NSS_Initialize even if the adminutil is not
configured for SSL.  Changed code that uses ADMSSL_Init* to use this new
parameter.3) PSET attribute removal is just broken.  It corrupts the internal
tree structure used to hold the attr/values.  The pset node removal code needed
to set the node->left or ->right to NULL only after freeing it.  Fortunately
this function is hardly used at all. 4) small memory leak in form_post.c - not
a big deal as this is only used by
CGIs which usually don't free() anyway but just exit() to release their memory.
 free memory after use
5) small memory error in the new code in resource.c - does not affect any
released code.	Make sure the buffer is correctly null terminated.  Also, clean
up a small memory leak.
6) small memory leaks in various places in uginfo.c - also changed some code to

use PR_smprintf instead of fixed size buffers.	Fixed memory leaks.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
Comment 5 Anh Nguyen 2007-12-03 13:37:18 EST
Changed to to_be_verified_by_dev.
Comment 6 Nathan Kinder 2007-12-21 17:50:55 EST
This is covered by our Console tests which do a good job of exercising
adminserver and it's associated CGIs, which all make heavy use of adminutil.

Marking as VERIFIED.

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