nslcd doesn't respect dpkg-divert
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/
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:/
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=
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
ProcVersionSign
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)
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.