Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 30 by
jmart...@ies1libertas.es: error when ldap_bind_password is
numeric
http://code.google.com/p/nsscache/issues/detail?id=30
What steps will reproduce the problem?
1. A properly configured /etc/nsscache.conf with ldap_bind_password
= "12345" in it
2. # nsscache update
What is the expected output? What do you see instead?
Expected normal behavior. Got this error instead:
Traceback (most recent call last):
File "/usr/sbin/nsscache", line 33, in <module>
return_value = nsscache_app.Run(sys.argv[1:], os.environ)
File "/usr/lib/pymodules/python2.7/nss_cache/app.py", line 242, in Run
retval = command_callable().Run(conf=conf, args=args)
File "/usr/lib/pymodules/python2.7/nss_cache/command.py", line 383, in Run
errors += self.VerifySources(conf)
File "/usr/lib/pymodules/python2.7/nss_cache/command.py", line 485, in
VerifySources
source = source_factory.Create(source_options)
File "/usr/lib/pymodules/python2.7/nss_cache/sources/source_factory.py",
line 90, in Create
return _source_implementations[source_name](conf)
File "/usr/lib/pymodules/python2.7/nss_cache/sources/ldapsource.py", line
89, in __init__
self.Bind(conf)
File "/usr/lib/pymodules/python2.7/nss_cache/sources/ldapsource.py", line
145, in Bind
cred=configuration['bind_password'])
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 831, in
simple_bind_s
res =
self._apply_method_s(SimpleLDAPObject.simple_bind_s,*args,**kwargs)
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 812, in
_apply_method_s
return func(self,*args,**kwargs)
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 207, in
simple_bind_s
msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 201, in
simple_bind
return
self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 99, in
_ldap_call
result = func(*args,**kwargs)
TypeError: must be string or read-only buffer, not int
What version of the product are you using? On what operating system?
mint 15 xfce (olivia), nsscache 0.21.19-1 installed via apt-get from ubuntu
repos.
Please provide any additional information below.
It seems FixValue is applied on the ldap_bind_password config option, which
turns it into an integer, which is then rejected by simple_bind_s at
ldapsource.py.
Suggested patch/workaround attached, casts configuration['bind_password']
to a string before passing on to simple_bind_s.
Attachments:
numeric_password_fix.patch 473 bytes
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings