Closed Bug 281140 Opened 20 years ago Closed 20 years ago

replace getpass() with something that supports <8 chars for "-w -" prompts in CLUs

Categories

(Directory :: LDAP C SDK, defect)

Other
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ulf, Assigned: david)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041231 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041231 Firefox/1.0

common.c uses getpass() for non-Win32 and non-Solaris to prompt for password
when using the "-w -" option.  This is an obsolescent interface on HP-UX because
it supports only up to 8 character passwords.

Reproducible: Always

Steps to Reproduce:
1. ldapsearch -s base -b "" -D "uid=testguy,dc=example,dc=com" -w - "objectclass=*"
2. Enter bind password: testtesttest
Actual Results:  
ldap_simple_bind: Invalid credentials

Expected Results:  
LDAP_SUCCESS
Diff on common.c for new HP-UX password prompt
Assignee: mcs → david
The fix looks good and builds and runs on RHEL3.  I don't yet have access to an
HP machine for building.
Tested on HP-UX 11.11 64 bit.  Works fine.  So, can I go ahead a check this in?
  Do we need another review?
The code looks OK to me; please check in.  My only complaint is that it is a lot
of code to include inline inside an #ifdef (imagine if we had similar code for a
bunch of other platforms).  But we can address when someone proposes adding code
for another platform....
Fixed.

The getpass() function on HP-UX only allows 8 characters.
Since there is not (yet?) a better function, this fix
allows up to 256 character passwords using the raw
tty interfaces for no echo.

David, you can close out this bug or reassign to me for closure.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: