[cups.bugs] [HIGH] STR #3392: ldap browsing cutting off last character from printername

Jason Aladellocchio aladellocchio at gmail.com
Sat Oct 24 13:36:14 PDT 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I'm trying to migrate my companies cups 1.2 install up to cups 1.4 however
we are having trouble getting ldap browsing to work correctly.

For both linux and osx 10.6 cups clients when we setup cupsd.conf for ldap
browsing to point at the ldap server (openldap 2.2.23) we have setup with
the cups 1.2 printer.schema we get a list of printers with the last
character of the name missing.   e.g.  if the printeserver has the
printers    pcloadletter and shredder on it, the clients via ldap browsing
show that the printers pcloadlette and shredde are available.   Naturally
that doesn't allow for any printing as that's not the correct names on the
server.  (the names are correct if we use cups 1.2 as the client against
the same ldap server though.)

We also tried building a new openldap server 2.3.43 using the latest
printer.schema from http://www.cups.org/str.php?L1962  and pointing the
clients at that ldap server.    That resulted in same behaviour.   If I
increased the log level and looked at /var/log/cups/error_log I saw;

process_browse_data(uri="ipp://printserver:631/printers/shredde",
host="ldapserver", resource="/printers/shredde", type=cde6f, state=3,
location="offic", info="descriptio", make_model="OKI C8800(PS",
num_attrs=0, attrs=(nil))

Reading through that messages except for the host line every other bit of
information is missing the last character...

There also seems to be trouble with the cups 1.4.1 install we setup to
publish the printers to the new ldap server.   When cups is started it
from the logs adds one printer to the ldap server and then segfaults;
(during each restart )  I'm unsure if that's related to the information
the clients are receiving being truncated or not though.  (To me that's a
minor issue, I can created the ldap entries by hand if needed, just
thought I'd mention it incase it was related.)   Checking the ldap
information with phpldapadmin the entries in ldap appear to be complete.
(they also look fine via an 'ldapsearch' command.)

I'm not sure how detailed you want me to get with the logs.   Let me know
if you want insane level of details and I can give you slapd debug output,
cups debug2 level errorlogs etc.

For now the basic details are ldap settings from my cups.conf files;

Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
BrowseProtocols ldap
BrowseLDAPServer ldap://ldapserver
BrowseLDAPDN ou=printers,dc=companyname,dc=co,dc=nz
BrowseLDAPBindDN cn=printeradmin,dc=companyname,dc=co,dc=nz
BrowseLDAPPassword secret

some sample ldapsearch output

ldapsearch -x -b 'dc=companyname,dc=co,dc=nz' '(objectclass=*)' -h
ldapserver

# extended LDIF
#
# LDAPv3
# base <dc=companyname,dc=co,dc=nz> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# companyname.co.nz
dn: dc=companyname,dc=co,dc=nz
objectClass: dcObject
objectClass: organization
o: Company Name
dc: companyname

# printeradmin, companyname.co.nz
dn: cn=printeradmin,dc=companyname,dc=co,dc=nz
objectClass: organizationalRole
objectClass: top
cn: printeradmin

# printers, companyname.co.nz
dn: ou=printers,dc=companyname,dc=co,dc=nz
objectClass: organizationalUnit
objectClass: top
ou: printers

# cups.companyname.co.nz, printers, companyname.co.nz
dn: ou=cups.companyname.co.nz,ou=printers,dc=companyname,dc=co,dc=nz
ou: cups.companyname.co.nz
description: CUPS Server
objectClass: top
objectClass: organizationalUnit

# pcloadletter, cups.companyname.co.nz, printers, companyname.co.nz
dn:
cn=beetle,ou=cups.companyname.co.nz,ou=printers,dc=companyname,dc=co,dc=nz
cn: beetle
printerDescription: printer description
printerURI: ipp://cups.companyname.co.nz:631/printers/pcloadletter
printerLocation: printer location
printerMakeAndModel: HP LaserJet P3005 Foomatic/hpijs - HPLIP 1.6.10
printerType: 8425492
objectClass: top
objectClass: device
objectClass: cupsPrinter

(output as returned but with the real company name replaced with
'companayname' and other info shorted to generic names.   Main point is
that no information in the ldapsearch results is missing the last
character and no errors querying the ldap server are returned.   Which
makes me think whatever is going on is a bug in how cups is
processing/searching the ldap data?)


This is proving to be rather problematic for us since we have over 1000
cups clients over 10+ subnets so we can't use broadcasts and things like
browsepoll use up all the connections to the cups server.   Which has left
ldap with the only browsing method we could get working reliably for cups
1.2   Any help much appreciated.

Link: http://www.cups.org/str.php?L3392
Version: 1.4.1





More information about the cups-devel mailing list