[Pkg-nagios-changes] [SCM] Debian packaging for lconf branch, debian, updated. 1e94fc4e58dc3a383fea9241490f9f33c1b79784
Christoph Berg
myon at debian.org
Wed Jun 22 15:00:09 UTC 2011
The following commit has been merged in the debian branch:
commit 1e94fc4e58dc3a383fea9241490f9f33c1b79784
Author: Christoph Berg <myon at debian.org>
Date: Wed Jun 22 17:00:03 2011 +0200
Add patch to bind with user/password.
diff --git a/debian/changelog b/debian/changelog
index 91f903d..1534028 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,5 +2,6 @@ lconf (1.0-1) experimental; urgency=low
* Initial release.
* Using 1.0 plus git snapshot 55c830d5 from 2011-05-09.
+ * Add patch to bind with user/password.
-- Christoph Berg <myon at debian.org> Mon, 14 Mar 2011 14:54:17 +0100
diff --git a/debian/patches/binddn b/debian/patches/binddn
new file mode 100644
index 0000000..d330542
--- /dev/null
+++ b/debian/patches/binddn
@@ -0,0 +1,34 @@
+--- a/source/LConfExport.pl.in
++++ b/source/LConfExport.pl.in
+@@ -121,6 +121,7 @@ GetOptions(
+ use lib '@prefix@';
+ use config;
+ use vars qw($optLDAPServer $optLDAPDN $optExportUser $optExportLock $optRevisionEnabled $optRevisionPath $optRevisionTemp %itemMap);
++use vars qw($optLDAPBindDN $optLDAPBindPass);
+
+
+ # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
+@@ -364,6 +365,10 @@ sub LeaveScript {
+
+ sub LDAPconnect {
+ my $ldap = Net::LDAP->new ($optLDAPServer) or die "Can't connect to LDAP Server '$optLDAPServer'";
++ if ($optLDAPBindDN and $optLDAPBindPass) {
++ my $mesg = $ldap->bind ($optLDAPBindDN, password => $optLDAPBindPass);
++ $mesg->code && die $mesg->error;
++ }
+ return $ldap;
+ }
+
+--- a/source/config.pm.in
++++ b/source/config.pm.in
+@@ -5,6 +5,10 @@ $optLDAPServer = '127.0.0.1';
+ $optLDAPDN = 'ou=LConf, at domain@';
+ # note: ou=NagiosConfig, is always prepended to $optLDAPDN
+
++# optional user name and password to bind with
++$optLDAPBindDN = 'cn=admin, at domain@';
++$optLDAPBindPass = '';
++
+ # export script's user
+ $optExportUser = '@user@';
+
diff --git a/debian/patches/series b/debian/patches/series
index 1fb0361..78c1955 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
install-prefix
+binddn
--
Debian packaging for lconf
More information about the Pkg-nagios-changes
mailing list