Issue 7986 - -y option issue during read the password from a file
Summary: -y option issue during read the password from a file
Status: VERIFIED SUSPENDED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-21 11:47 UTC by shifeng.hu@ericsson.com
Modified: 2020-03-20 21:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description shifeng.hu@ericsson.com 2014-11-21 11:47:14 UTC
Full_Name: Shifeng Hu
Version: openldap2-2.4.26-0.26.1
OS: SUSE 11 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.235.15.200)


Dear There
Our server is using LDAP, but I found there was an issue when I use -y file
option to set the password of LDAP User.
the User password was defined in server system as 7 characters without any "\0"
when I try to use ldapsearch or ldapmodify with the option -y to give the
password
I am for sure the password in file is exactly same with I set.
And I did a capture for LDAP, I saw there is a \0 in the suffix of password,
this means
the tool adds an additional '\0' in the last. then I got the error output li%0
below
ldap_bind: Invalid credentials (49)

As I check the src in the file "libraries\liblutil\passfile.c"

	passwd->bv_len = nread;
	passwd->bv_val[nread] = '\0';
is this necessary for a \0


BR//shifeng
Thanks!
Comment 1 Quanah Gibson-Mount 2020-03-20 21:30:09 UTC
Guessing that the file used to store the password was created with a linefeed.

No useful data provided.