[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#7986) -y option issue during read the password from a file

Full_Name: Shifeng Hu
Version: openldap2-2.4.26-0.26.1
OS: SUSE 11 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

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
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
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