piping password to ldap CLUs on HP-UX

RESOLVED FIXED

Status

Directory
LDAP C SDK
RESOLVED FIXED
13 years ago
12 years ago

People

(Reporter: Ulf Weltman, Assigned: Rich Megginson)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050518 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050518 Firefox/1.0.4

When piping a password to the ldap command-line utilities, the tcgetattr() call
I added for bug #281140 fails with ENOTTY when it tries to retrieve the terminal
settings for the stdin file descriptor, because it's not a terminal at that point.

Reproducible: Always

Steps to Reproduce:
1. echo "secret" | ldapsearch -D "cn=testguy,dc=example,dc=com" -s base -b ""
"objectclass=*"


Actual Results:  
tcgetattr: Not a typewriter

Expected Results:  
LDAP result
(Reporter)

Comment 1

13 years ago
Created attachment 184968 [details] [diff] [review]
Change to not manipulate terminal if stdin is not a tty
(Reporter)

Updated

13 years ago
Assignee: mcs → richm

Comment 2

13 years ago
Comment on attachment 184968 [details] [diff] [review]
Change to not manipulate terminal if stdin is not a tty

The patch looks good to me.  I should've thought of this problem earlier....
Attachment #184968 - Flags: review+
(Assignee)

Comment 3

12 years ago
Checking in common.c;
/cvsroot/mozilla/directory/c-sdk/ldap/clients/tools/common.c,v  <--  common.c
new revision: 5.17; previous revision: 5.16
done
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.