Bug 246124
Summary: | adminutil: findSIEDNByIDSSL() uses wrong credentials | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Nathan Kinder <nkinder> | ||||||
Component: | Admin | Assignee: | Nathan Kinder <nkinder> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Orla Hegarty <ohegarty> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 1.1.0 | ||||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 1.1.3-1.fc7 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2007-07-25 05:22:00 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 240316, 427409 | ||||||||
Attachments: |
|
Description
Nathan Kinder
2007-06-28 17:57:37 UTC
Created attachment 158146 [details]
CVS Diffs
Looks good. Rich pointed out an error in the increment of the pointer when parsing admpw. Here's the diff that addresses the issue he pointed out. retrieving revision 1.8 diff -u -5 -t -r1.8 admutil.c --- lib/libadminutil/admutil.c 8 May 2007 19:13:25 -0000 1.8 +++ lib/libadminutil/admutil.c 28 Jun 2007 18:11:25 -0000 @@ -1245,11 +1245,12 @@ break; case 1: /* EOF */ default: password = strchr(buf, ':'); - *password++ = '\0'; + *password = '\0'; + password++; while (*password) { if (*password == ' ') password++; else break; } admldapGetSIEDN() returns malloc'ed memory - you should call PL_strfree() when done with the value. Created attachment 158149 [details] Revised Diffs This new set of diffs addresses Rich's comment about the need to free the siedn. I also did some more tests around the parsing of the admpw contents since the orignal code is correct and should work as intended. I found that the original code does in fact work on the same machine where I saw it fail before. I'm thinking that this was due to memory corruption from another bug (bug 245396) that I was running up against in adminutil at that time. I've backed my changes to this area of code out. Checked into adminutil (HEAD). Thanks to Rich and Noriko for their reviews! Checking in lib/libadmsslutil/srvutilssl.c; /cvs/dirsec/adminutil/lib/libadmsslutil/srvutilssl.c,v <-- srvutilssl.c new revision: 1.6; previous revision: 1.5 done adminutil-1.1.3-1.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report. |