nslcd doesn't respect dpkg-divert

Bug #1350901 reported by Lawren Quigley-Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nss-pam-ldapd (Ubuntu)
New
Undecided
Unassigned

Bug Description

In ubuntu precise, nslcd 0.8.4ubuntu0.3 has a postinst bug.

/var/lib/dpkg/info/nslcd.postinst

the function cfg_uris() edits existing uri variables breaking ldap configurations. This function should probably be fixed so it doesn't break the following cases:
   ldaps servers (ie: ldaps://ldap.example.com)
   multiple uri declarations (right now it comments out all but the first uri)
   it should never add localhost (right now if it can't figure things out it adds uri ldap://127.0.0.1/)

Also the postinst script doesn't check anywhere for a dpkg-divert so other packages are unable to maintain this file.

A simple fix would be the following:

CONFFILE="/etc/nslcd.conf"
DIVERT=`dpkg-divert --list /etc/nslcd.conf | awk '{print $5}'`
test -n "$DIVERT" && CONFFILE=$DIVERT

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: nslcd 0.8.4ubuntu0.3
ProcVersionSignature: Ubuntu 3.11.0-26.45~precise1-generic 3.11.10.12
Uname: Linux 3.11.0-26-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
Date: Thu Jul 31 10:52:50 2014
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_US:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: nss-pam-ldapd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lawren Quigley-Jones (lquigley) wrote :
Revision history for this message
Arthur de Jong (adejong) wrote :

The problems in configuration handling are probably addressed in Launchpad bug https://bugs.launchpad.net/bugs/1350778.

What is exactly the use case for diverting /etc/nslcd.conf? Currently the path is fixed at compile-time in the nslcd binary so moving it somewhere else will not accomplish much in itself.

Revision history for this message
Lawren Quigley-Jones (lquigley) wrote :

That bug does look like the same issue.

I use a dpkg-divert to maintain my own ldap config file via an internally maintained deb package. I also roll my own pam files and nsswitch config in there. The only things I change in nslcd.conf are the ssl cert and the ldap servers.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.