admserv/cfgstuff admserv/newinst
by Nathan Kinder
admserv/cfgstuff/start-ds-admin.in | 40 +++++++++++++++++++++++++++++++---
admserv/newinst/src/AdminServer.pm.in | 16 ++++++++++++-
2 files changed, 52 insertions(+), 4 deletions(-)
New commits:
commit 82b2fd2fceab6eb0396e4a07535c00f2f9e549a5
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Thu Jan 27 14:28:09 2011 -0800
Bug 672468 - Don't use empty path elements in LD_LIBRARY_PATH
This patch adds a bit more logic to the creation of the libpath
to avoid empty path elements and leading and trailing colons.
diff --git a/admserv/cfgstuff/start-ds-admin.in b/admserv/cfgstuff/start-ds-admin.in
index 4b6ffa8..2d0e4bf 100644
--- a/admserv/cfgstuff/start-ds-admin.in
+++ b/admserv/cfgstuff/start-ds-admin.in
@@ -27,9 +27,43 @@
unset PASSWORD_PIPE
-LD_LIBRARY_PATH=@LIBPATH@:${LD_LIBRARY_PATH};export LD_LIBRARY_PATH
-LIBPATH=@LIBPATH@:${LIBPATH}:/usr/threads/lib:/usr/ibmcxx/lib:/usr/lib:/lib; export LIBPATH
-SHLIB_PATH=@LIBPATH@:${SHLIB_PATH}; export SHLIB_PATH
+ldlibpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+shlibpath_add() {
+ [ -z "$1" ] && return
+ SHLIB_PATH=${SHLIB_PATH:+$SHLIB_PATH:}$1
+}
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LIBPATH=${LIBPATH:+$LIBPATH:}$1
+}
+
+OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+OLD_SHLIB_PATH=${SHLIB_PATH}
+OLD_LIBPATH=${LIBPATH}
+LD_LIBRARY_PATH=
+SHLIB_PATH=
+LIBPATH=
+
+ldlibpath_add "@LIBPATH@"
+ldlibpath_add "${OLD_LD_LIBRARY_PATH}"
+export LD_LIBRARY_PATH
+
+shlibpath_add "@LIBPATH@"
+shlibpath_add "${OLD_SHLIB_PATH}"
+export SHLIB_PATH
+
+libpath_add "@LIBPATH@"
+libpath_add "${OLD_LIBPATH}"
+libpath_add "/usr/threads/lib"
+libpath_add "/usr/ibmcxx/lib"
+libpath_add "/usr/lib"
+libpath_add "/lib"
+export LIBPATH
HTTPD=@HTTPD@
OS=`uname -s`
diff --git a/admserv/newinst/src/AdminServer.pm.in b/admserv/newinst/src/AdminServer.pm.in
index 5f235c9..853fdd7 100644
--- a/admserv/newinst/src/AdminServer.pm.in
+++ b/admserv/newinst/src/AdminServer.pm.in
@@ -369,7 +369,9 @@ sub updateHttpConfFiles {
# this is required on some platforms in order to execute the config command
my $savepath = $ENV{SHLIB_PATH} || $ENV{LD_LIBRARY_PATH};
- $ENV{LD_LIBRARY_PATH} = "@LIBPATH@:$savepath";
+ $ENV{LD_LIBRARY_PATH} = "";
+ libpath_add("@LIBPATH@");
+ libpath_add("$savepath");
$ENV{SHLIB_PATH} = $ENV{LD_LIBRARY_PATH};
my $cmd = "@cgibindir@/config op=set configuration.nsSuiteSpotUser=\"$user\"";
if (!defined($origport) or ($port != $origport)) { # need to change the port number
@@ -737,6 +739,18 @@ sub updateSelinuxPolicy {
}
}
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
+
1;
# emacs settings
13 years, 2 months
Changes to 'refs/tags/Directory_Server_8_2_Errata_Candidate_10610_20110128'
by Nathan Kinder
Changes since the dawn of time:
Endi S. Dewata (1):
Bug 368481 - Unable to change Admin Server log paths in Console
Nathan Kinder (48):
removed SNMP, updated components, and added rebranded graphics
150479 - SHLIB_PATH setting incorrect on HP-UX
Update components and use new RHEL platform naming
Pick up new nescore component
Pick up new nescore component
Changes to use IBM JRE
Branding fixes
Use zip instead of compress for packaging
Use gzip instead of zip for packaging uxmcc.tar
Fix JSS component path
Removed unneccesary package that was failing on Windows
Update doc packaging for windows build failure
Pull components from component area instead on integration
Package ICU resource bundle
Fixed whitespace issue
Need to put resource bundle in proper directory
Need to create res directory for packaging
Fixed packaging makefile error
Pick up new components and package Cgistub
Don't package ns-common-schema.conf
Removed legacy plugin info
154855 - Don't package Ant jars
Update consolesdk component
Updated NESCORE component
Pick up new components
171667 - Pick up new console component and enable fedora component pulling
172812 - Don't overwrite ANT_HOME on on external builds. Also don't package ant jarfiles in the console java directory.
Admin Express cgi needs NESCompatEnv set for help to work
Resolves: 245665
Resolves: 245665
Resolves: 246020
Summary: Fixed an annoying typo in a comment.
Resolves: 247283
Resolves: 251418
Resolves: 251418
Resolves: 253760
Resolves: 258341
Resolves: 370071
Resolves: 370071
Resolves: 445305
Resolves: 430364
Resolves: 430364
Resolves: bug 486402
Get rundir from sysconfig script.
Make check for threaded httpd work with Apache 2.0
Change parsing of start-slapd for instance name
Bug 601865 - Add missing man pages
Bug 672468 - Don't use empty path elements in LD_LIBRARY_PATH
Noriko Hosoi (89):
bugzilla 147535: De-brand the Administration Server as "brandx"
[147535] Brand the Administration Server as "Fedora"
WARNING: This is a space holder for the license file.
removed obsolete URLs.
switching ext/int in components.mk
updated copyright string.
Removed "return home" to home.netscape.com.
Introduced a gmake macro BUILD_MODE (= ext or int) to control packaging/non-packaging Admin Server guide.
[147522] Brand the Admin SDK as "Fedora"
Put 'scrollbars=yes' for showing the scrollbars on Firefox.
1) ant 1.6.2; 2) DBM_1_61_RTM; 3) NSS_3_9_3_RTM; 4) LDAP C SDK v5.14; 5) JSS_3_5_1_RTM
Pick up docs from the component area; (need to remove admserv/manual/help/manual
package <nescore>/bin/https/dtds; developer.netscape.com used to host for the NES dtd files, but it was shutdown after the Red Hat acquisition. Now we are switching to have the dtd files in the server package.
- picking up the latest consolesdk from /s/b/sbsintegration
Removed the dependency on the rule: pkguxSNMP.
typo for BUILD_MODE.
1) pick up new setupsdk, consolesdk.
Changed "{Fedora,Red Hat} Project" to "{Fedora Project,Red Hat} Home Page" on the admin main page.
[154431] Security package requests from Cert Team; added .chk files
[154431] Security package requests from Cert Team
[148004] Rebranding: new Contact info / URLs
[154189] picking up the new consolesdk 20050512
[169320] Admin Server branding mismatches
[164401] Clean up Admin Server build
171942 – Change Admin Server version to 1.0
Adjusted Admin Util and Console build path for the external build.
[175418] Admin Server ns-update crashes if necessary attribute-value is not given
[179394] HP-UX IPF support (adminserver)
[Bug 186105] Admin Server Makefile updates for Internal build
[186105] Admin Server Makefile updates for Internal build
[186105] Admin Server Makefile updates for Internal build
[186105] Admin Server Makefile updates for Internal build
[186105] Admin Server Makefile updates for Internal build
Picking up new AdminUtil, SetupUtil, and Console.
[186105] Admin Server Makefile updates for Internal build
Picking up new console.
[186642] Directory Server Makefile updates for Internal build
Updated SETUPUTIL_RELDATE to 20060405.
[161099] admin passwd in clear text in adm.conf
[161099] admin passwd in clear text in adm.conf
Added NSPR libraries to the dependency (ns-update). (fixed the build)
[195258] Changes for the internal build
[195258] Changes for the internal build
[191832] Admin Server password always remembers initial password on (part 2)
[195258] Changes for the internal build:
[195258] Changes for the internal build
[195258] Changes for the internal build
[195258] Changes for the internal build; comment#14
Resolves: #237356
Resolves: #237356
Removed an unnecessary entry.
Resolves: 237356
Resolves: #244325
Resolves: 237356
Resolves: #237356
Resolves #244715
Resolves: #237356
Resolves: #244749
Resolves: #244749
Resolves: #244749
Resolves: #244749
Resolves: #244749
Resolves: #244749
Resolves: #244749
Resolves: #244749
Resolves: #247215
Resolves: #247215
Resolves: #246683
resolves: #247215
resolves: #249739
Resolves: #203999
Resolves: #214276
Resolves: #251090
Resolves: # 251595
Resolves: #252190
Resolves: #253811
Resolves: #273501
One character fix: added ';'
Resolves: #251090
Resolves: #357501
Resolves: #411231
Resolves: #191779
Resolves: #191834
Resolves: #476096
Resolves: #476096
setup-ds-admin.pl Fix for objectclass violation
490997 Obsolete ACI in o=netscaperoot
560827 - Admin Server templates: DistinguishName validation fails
560827 - Admin Server: DistinguishName validation fails
Rich Megginson (207):
added config file templates
added functions to replace tokens in template scripts and config files
Bug(s) fixed: 163375
Bug(s) fixed: 163624
Bug(s) fixed: 163714
Bug(s) fixed: 163730
Bug(s) fixed: 164401
removing unused files
removed unused files
removing unused files
removed unused files
removed unused files
removed unused files
Bug(s) fixed: 166273
Bug(s) fixed: 166380
fix build breakage on RHEL3 - do not need admin server dsgw stuff anymore
Bug(s) fixed: 167325
Bug(s) fixed: 167345
Bug(s) fixed: 167865
Bug(s) fixed: 167866
Bug(s) fixed: 167867
Bug(s) fixed: 167867
Bug(s) fixed: 167869
Bug(s) fixed: 169155
fix some internal build related issues
change binary directory naming convention to the same one we use with pre-built binary components; remove old crufty Fortezza stuff; general makefile cleanup
use open source console help docs
replace the incorrect one with the correct fedora branded graphic
by default, use the console ldapjdk.jar and JSS for building and packaging admin server
Bug(s) fixed: 171066
Bug(s) fixed: 172249
Bug(s) fixed: 172402
Bug(s) fixed: 172816
allow developers to build an adminserver with the 3 Apache modules included for convenience but not packaging
put the Apache modules back into the packaging - the gpl is compatible with the apl in this specific instance - also enable using ant and java from PATH by default for external builds
Add the create CGI to the list of CGIs which mod_restartd is allowed to execute.
Admin server post install was core dumping in express mode because it did
1) default cert name is server-cert not Server-Cert
Write changes to console.conf, not nss.conf
Make sure the server uid owns the config directory and the other config files
Package libjss3.so in lib, not lib/jss
patch file to convert admin server version 1.0 files to version 1.0.1
patch to convert libldap- to libldap
Bug(s) fixed: 174837
Bump version from 1.0 to 1.0.1
do not overwrite the dynamic console.conf file when upgrading
Bug(s) fixed: 175187
Change packaging so that either the old style adminutil properties or the
make sure /opt/fedora-ds/shared/lib is used for shared libs used by the console
whoops - I left the - at the beginning of the mkdir command
look for the java command in java_home/bin
bug 175170
It's a little bit tricky. The base package is a dependency of both the main admin server package and the directory server package. However, it works if you just create a zero length .zip file for the base archive - you get a warning when running setup, but everything installs correctly. While it's not perfect (it will be addressed for the next major release) it will at least allow those developers who do not want to use java at all to build and install.
Use NSS 3.11 and NSPR 4.6.1 - This requires packaging the new freebl3
Use NSPR 4.6.1 and NSS 3.11 - this requires new freebl3 libraries at runtime
Wan-Teh pointed out that the platform specific freebl libs are needed _instead of_ libfreebl3, not _in addition to_. So, set the list of platform specific freebl libs and add them to the list of libs to package.
The correct naming convention for RHEL is
NSPLATFORM_DIR is set differently for linux than for other platforms
1) Fix moz objdir name for generic linux x86_64
Added httpd-2.2.conf.tmpl - Apache 2.2 uses different modules than 2.0 for auth/authz
Apache 2.2 uses different modules for auth/authz than 2.0. This change allows admin server post install to figure out what version of Apache is being used (via httpd -v) and select the appropriate httpd.conf template file based on that version.
Change admin server version to 1.0.2
replace %%% tokens with the real default paths, otherwise patch won't work
Still need the console ld lib path patch for startconsole
still need the console ld libpath patch for startconsole
Have to add back softokn3 to the link line - adminutil, setuputil, and ldapsdk didn't remove them as dependencies, so the linker forces it to be present at link time.
remove hardcoded reference to /home/rich - should be %%%sroot%%%
patch file for upgrading from 1.0.1 - fixes the use of admpw for basic auth
added patch file for upgrading from 1.0.1 - fixes the use of admpw for basic auth
this patch fixes the use of admpw in the actual config file - the previous patch only fixes the template
added admserv-conf-admpw.patch to patch the real config file - the previous patch only patches the template config file
Bug(s) fixed: 186280
Bug: 186280
Bug: 192785
admin server console has been moved to top level admservconsole
These files are obsolete.
renamed util.cpp to nscputil.cpp to avoid object/file naming conflict in autoconf builds
removed admconf.c admserv.c pasword.c
renamed the files from .h to .html - they are html files after all
remove obsolete files
remove obsolete files
remove obsolete files
remove obsolete files
bump version to 1.0.3
use new ldapcsdk 6.0.0; upgrade other components
Bug(s) fixed: 210180
use libldap60 in preload
assume the ld_preload thing has already been patched by installing or upgrading to fds102 - this patch only upgrades libldap50 to libldap60 from now on
startconsole has changed for fds103, so the patch needs to change too
Now that the LDAP C SDK is linked with SASL by default, other executables
Resolves: bug 210916
Resolves: bug 239502, bug 186280
rename scripts to x-ds-admin; fix uid change in config.c; remove obsolete snmp CGIs
Resolves: bug 239502
Resolves: bug 239502
Resolves: bug 239502
Resolves: bug 239502
Resolves: bug 239502
Resolves: bug 239502
Resolves: bug 237356
Resolves: bug 237356
Resolves: bug 237356
Resolves: bug 237356
remove obsolete files
Resolves: bug 245214
Resolves: bug 245214
Resolves: bug 244749
Resolves: bug 245815
Resolves: bug 246683
Resolves: bug 245815
Resolves: bug 248145
Resolves: bug 248184
Resolves: bug 248145
Resolves: bug 248145
remove obsolete files and directories
remove obsolete files
remove obsolete files; make sure all adminserver files are branded plain old GPLv2, instead of GPL + exception like directory server
remove AC_FUNC_REALLOC - breaks build in HPUX
need to set icu_libdir
need to set icu_libdir for the --with-icu case too
Resolves: bug 250324
Resolves: bug 250535
fix build breakage on rhel4
Reviewed by: nkinder (Thanks!)
Resolves: bug 251549
Resolves: bug 252190
Resolves: bug 252190
remove curses
Resolves: bug 288451
Resolves: bug 288451
Resolves: bug 295001
Resolves: bug 299261
Resolves: bug 304081
Resolves: bug 315731
Resolves: bug 248169
since we use the start script to start admin, we source the
Resolves: bug 317591
Resolves: bug 317651
Resolves: bug 367941
added spec files
Resolves: bug 186280
Resolves: bug 383301
Resolves: bug 368481
Resolves: bug 400421
Resolves: bug 407011
Resolves: bug 400221
Resolves: bug 420751
update to version 1.1.1
Resolves: bug 425861
Resolves: bug 425849
Resolves: bug 426056
Resolves: bug 249548
Resolves: CVE-2008-0892 and 437320
Resolves: bug 448366
Resolves: bug 431103
Reviewed by: nkinder (Thanks!)
Reviewed by: nkinder (Thanks!)
removing dead code
bump version to 1.1.6
Resolves: bug 431103
Resolves: bug 451702
Resolves: bug 448366
update for version 1.1.6
Resolves: bug 462411
Resolves: bug 470946
Fix various compiler warnings about define redefinitions, unused functions/variables, wrong types being cast, etc.
Resolves: bug 209242
Resolves: bug 426439
initial version 1.1.7 commit
Resolves: bug 480869
Resolves: bug 480869
Resolves: bug 483276
Resolves: bug 468474
Resolves: bug 166230
Resolves: bug 480869
actually add the -y argument
for the 1.1.7 release
Resolves: bug 493989
bump rev
Resolves: bug 494980
bump version for bug fix
rename to 389
Link libds-admin-serv with NSPR to avoid rpmlint missing weak symbol errors
Add more libs for libds-admin-serv to resolve rpmlint issues
yet more link issues with libds-admin-serv
change license from gplv2+ to plain gplv2
added 389-admin.spec
get rid of obsolete functions
bump version to 1.1.8 for fedora review
bump spec version to 1.1.8 for fedora review
use 389-adminutil instead of adminutil
Add support for new ds base update framework
Running setup-ds-admin.pl -u on replica with ldaps chokes on CA cert
389-ds-base/glibmm24: conflicting perl provides
setup-ds-admin.pl: Can't call method "getErrorString" on an undefined value at /usr/lib64/dirsrv/perl/AdminUtil.pm line 405.
setup-ds-admin.pl should use correct default hostname + port
Move mod_admserv and mod_restartd into adminserver
Bump version to 1.1.10
Allow use of unthreaded Apache
Add support for versioning via VERSION.sh - cleanup branding
Fix problem with genrb on F-12 and later
bump version to 1.1.10.a2
Allow configure to find genrb correctly on all platforms
this is version 1.1.10.a4
this is the 1.1.10 release
bump version to 1.1.11.a1
Bug 593392 - setup-ds-admin.pl -k creates world readable file
Rob Crittenden (10):
147495. Suppress bogus admin40_host_ip_check error message on startup.
147519 Allow the unauthenticated retrieval of /favicon.ico
Bug 162703
162703
Install an Apache-compatible configuration.
Fix build oops.
164525 In the stop script add kill -9 for the process group if a
164832 Got a little carried away when cleaning up kruft in bug 162703.
164853
Bug(s) fixed: 165240
cvsadm (2):
Move Admin Server from branch to TRUNK
Move Admin Server from branch to TRUNK
svrbld (2):
Use perl5 instead of perl for branding
fixed windows build failure: 1) missing unzipping manual components (newinst/insadm/Makefile); 2) makefile path mismatch (mcc/nt/makefile).
unknown (1):
This commit was manufactured by cvs2git to create branch
13 years, 2 months
Branch 'Directory_Server_8_2_Branch' - admserv/cfgstuff admserv/newinst
by Nathan Kinder
admserv/cfgstuff/start-ds-admin.in | 40 +++++++++++++++++++++++++++++++---
admserv/newinst/src/AdminServer.pm.in | 16 ++++++++++++-
2 files changed, 52 insertions(+), 4 deletions(-)
New commits:
commit e4ca916b6ec18feec56c805bacf17b00342d2587
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Thu Jan 27 14:28:09 2011 -0800
Bug 672468 - Don't use empty path elements in LD_LIBRARY_PATH
This patch adds a bit more logic to the creation of the libpath
to avoid empty path elements and leading and trailing colons.
diff --git a/admserv/cfgstuff/start-ds-admin.in b/admserv/cfgstuff/start-ds-admin.in
index 06a720c..8e497f7 100644
--- a/admserv/cfgstuff/start-ds-admin.in
+++ b/admserv/cfgstuff/start-ds-admin.in
@@ -27,9 +27,43 @@
unset PASSWORD_PIPE
-LD_LIBRARY_PATH=@LIBPATH@:${LD_LIBRARY_PATH};export LD_LIBRARY_PATH
-LIBPATH=@LIBPATH@:${LIBPATH}:/usr/threads/lib:/usr/ibmcxx/lib:/usr/lib:/lib; export LIBPATH
-SHLIB_PATH=@LIBPATH@:${SHLIB_PATH}; export SHLIB_PATH
+ldlibpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+shlibpath_add() {
+ [ -z "$1" ] && return
+ SHLIB_PATH=${SHLIB_PATH:+$SHLIB_PATH:}$1
+}
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LIBPATH=${LIBPATH:+$LIBPATH:}$1
+}
+
+OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+OLD_SHLIB_PATH=${SHLIB_PATH}
+OLD_LIBPATH=${LIBPATH}
+LD_LIBRARY_PATH=
+SHLIB_PATH=
+LIBPATH=
+
+ldlibpath_add "@LIBPATH@"
+ldlibpath_add "${OLD_LD_LIBRARY_PATH}"
+export LD_LIBRARY_PATH
+
+shlibpath_add "@LIBPATH@"
+shlibpath_add "${OLD_SHLIB_PATH}"
+export SHLIB_PATH
+
+libpath_add "@LIBPATH@"
+libpath_add "${OLD_LIBPATH}"
+libpath_add "/usr/threads/lib"
+libpath_add "/usr/ibmcxx/lib"
+libpath_add "/usr/lib"
+libpath_add "/lib"
+export LIBPATH
HTTPD=@HTTPD@
diff --git a/admserv/newinst/src/AdminServer.pm.in b/admserv/newinst/src/AdminServer.pm.in
index a91aadd..bee77a6 100644
--- a/admserv/newinst/src/AdminServer.pm.in
+++ b/admserv/newinst/src/AdminServer.pm.in
@@ -369,7 +369,9 @@ sub updateHttpConfFiles {
# this is required on some platforms in order to execute the config command
my $savepath = $ENV{SHLIB_PATH} || $ENV{LD_LIBRARY_PATH};
- $ENV{LD_LIBRARY_PATH} = "@LIBPATH@:$savepath";
+ $ENV{LD_LIBRARY_PATH} = "";
+ libpath_add("@LIBPATH@");
+ libpath_add("$savepath");
$ENV{SHLIB_PATH} = $ENV{LD_LIBRARY_PATH};
my $cmd = "@cgibindir@/config op=set configuration.nsSuiteSpotUser=\"$user\"";
if (!defined($origport) or ($port != $origport)) { # need to change the port number
@@ -626,6 +628,18 @@ sub removeAdminServer {
return;
}
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
+
1;
# emacs settings
13 years, 2 months
Branch '389-ds-base-1.2.8' - 2 commits - ldap/admin wrappers/cl-dump.in wrappers/dbscan.in wrappers/infadd.in wrappers/initscript.in wrappers/ldap-agent.in wrappers/ldclt.in wrappers/ldif.in wrappers/migratecred.in wrappers/mmldif.in wrappers/pwdhash.in wrappers/repl-monitor.in wrappers/rsearch.in
by Nathan Kinder
ldap/admin/src/scripts/10fixrundir.pl | 11 ++++++
ldap/admin/src/scripts/DSCreate.pm.in | 13 ++++---
ldap/admin/src/scripts/start-dirsrv.in | 15 +++++++-
ldap/admin/src/scripts/template-bak2db.in | 15 ++++++--
ldap/admin/src/scripts/template-bak2db.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-db2bak.in | 15 ++++++--
ldap/admin/src/scripts/template-db2bak.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-db2index.in | 14 +++++---
ldap/admin/src/scripts/template-db2index.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-db2ldif.in | 15 ++++++--
ldap/admin/src/scripts/template-db2ldif.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-dbverify.in | 15 ++++++--
ldap/admin/src/scripts/template-dn2rdn.in | 14 +++++---
ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-fixup-memberof.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ldif2db.in | 15 ++++++--
ldap/admin/src/scripts/template-ldif2db.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ldif2ldap.in | 17 ++++++++-
ldap/admin/src/scripts/template-monitor.in | 17 ++++++++-
ldap/admin/src/scripts/template-ns-accountstatus.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ns-activate.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ns-inactivate.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-restoreconfig.in | 15 +++++++-
ldap/admin/src/scripts/template-saveconfig.in | 15 +++++++-
ldap/admin/src/scripts/template-schema-reload.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-suffix2instance.in | 15 +++++++-
ldap/admin/src/scripts/template-syntax-validate.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-upgradedb.in | 15 +++++++-
ldap/admin/src/scripts/template-upgradednformat.in | 15 ++++++--
ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-verify-db.pl.in | 19 +++++++++-
ldap/admin/src/scripts/template-vlvindex.in | 15 +++++++-
wrappers/cl-dump.in | 11 +++++-
wrappers/dbscan.in | 10 ++++-
wrappers/infadd.in | 12 +++++-
wrappers/initscript.in | 10 +++++
wrappers/ldap-agent.in | 12 +++++-
wrappers/ldclt.in | 12 +++++-
wrappers/ldif.in | 12 +++++-
wrappers/migratecred.in | 14 ++++++--
wrappers/mmldif.in | 14 ++++++--
wrappers/pwdhash.in | 14 ++++++--
wrappers/repl-monitor.in | 11 +++++-
wrappers/rsearch.in | 12 +++++-
45 files changed, 614 insertions(+), 109 deletions(-)
New commits:
commit 1847a51aaafa92a0bdf06c9d21378f9a6115b26a
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Thu Jan 27 12:10:01 2011 -0800
Bug 672468 - Don't use empty path elements in LD_LIBRARY_PATH
Many of the command line wrappers and perl scripts have their
LD_LIBRARY_PATH and SHLIB_PATH defined with macros that are
replaced by configure. It is common for some of these macros
to be empty, which results in empty path elements.
This patch adds a bit more logic to the creation of the libpath
to avoid empty path elements and leading and trailing colons.
diff --git a/ldap/admin/src/scripts/start-dirsrv.in b/ldap/admin/src/scripts/start-dirsrv.in
index d7144d1..291c821 100755
--- a/ldap/admin/src/scripts/start-dirsrv.in
+++ b/ldap/admin/src/scripts/start-dirsrv.in
@@ -6,6 +6,11 @@
# 1: Server could not be started
# 2: Server already running
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
# Starts a single instance
start_instance() {
# The first argument is the server ID. Anything
@@ -22,9 +27,15 @@ start_instance() {
fi
prefix="$DS_ROOT"
- LD_LIBRARY_PATH=$prefix$SERVER_DIR:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:@pcre_libdir@
+
+ libpath_add "$prefix$SERVER_DIR"
+ libpath_add "$prefix@nss_libdir@"
+ libpath_add "$prefix@libdir@"
+ libpath_add "@nss_libdir@"
+ libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
- SHLIB_PATH=$prefix$SERVER_DIR:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:@pcre_libdir@
+ SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
DS_CONFIG_DIR=$CONFIG_DIR
diff --git a/ldap/admin/src/scripts/template-bak2db.in b/ldap/admin/src/scripts/template-bak2db.in
index 0f92667..b081839 100755
--- a/ldap/admin/src/scripts/template-bak2db.in
+++ b/ldap/admin/src/scripts/template-bak2db.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-bak2db.pl.in b/ldap/admin/src/scripts/template-bak2db.pl.in
index 4cd51ab..4ab79cc 100644
--- a/ldap/admin/src/scripts/template-bak2db.pl.in
+++ b/ldap/admin/src/scripts/template-bak2db.pl.in
@@ -125,8 +125,25 @@ $entry = "${dn}${misc}${cn}${nsinstance}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-db2bak.in b/ldap/admin/src/scripts/template-db2bak.in
index 5ff5d07..d89f6ee 100755
--- a/ldap/admin/src/scripts/template-db2bak.in
+++ b/ldap/admin/src/scripts/template-db2bak.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-db2bak.pl.in b/ldap/admin/src/scripts/template-db2bak.pl.in
index b443f0b..8a0cb1c 100644
--- a/ldap/admin/src/scripts/template-db2bak.pl.in
+++ b/ldap/admin/src/scripts/template-db2bak.pl.in
@@ -114,9 +114,26 @@ $entry = "${dn}${misc}${cn}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
print("Back up directory: $archivedir\n");
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-db2index.in b/ldap/admin/src/scripts/template-db2index.in
index e0e9a55..3dc4740 100755
--- a/ldap/admin/src/scripts/template-db2index.in
+++ b/ldap/admin/src/scripts/template-db2index.in
@@ -4,10 +4,16 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-db2index.pl.in b/ldap/admin/src/scripts/template-db2index.pl.in
index eb58957..e598b05 100644
--- a/ldap/admin/src/scripts/template-db2index.pl.in
+++ b/ldap/admin/src/scripts/template-db2index.pl.in
@@ -69,8 +69,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -224,3 +229,15 @@ $entry = "${dn}${misc}${cn}${nsinstance}${attribute}${vlvattribute}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-db2ldif.in b/ldap/admin/src/scripts/template-db2ldif.in
index e519f3e..2989b77 100755
--- a/ldap/admin/src/scripts/template-db2ldif.in
+++ b/ldap/admin/src/scripts/template-db2ldif.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-db2ldif.pl.in b/ldap/admin/src/scripts/template-db2ldif.pl.in
index 2db6421..a4929ba 100644
--- a/ldap/admin/src/scripts/template-db2ldif.pl.in
+++ b/ldap/admin/src/scripts/template-db2ldif.pl.in
@@ -258,9 +258,26 @@ $entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsreplica}${
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
print("Exporting to ldif file: ${ldiffile}\n");
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-dbverify.in b/ldap/admin/src/scripts/template-dbverify.in
index 0f71450..8c1a98e 100755
--- a/ldap/admin/src/scripts/template-dbverify.in
+++ b/ldap/admin/src/scripts/template-dbverify.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-dn2rdn.in b/ldap/admin/src/scripts/template-dn2rdn.in
index f9efeea..a9402fd 100755
--- a/ldap/admin/src/scripts/template-dn2rdn.in
+++ b/ldap/admin/src/scripts/template-dn2rdn.in
@@ -4,10 +4,16 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in b/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
index 1745f80..f181a7a 100644
--- a/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
+++ b/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
@@ -61,8 +61,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -150,3 +155,15 @@ $entry = "${dn}${misc}${cn}${basedn}${linkdn}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-fixup-memberof.pl.in b/ldap/admin/src/scripts/template-fixup-memberof.pl.in
index 547379f..b43c21a 100644
--- a/ldap/admin/src/scripts/template-fixup-memberof.pl.in
+++ b/ldap/admin/src/scripts/template-fixup-memberof.pl.in
@@ -65,8 +65,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -161,3 +166,15 @@ $entry = "${dn}${misc}${cn}${basedn}${filter}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ldif2db.in b/ldap/admin/src/scripts/template-ldif2db.in
index ce64193..8f92acf 100755
--- a/ldap/admin/src/scripts/template-ldif2db.in
+++ b/ldap/admin/src/scripts/template-ldif2db.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-ldif2db.pl.in b/ldap/admin/src/scripts/template-ldif2db.pl.in
index da6073b..089c95d 100644
--- a/ldap/admin/src/scripts/template-ldif2db.pl.in
+++ b/ldap/admin/src/scripts/template-ldif2db.pl.in
@@ -217,8 +217,25 @@ $entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsldiffiles}
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ldif2ldap.in b/ldap/admin/src/scripts/template-ldif2ldap.in
index 4f94489..ab32f48 100755
--- a/ldap/admin/src/scripts/template-ldif2ldap.in
+++ b/ldap/admin/src/scripts/template-ldif2ldap.in
@@ -5,10 +5,21 @@ if [ "$prefix" = "/" ] ; then
prefix=""
fi
-PATH=$prefix@ldaptool_bindir@:@ldaptool_bindir@
-LD_LIBRARY_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix@ldapsdk_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
+PATH=$prefix@ldaptool_bindir@:@ldaptool_bindir@
+
ldapmodify @ldaptool_opts@ -a -p {{SERVER-PORT}} -D "$1" -w "$2" -f $3
diff --git a/ldap/admin/src/scripts/template-monitor.in b/ldap/admin/src/scripts/template-monitor.in
index 6cbde87..49ac960 100755
--- a/ldap/admin/src/scripts/template-monitor.in
+++ b/ldap/admin/src/scripts/template-monitor.in
@@ -1,11 +1,22 @@
#!/bin/sh
-PATH=$prefix@ldaptool_bindir@:@ldaptool_bindir@
-LD_LIBRARY_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix@ldapsdk_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
+PATH=$prefix@ldaptool_bindir@:@ldaptool_bindir@
+
if [ "x$1" != "x" ];
then MDN="$1";
else MDN="cn=monitor";
diff --git a/ldap/admin/src/scripts/template-ns-accountstatus.pl.in b/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
index 7769ce2..8e2e590 100644
--- a/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
+++ b/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
@@ -393,8 +393,13 @@ else
debug("Running ** $cmd ** $operation\n");
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$ldapsearch="ldapsearch @ldaptool_opts@ @plainldif_opts@";
$ldapmodify="ldapmodify @ldaptool_opts@";
@@ -842,3 +847,15 @@ debug("$modrole, $entry\n");
out("$entry $state.\n");
exit 0;
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ns-activate.pl.in b/ldap/admin/src/scripts/template-ns-activate.pl.in
index 7769ce2..8e2e590 100644
--- a/ldap/admin/src/scripts/template-ns-activate.pl.in
+++ b/ldap/admin/src/scripts/template-ns-activate.pl.in
@@ -393,8 +393,13 @@ else
debug("Running ** $cmd ** $operation\n");
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$ldapsearch="ldapsearch @ldaptool_opts@ @plainldif_opts@";
$ldapmodify="ldapmodify @ldaptool_opts@";
@@ -842,3 +847,15 @@ debug("$modrole, $entry\n");
out("$entry $state.\n");
exit 0;
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ns-inactivate.pl.in b/ldap/admin/src/scripts/template-ns-inactivate.pl.in
index 7769ce2..8e2e590 100644
--- a/ldap/admin/src/scripts/template-ns-inactivate.pl.in
+++ b/ldap/admin/src/scripts/template-ns-inactivate.pl.in
@@ -393,8 +393,13 @@ else
debug("Running ** $cmd ** $operation\n");
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$ldapsearch="ldapsearch @ldaptool_opts@ @plainldif_opts@";
$ldapmodify="ldapmodify @ldaptool_opts@";
@@ -842,3 +847,15 @@ debug("$modrole, $entry\n");
out("$entry $state.\n");
exit 0;
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in
index 5d158bd..7e99719 100755
--- a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in
+++ b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in
@@ -47,8 +47,13 @@ use lib qw(@perlpath@);
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
# Add new password policy specific entries
#############################################################################
@@ -283,3 +288,15 @@ sub usage {
}
} # end of $opt_U
}
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-restoreconfig.in b/ldap/admin/src/scripts/template-restoreconfig.in
index 0e5de9b..480af88 100755
--- a/ldap/admin/src/scripts/template-restoreconfig.in
+++ b/ldap/admin/src/scripts/template-restoreconfig.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-saveconfig.in b/ldap/admin/src/scripts/template-saveconfig.in
index 737c97b..4c8f3d6 100755
--- a/ldap/admin/src/scripts/template-saveconfig.in
+++ b/ldap/admin/src/scripts/template-saveconfig.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-schema-reload.pl.in b/ldap/admin/src/scripts/template-schema-reload.pl.in
index 364c2b0..f7a1dbb 100644
--- a/ldap/admin/src/scripts/template-schema-reload.pl.in
+++ b/ldap/admin/src/scripts/template-schema-reload.pl.in
@@ -60,8 +60,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -150,3 +155,15 @@ $entry = "${dn}${misc}${cn}${basedn}${schemadir}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-suffix2instance.in b/ldap/admin/src/scripts/template-suffix2instance.in
index 994f8af..8186ef8 100755
--- a/ldap/admin/src/scripts/template-suffix2instance.in
+++ b/ldap/admin/src/scripts/template-suffix2instance.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-syntax-validate.pl.in b/ldap/admin/src/scripts/template-syntax-validate.pl.in
index b5fb796..b87e12d 100644
--- a/ldap/admin/src/scripts/template-syntax-validate.pl.in
+++ b/ldap/admin/src/scripts/template-syntax-validate.pl.in
@@ -65,8 +65,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -161,3 +166,15 @@ $entry = "${dn}${misc}${cn}${basedn}${filter}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-upgradedb.in b/ldap/admin/src/scripts/template-upgradedb.in
index 9b6f03d..a36acc6 100755
--- a/ldap/admin/src/scripts/template-upgradedb.in
+++ b/ldap/admin/src/scripts/template-upgradedb.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-upgradednformat.in b/ldap/admin/src/scripts/template-upgradednformat.in
index ea4f18a..d1ff5c8 100755
--- a/ldap/admin/src/scripts/template-upgradednformat.in
+++ b/ldap/admin/src/scripts/template-upgradednformat.in
@@ -11,10 +11,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in b/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
index 53e4cea..3e17be0 100644
--- a/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
+++ b/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
@@ -64,8 +64,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -178,3 +183,15 @@ $entry = "${dn}${misc}${cn}${basedn}${args}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-verify-db.pl.in b/ldap/admin/src/scripts/template-verify-db.pl.in
index 25bb46b..c352eb2 100644
--- a/ldap/admin/src/scripts/template-verify-db.pl.in
+++ b/ldap/admin/src/scripts/template-verify-db.pl.in
@@ -170,8 +170,11 @@ my $dbdirs = getDbDir($startpoint);
my $prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "{{INST-DIR}}:$prefix@db_bindir@:$prefix/usr/bin:@db_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "@db_libdir@:@libdir@";
-$ENV{'SHLIB_PATH'} = "@db_libdir@:@libdir@";
+
+libpath_add("@db_libdir@");
+libpath_add("@libdir@");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
# Check transaction logs by db_printlog
for (my $i = 0; "$$dbdirs[$i]" ne ""; $i++)
@@ -256,3 +259,15 @@ else
print "Good\n";
exit(0);
}
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-vlvindex.in b/ldap/admin/src/scripts/template-vlvindex.in
index e6cd743..193667a 100755
--- a/ldap/admin/src/scripts/template-vlvindex.in
+++ b/ldap/admin/src/scripts/template-vlvindex.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/wrappers/cl-dump.in b/wrappers/cl-dump.in
index 9a6301a..d42c6f2 100755
--- a/wrappers/cl-dump.in
+++ b/wrappers/cl-dump.in
@@ -43,8 +43,15 @@
# wrapper for cl-dump.pl
# set the library paths and call cl-dump.pl
-LD_LIBRARY_PATH=@nss_libdir@:/usr/lib
-SHLIB_PATH=@nss_libdir@:/usr/lib
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "/usr/lib"
+
+SHLIB_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH SHLIB_PATH
@bindir(a)/cl-dump.pl "$@"
diff --git a/wrappers/dbscan.in b/wrappers/dbscan.in
index 115a126..942ffc9 100755
--- a/wrappers/dbscan.in
+++ b/wrappers/dbscan.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nspr_libdir@:@db_libdir@
BIN_DIR=@bindir@
COMMAND=dbscan-bin
@@ -14,7 +13,14 @@ COMMAND=dbscan-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nspr_libdir@"
+libpath_add "@db_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/infadd.in b/wrappers/infadd.in
index 89eb0ea..3ebc40b 100755
--- a/wrappers/infadd.in
+++ b/wrappers/infadd.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=infadd-bin
@@ -14,7 +13,16 @@ COMMAND=infadd-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/initscript.in b/wrappers/initscript.in
index 147b2d6..7632749 100644
--- a/wrappers/initscript.in
+++ b/wrappers/initscript.in
@@ -60,6 +60,11 @@ success()
}
}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
# On Solaris /var/run is in tmpfs and gets wiped out upon reboot
# we have to recreate the /var/run/@package_name@ directory
# We also have to make sure that the directory is writable
@@ -150,7 +155,10 @@ if [ -n "$2" ]; then
fi
start() {
- LD_LIBRARY_PATH=@libdir@/@package_name@:@nss_libdir@:@pcre_libdir@
+ libpath_add "@libdir@/@package_name@"
+ libpath_add "@nss_libdir@"
+ libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
echo "Starting $prog: "
# Start every slapd instance that isn't already running
diff --git a/wrappers/ldap-agent.in b/wrappers/ldap-agent.in
index 266507a..62c3d6e 100755
--- a/wrappers/ldap-agent.in
+++ b/wrappers/ldap-agent.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@netsnmp_libdir@
BIN_DIR=@sbindir@
COMMAND=ldap-agent-bin
@@ -17,7 +16,16 @@ export MIBS
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@netsnmp_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/ldclt.in b/wrappers/ldclt.in
index 079e33c..7f0a3cc 100755
--- a/wrappers/ldclt.in
+++ b/wrappers/ldclt.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=ldclt-bin
@@ -14,7 +13,16 @@ COMMAND=ldclt-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
SASL_PATH=@sasl_path@
export SASL_PATH
diff --git a/wrappers/ldif.in b/wrappers/ldif.in
index 8fcaf17..5407920 100755
--- a/wrappers/ldif.in
+++ b/wrappers/ldif.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=ldif-bin
@@ -14,7 +13,16 @@ COMMAND=ldif-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/migratecred.in b/wrappers/migratecred.in
index dd44800..49de8d7 100755
--- a/wrappers/migratecred.in
+++ b/wrappers/migratecred.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@serverdir@:@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@pcre_libdir@
BIN_DIR=@bindir@
COMMAND=migratecred-bin
@@ -14,7 +13,18 @@ COMMAND=migratecred-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@serverdir@"
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/mmldif.in b/wrappers/mmldif.in
index a11932e..aa09bae 100755
--- a/wrappers/mmldif.in
+++ b/wrappers/mmldif.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@serverdir@:@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@pcre_libdir@
BIN_DIR=@bindir@
COMMAND=mmldif-bin
@@ -14,7 +13,18 @@ COMMAND=mmldif-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@serverdir@"
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/pwdhash.in b/wrappers/pwdhash.in
index b3ef3fa..69618fa 100755
--- a/wrappers/pwdhash.in
+++ b/wrappers/pwdhash.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@serverdir@:@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@pcre_libdir@
BIN_DIR=@bindir@
COMMAND=pwdhash-bin
@@ -14,7 +13,18 @@ COMMAND=pwdhash-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@serverdir@"
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/repl-monitor.in b/wrappers/repl-monitor.in
index 116dbb5..cba72a1 100755
--- a/wrappers/repl-monitor.in
+++ b/wrappers/repl-monitor.in
@@ -43,8 +43,15 @@
# wrapper for repl-monitor.pl
# set the library paths and call repl-monitor.pl
-LD_LIBRARY_PATH=@nss_libdir@:/usr/lib
-SHLIB_PATH=@nss_libdir@:/usr/lib
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "/usr/lib"
+
+SHLIB_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH SHLIB_PATH
@bindir(a)/repl-monitor.pl "$@"
diff --git a/wrappers/rsearch.in b/wrappers/rsearch.in
index cebecf1..a78abd7 100755
--- a/wrappers/rsearch.in
+++ b/wrappers/rsearch.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=rsearch-bin
@@ -14,7 +13,16 @@ COMMAND=rsearch-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
commit 98d3dd916d9ee91e9802c147cf06b193fbc4d99f
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Tue Jan 25 14:52:13 2011 -0800
Bug 671199 - Don't allow other to write to rundir
The persmissions on /var/run/dirsrv currently get set to 777 by
the setup program. There were some discrepencies with the way the
changeOwnerMode subroutine is used that cause 777 to be the mode
set when we intended for it to be 770. This patch fixes up the
way changeOwnerMode is used to sllow one to reset the group
ownership without altering the permissions for other.
In addition, this patch makes an upgrade remove any permissions that
are set for other on the rundir.
diff --git a/ldap/admin/src/scripts/10fixrundir.pl b/ldap/admin/src/scripts/10fixrundir.pl
index a1e7524..b7a395c 100644
--- a/ldap/admin/src/scripts/10fixrundir.pl
+++ b/ldap/admin/src/scripts/10fixrundir.pl
@@ -6,6 +6,7 @@ sub runinst {
my ($inf, $inst, $dseldif, $conn) = @_;
my @errs;
+ my $mode;
# see if nsslapd-rundir is defined
my $ent = $conn->search("cn=config", "base", "(objectclass=*)");
@@ -24,5 +25,15 @@ sub runinst {
}
}
+ # ensure that other doesn't have permissions on rundir
+ $mode = (stat($inf->{slapd}->{run_dir}))[2] or return ('error_chmoding_file', $inf->{slapd}->{run_dir}, $!);
+ # mask off permissions for other
+ $mode &= 07770;
+ $! = 0; # clear errno
+ chmod $mode, $inf->{slapd}->{run_dir};
+ if ($!) {
+ return ('error_chmoding_file', $inf->{slapd}->{run_dir}, $!);
+ }
+
return ();
}
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index d0dc209..bda23a5 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -163,6 +163,7 @@ sub changeOwnerMode {
my $mode = shift;
my $it = shift;
my $gidonly = shift;
+ my $othermode = shift;
my $uid = getpwnam $inf->{General}->{SuiteSpotUserID};
my $gid = -1; # default to leave it alone
@@ -172,7 +173,8 @@ sub changeOwnerMode {
$gid = getgrnam $inf->{General}->{SuiteSpotGroup};
}
- $mode = getMode($inf, $mode, $gidonly);
+ $mode = getMode($inf, $mode, $othermode);
+
$! = 0; # clear errno
chmod $mode, $it;
if ($!) {
@@ -238,9 +240,8 @@ sub makeDSDirs {
debug(3, "Root user " . $inf->{General}->{SuiteSpotUserID} . " already has access to $inf->{slapd}->{run_dir} - skipping\n");
} else {
my $dir = $inf->{slapd}->{run_dir};
- # rwx by user only, or by user & group if a group is defined
- @errs = changeOwnerMode($inf, 7, $dir, 7);
- debug(3, "Changed owner of $dir to " . $inf->{General}->{SuiteSpotUserID} . ": error @errs\n");
+ # rwx by user only, or by user & group if a group is defined. Also only change the group ownership.
+ @errs = changeOwnerMode($inf, 7, $dir, 1);
debug(3, "\t" . `/bin/ls -ld $dir`);
}
# set the group of the parent dir of config_dir and inst_dir
@@ -248,8 +249,8 @@ sub makeDSDirs {
for my $kw (qw(inst_dir config_dir)) {
my $dir = $inf->{slapd}->{$kw};
my $parent = dirname($dir);
- # changeOwnerMode(inf, mode, file, gidonly & default mode);
- @errs = changeOwnerMode($inf, 7, $parent, 5);
+ # changeOwnerMode(inf, mode, file, gidonly, othermode);
+ @errs = changeOwnerMode($inf, 7, $parent, 1, 5);
if (@errs) {
return @errs;
}
13 years, 2 months
ldap/admin wrappers/cl-dump.in wrappers/dbscan.in wrappers/infadd.in wrappers/initscript.in wrappers/ldap-agent.in wrappers/ldclt.in wrappers/ldif.in wrappers/migratecred.in wrappers/mmldif.in wrappers/pwdhash.in wrappers/repl-monitor.in wrappers/rsearch.in
by Nathan Kinder
ldap/admin/src/scripts/start-dirsrv.in | 15 +++++++-
ldap/admin/src/scripts/template-bak2db.in | 15 ++++++--
ldap/admin/src/scripts/template-bak2db.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-db2bak.in | 15 ++++++--
ldap/admin/src/scripts/template-db2bak.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-db2index.in | 14 +++++---
ldap/admin/src/scripts/template-db2index.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-db2ldif.in | 15 ++++++--
ldap/admin/src/scripts/template-db2ldif.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-dbverify.in | 15 ++++++--
ldap/admin/src/scripts/template-dn2rdn.in | 14 +++++---
ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-fixup-memberof.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ldif2db.in | 15 ++++++--
ldap/admin/src/scripts/template-ldif2db.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ldif2ldap.in | 17 ++++++++-
ldap/admin/src/scripts/template-monitor.in | 17 ++++++++-
ldap/admin/src/scripts/template-ns-accountstatus.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ns-activate.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ns-inactivate.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-restoreconfig.in | 15 +++++++-
ldap/admin/src/scripts/template-saveconfig.in | 15 +++++++-
ldap/admin/src/scripts/template-schema-reload.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-suffix2instance.in | 15 +++++++-
ldap/admin/src/scripts/template-syntax-validate.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-upgradedb.in | 15 +++++++-
ldap/admin/src/scripts/template-upgradednformat.in | 15 ++++++--
ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in | 21 ++++++++++--
ldap/admin/src/scripts/template-verify-db.pl.in | 19 +++++++++-
ldap/admin/src/scripts/template-vlvindex.in | 15 +++++++-
wrappers/cl-dump.in | 11 +++++-
wrappers/dbscan.in | 10 ++++-
wrappers/infadd.in | 12 +++++-
wrappers/initscript.in | 10 +++++
wrappers/ldap-agent.in | 12 +++++-
wrappers/ldclt.in | 12 +++++-
wrappers/ldif.in | 12 +++++-
wrappers/migratecred.in | 14 ++++++--
wrappers/mmldif.in | 14 ++++++--
wrappers/pwdhash.in | 14 ++++++--
wrappers/repl-monitor.in | 11 +++++-
wrappers/rsearch.in | 12 +++++-
43 files changed, 596 insertions(+), 103 deletions(-)
New commits:
commit ce0dc222c36ed4b8ca3936e800e28cb26d64d9f5
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Thu Jan 27 12:10:01 2011 -0800
Bug 672468 - Don't use empty path elements in LD_LIBRARY_PATH
Many of the command line wrappers and perl scripts have their
LD_LIBRARY_PATH and SHLIB_PATH defined with macros that are
replaced by configure. It is common for some of these macros
to be empty, which results in empty path elements.
This patch adds a bit more logic to the creation of the libpath
to avoid empty path elements and leading and trailing colons.
diff --git a/ldap/admin/src/scripts/start-dirsrv.in b/ldap/admin/src/scripts/start-dirsrv.in
index d7144d1..291c821 100755
--- a/ldap/admin/src/scripts/start-dirsrv.in
+++ b/ldap/admin/src/scripts/start-dirsrv.in
@@ -6,6 +6,11 @@
# 1: Server could not be started
# 2: Server already running
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
# Starts a single instance
start_instance() {
# The first argument is the server ID. Anything
@@ -22,9 +27,15 @@ start_instance() {
fi
prefix="$DS_ROOT"
- LD_LIBRARY_PATH=$prefix$SERVER_DIR:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:@pcre_libdir@
+
+ libpath_add "$prefix$SERVER_DIR"
+ libpath_add "$prefix@nss_libdir@"
+ libpath_add "$prefix@libdir@"
+ libpath_add "@nss_libdir@"
+ libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
- SHLIB_PATH=$prefix$SERVER_DIR:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:@pcre_libdir@
+ SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
DS_CONFIG_DIR=$CONFIG_DIR
diff --git a/ldap/admin/src/scripts/template-bak2db.in b/ldap/admin/src/scripts/template-bak2db.in
index 0f92667..b081839 100755
--- a/ldap/admin/src/scripts/template-bak2db.in
+++ b/ldap/admin/src/scripts/template-bak2db.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-bak2db.pl.in b/ldap/admin/src/scripts/template-bak2db.pl.in
index 4cd51ab..4ab79cc 100644
--- a/ldap/admin/src/scripts/template-bak2db.pl.in
+++ b/ldap/admin/src/scripts/template-bak2db.pl.in
@@ -125,8 +125,25 @@ $entry = "${dn}${misc}${cn}${nsinstance}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-db2bak.in b/ldap/admin/src/scripts/template-db2bak.in
index 5ff5d07..d89f6ee 100755
--- a/ldap/admin/src/scripts/template-db2bak.in
+++ b/ldap/admin/src/scripts/template-db2bak.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-db2bak.pl.in b/ldap/admin/src/scripts/template-db2bak.pl.in
index b443f0b..8a0cb1c 100644
--- a/ldap/admin/src/scripts/template-db2bak.pl.in
+++ b/ldap/admin/src/scripts/template-db2bak.pl.in
@@ -114,9 +114,26 @@ $entry = "${dn}${misc}${cn}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
print("Back up directory: $archivedir\n");
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-db2index.in b/ldap/admin/src/scripts/template-db2index.in
index e0e9a55..3dc4740 100755
--- a/ldap/admin/src/scripts/template-db2index.in
+++ b/ldap/admin/src/scripts/template-db2index.in
@@ -4,10 +4,16 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-db2index.pl.in b/ldap/admin/src/scripts/template-db2index.pl.in
index eb58957..e598b05 100644
--- a/ldap/admin/src/scripts/template-db2index.pl.in
+++ b/ldap/admin/src/scripts/template-db2index.pl.in
@@ -69,8 +69,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -224,3 +229,15 @@ $entry = "${dn}${misc}${cn}${nsinstance}${attribute}${vlvattribute}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-db2ldif.in b/ldap/admin/src/scripts/template-db2ldif.in
index e519f3e..2989b77 100755
--- a/ldap/admin/src/scripts/template-db2ldif.in
+++ b/ldap/admin/src/scripts/template-db2ldif.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-db2ldif.pl.in b/ldap/admin/src/scripts/template-db2ldif.pl.in
index 2db6421..a4929ba 100644
--- a/ldap/admin/src/scripts/template-db2ldif.pl.in
+++ b/ldap/admin/src/scripts/template-db2ldif.pl.in
@@ -258,9 +258,26 @@ $entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsreplica}${
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
print("Exporting to ldif file: ${ldiffile}\n");
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-dbverify.in b/ldap/admin/src/scripts/template-dbverify.in
index 0f71450..8c1a98e 100755
--- a/ldap/admin/src/scripts/template-dbverify.in
+++ b/ldap/admin/src/scripts/template-dbverify.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-dn2rdn.in b/ldap/admin/src/scripts/template-dn2rdn.in
index f9efeea..a9402fd 100755
--- a/ldap/admin/src/scripts/template-dn2rdn.in
+++ b/ldap/admin/src/scripts/template-dn2rdn.in
@@ -4,10 +4,16 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in b/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
index 1745f80..f181a7a 100644
--- a/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
+++ b/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
@@ -61,8 +61,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -150,3 +155,15 @@ $entry = "${dn}${misc}${cn}${basedn}${linkdn}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-fixup-memberof.pl.in b/ldap/admin/src/scripts/template-fixup-memberof.pl.in
index 547379f..b43c21a 100644
--- a/ldap/admin/src/scripts/template-fixup-memberof.pl.in
+++ b/ldap/admin/src/scripts/template-fixup-memberof.pl.in
@@ -65,8 +65,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -161,3 +166,15 @@ $entry = "${dn}${misc}${cn}${basedn}${filter}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ldif2db.in b/ldap/admin/src/scripts/template-ldif2db.in
index ce64193..8f92acf 100755
--- a/ldap/admin/src/scripts/template-ldif2db.in
+++ b/ldap/admin/src/scripts/template-ldif2db.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-ldif2db.pl.in b/ldap/admin/src/scripts/template-ldif2db.pl.in
index da6073b..089c95d 100644
--- a/ldap/admin/src/scripts/template-ldif2db.pl.in
+++ b/ldap/admin/src/scripts/template-ldif2db.pl.in
@@ -217,8 +217,25 @@ $entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsldiffiles}
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ldif2ldap.in b/ldap/admin/src/scripts/template-ldif2ldap.in
index 4f94489..ab32f48 100755
--- a/ldap/admin/src/scripts/template-ldif2ldap.in
+++ b/ldap/admin/src/scripts/template-ldif2ldap.in
@@ -5,10 +5,21 @@ if [ "$prefix" = "/" ] ; then
prefix=""
fi
-PATH=$prefix@ldaptool_bindir@:@ldaptool_bindir@
-LD_LIBRARY_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix@ldapsdk_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
+PATH=$prefix@ldaptool_bindir@:@ldaptool_bindir@
+
ldapmodify @ldaptool_opts@ -a -p {{SERVER-PORT}} -D "$1" -w "$2" -f $3
diff --git a/ldap/admin/src/scripts/template-monitor.in b/ldap/admin/src/scripts/template-monitor.in
index 6cbde87..49ac960 100755
--- a/ldap/admin/src/scripts/template-monitor.in
+++ b/ldap/admin/src/scripts/template-monitor.in
@@ -1,11 +1,22 @@
#!/bin/sh
-PATH=$prefix@ldaptool_bindir@:@ldaptool_bindir@
-LD_LIBRARY_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix@ldapsdk_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
+PATH=$prefix@ldaptool_bindir@:@ldaptool_bindir@
+
if [ "x$1" != "x" ];
then MDN="$1";
else MDN="cn=monitor";
diff --git a/ldap/admin/src/scripts/template-ns-accountstatus.pl.in b/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
index 7769ce2..8e2e590 100644
--- a/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
+++ b/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
@@ -393,8 +393,13 @@ else
debug("Running ** $cmd ** $operation\n");
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$ldapsearch="ldapsearch @ldaptool_opts@ @plainldif_opts@";
$ldapmodify="ldapmodify @ldaptool_opts@";
@@ -842,3 +847,15 @@ debug("$modrole, $entry\n");
out("$entry $state.\n");
exit 0;
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ns-activate.pl.in b/ldap/admin/src/scripts/template-ns-activate.pl.in
index 7769ce2..8e2e590 100644
--- a/ldap/admin/src/scripts/template-ns-activate.pl.in
+++ b/ldap/admin/src/scripts/template-ns-activate.pl.in
@@ -393,8 +393,13 @@ else
debug("Running ** $cmd ** $operation\n");
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$ldapsearch="ldapsearch @ldaptool_opts@ @plainldif_opts@";
$ldapmodify="ldapmodify @ldaptool_opts@";
@@ -842,3 +847,15 @@ debug("$modrole, $entry\n");
out("$entry $state.\n");
exit 0;
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ns-inactivate.pl.in b/ldap/admin/src/scripts/template-ns-inactivate.pl.in
index 7769ce2..8e2e590 100644
--- a/ldap/admin/src/scripts/template-ns-inactivate.pl.in
+++ b/ldap/admin/src/scripts/template-ns-inactivate.pl.in
@@ -393,8 +393,13 @@ else
debug("Running ** $cmd ** $operation\n");
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$ldapsearch="ldapsearch @ldaptool_opts@ @plainldif_opts@";
$ldapmodify="ldapmodify @ldaptool_opts@";
@@ -842,3 +847,15 @@ debug("$modrole, $entry\n");
out("$entry $state.\n");
exit 0;
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in
index 5d158bd..7e99719 100755
--- a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in
+++ b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in
@@ -47,8 +47,13 @@ use lib qw(@perlpath@);
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
# Add new password policy specific entries
#############################################################################
@@ -283,3 +288,15 @@ sub usage {
}
} # end of $opt_U
}
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-restoreconfig.in b/ldap/admin/src/scripts/template-restoreconfig.in
index 0e5de9b..480af88 100755
--- a/ldap/admin/src/scripts/template-restoreconfig.in
+++ b/ldap/admin/src/scripts/template-restoreconfig.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-saveconfig.in b/ldap/admin/src/scripts/template-saveconfig.in
index 737c97b..4c8f3d6 100755
--- a/ldap/admin/src/scripts/template-saveconfig.in
+++ b/ldap/admin/src/scripts/template-saveconfig.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-schema-reload.pl.in b/ldap/admin/src/scripts/template-schema-reload.pl.in
index 364c2b0..f7a1dbb 100644
--- a/ldap/admin/src/scripts/template-schema-reload.pl.in
+++ b/ldap/admin/src/scripts/template-schema-reload.pl.in
@@ -60,8 +60,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -150,3 +155,15 @@ $entry = "${dn}${misc}${cn}${basedn}${schemadir}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-suffix2instance.in b/ldap/admin/src/scripts/template-suffix2instance.in
index 994f8af..8186ef8 100755
--- a/ldap/admin/src/scripts/template-suffix2instance.in
+++ b/ldap/admin/src/scripts/template-suffix2instance.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-syntax-validate.pl.in b/ldap/admin/src/scripts/template-syntax-validate.pl.in
index b5fb796..b87e12d 100644
--- a/ldap/admin/src/scripts/template-syntax-validate.pl.in
+++ b/ldap/admin/src/scripts/template-syntax-validate.pl.in
@@ -65,8 +65,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -161,3 +166,15 @@ $entry = "${dn}${misc}${cn}${basedn}${filter}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-upgradedb.in b/ldap/admin/src/scripts/template-upgradedb.in
index 9b6f03d..a36acc6 100755
--- a/ldap/admin/src/scripts/template-upgradedb.in
+++ b/ldap/admin/src/scripts/template-upgradedb.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-upgradednformat.in b/ldap/admin/src/scripts/template-upgradednformat.in
index ea4f18a..d1ff5c8 100755
--- a/ldap/admin/src/scripts/template-upgradednformat.in
+++ b/ldap/admin/src/scripts/template-upgradednformat.in
@@ -11,10 +11,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in b/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
index 53e4cea..3e17be0 100644
--- a/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
+++ b/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
@@ -64,8 +64,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldaptool_bindir@:$prefix/usr/bin:@ldaptool_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -178,3 +183,15 @@ $entry = "${dn}${misc}${cn}${basedn}${args}";
open(FOO, "| ldapmodify @ldaptool_opts@ $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-verify-db.pl.in b/ldap/admin/src/scripts/template-verify-db.pl.in
index 25bb46b..c352eb2 100644
--- a/ldap/admin/src/scripts/template-verify-db.pl.in
+++ b/ldap/admin/src/scripts/template-verify-db.pl.in
@@ -170,8 +170,11 @@ my $dbdirs = getDbDir($startpoint);
my $prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "{{INST-DIR}}:$prefix@db_bindir@:$prefix/usr/bin:@db_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "@db_libdir@:@libdir@";
-$ENV{'SHLIB_PATH'} = "@db_libdir@:@libdir@";
+
+libpath_add("@db_libdir@");
+libpath_add("@libdir@");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
# Check transaction logs by db_printlog
for (my $i = 0; "$$dbdirs[$i]" ne ""; $i++)
@@ -256,3 +259,15 @@ else
print "Good\n";
exit(0);
}
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-vlvindex.in b/ldap/admin/src/scripts/template-vlvindex.in
index e6cd743..193667a 100755
--- a/ldap/admin/src/scripts/template-vlvindex.in
+++ b/ldap/admin/src/scripts/template-vlvindex.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/wrappers/cl-dump.in b/wrappers/cl-dump.in
index 9a6301a..d42c6f2 100755
--- a/wrappers/cl-dump.in
+++ b/wrappers/cl-dump.in
@@ -43,8 +43,15 @@
# wrapper for cl-dump.pl
# set the library paths and call cl-dump.pl
-LD_LIBRARY_PATH=@nss_libdir@:/usr/lib
-SHLIB_PATH=@nss_libdir@:/usr/lib
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "/usr/lib"
+
+SHLIB_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH SHLIB_PATH
@bindir(a)/cl-dump.pl "$@"
diff --git a/wrappers/dbscan.in b/wrappers/dbscan.in
index 115a126..942ffc9 100755
--- a/wrappers/dbscan.in
+++ b/wrappers/dbscan.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nspr_libdir@:@db_libdir@
BIN_DIR=@bindir@
COMMAND=dbscan-bin
@@ -14,7 +13,14 @@ COMMAND=dbscan-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nspr_libdir@"
+libpath_add "@db_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/infadd.in b/wrappers/infadd.in
index 89eb0ea..3ebc40b 100755
--- a/wrappers/infadd.in
+++ b/wrappers/infadd.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=infadd-bin
@@ -14,7 +13,16 @@ COMMAND=infadd-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/initscript.in b/wrappers/initscript.in
index 147b2d6..7632749 100644
--- a/wrappers/initscript.in
+++ b/wrappers/initscript.in
@@ -60,6 +60,11 @@ success()
}
}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
# On Solaris /var/run is in tmpfs and gets wiped out upon reboot
# we have to recreate the /var/run/@package_name@ directory
# We also have to make sure that the directory is writable
@@ -150,7 +155,10 @@ if [ -n "$2" ]; then
fi
start() {
- LD_LIBRARY_PATH=@libdir@/@package_name@:@nss_libdir@:@pcre_libdir@
+ libpath_add "@libdir@/@package_name@"
+ libpath_add "@nss_libdir@"
+ libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
echo "Starting $prog: "
# Start every slapd instance that isn't already running
diff --git a/wrappers/ldap-agent.in b/wrappers/ldap-agent.in
index 266507a..62c3d6e 100755
--- a/wrappers/ldap-agent.in
+++ b/wrappers/ldap-agent.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@netsnmp_libdir@
BIN_DIR=@sbindir@
COMMAND=ldap-agent-bin
@@ -17,7 +16,16 @@ export MIBS
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@netsnmp_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/ldclt.in b/wrappers/ldclt.in
index 079e33c..7f0a3cc 100755
--- a/wrappers/ldclt.in
+++ b/wrappers/ldclt.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=ldclt-bin
@@ -14,7 +13,16 @@ COMMAND=ldclt-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
SASL_PATH=@sasl_path@
export SASL_PATH
diff --git a/wrappers/ldif.in b/wrappers/ldif.in
index 8fcaf17..5407920 100755
--- a/wrappers/ldif.in
+++ b/wrappers/ldif.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=ldif-bin
@@ -14,7 +13,16 @@ COMMAND=ldif-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/migratecred.in b/wrappers/migratecred.in
index dd44800..49de8d7 100755
--- a/wrappers/migratecred.in
+++ b/wrappers/migratecred.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@serverdir@:@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@pcre_libdir@
BIN_DIR=@bindir@
COMMAND=migratecred-bin
@@ -14,7 +13,18 @@ COMMAND=migratecred-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@serverdir@"
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/mmldif.in b/wrappers/mmldif.in
index a11932e..aa09bae 100755
--- a/wrappers/mmldif.in
+++ b/wrappers/mmldif.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@serverdir@:@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@pcre_libdir@
BIN_DIR=@bindir@
COMMAND=mmldif-bin
@@ -14,7 +13,18 @@ COMMAND=mmldif-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@serverdir@"
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/pwdhash.in b/wrappers/pwdhash.in
index b3ef3fa..69618fa 100755
--- a/wrappers/pwdhash.in
+++ b/wrappers/pwdhash.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@serverdir@:@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@pcre_libdir@
BIN_DIR=@bindir@
COMMAND=pwdhash-bin
@@ -14,7 +13,18 @@ COMMAND=pwdhash-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@serverdir@"
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/repl-monitor.in b/wrappers/repl-monitor.in
index 116dbb5..cba72a1 100755
--- a/wrappers/repl-monitor.in
+++ b/wrappers/repl-monitor.in
@@ -43,8 +43,15 @@
# wrapper for repl-monitor.pl
# set the library paths and call repl-monitor.pl
-LD_LIBRARY_PATH=@nss_libdir@:/usr/lib
-SHLIB_PATH=@nss_libdir@:/usr/lib
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "/usr/lib"
+
+SHLIB_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH SHLIB_PATH
@bindir(a)/repl-monitor.pl "$@"
diff --git a/wrappers/rsearch.in b/wrappers/rsearch.in
index cebecf1..a78abd7 100755
--- a/wrappers/rsearch.in
+++ b/wrappers/rsearch.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=rsearch-bin
@@ -14,7 +13,16 @@ COMMAND=rsearch-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
13 years, 2 months
ldap/admin
by Nathan Kinder
ldap/admin/src/scripts/10fixrundir.pl | 11 +++++++++++
ldap/admin/src/scripts/DSCreate.pm.in | 13 +++++++------
2 files changed, 18 insertions(+), 6 deletions(-)
New commits:
commit 5135d9a3da96d779167d7ee731d3e50890bf74ec
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Tue Jan 25 14:52:13 2011 -0800
Bug 671199 - Don't allow other to write to rundir
The persmissions on /var/run/dirsrv currently get set to 777 by
the setup program. There were some discrepencies with the way the
changeOwnerMode subroutine is used that cause 777 to be the mode
set when we intended for it to be 770. This patch fixes up the
way changeOwnerMode is used to sllow one to reset the group
ownership without altering the permissions for other.
In addition, this patch makes an upgrade remove any permissions that
are set for other on the rundir.
diff --git a/ldap/admin/src/scripts/10fixrundir.pl b/ldap/admin/src/scripts/10fixrundir.pl
index a1e7524..b7a395c 100644
--- a/ldap/admin/src/scripts/10fixrundir.pl
+++ b/ldap/admin/src/scripts/10fixrundir.pl
@@ -6,6 +6,7 @@ sub runinst {
my ($inf, $inst, $dseldif, $conn) = @_;
my @errs;
+ my $mode;
# see if nsslapd-rundir is defined
my $ent = $conn->search("cn=config", "base", "(objectclass=*)");
@@ -24,5 +25,15 @@ sub runinst {
}
}
+ # ensure that other doesn't have permissions on rundir
+ $mode = (stat($inf->{slapd}->{run_dir}))[2] or return ('error_chmoding_file', $inf->{slapd}->{run_dir}, $!);
+ # mask off permissions for other
+ $mode &= 07770;
+ $! = 0; # clear errno
+ chmod $mode, $inf->{slapd}->{run_dir};
+ if ($!) {
+ return ('error_chmoding_file', $inf->{slapd}->{run_dir}, $!);
+ }
+
return ();
}
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index d0dc209..bda23a5 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -163,6 +163,7 @@ sub changeOwnerMode {
my $mode = shift;
my $it = shift;
my $gidonly = shift;
+ my $othermode = shift;
my $uid = getpwnam $inf->{General}->{SuiteSpotUserID};
my $gid = -1; # default to leave it alone
@@ -172,7 +173,8 @@ sub changeOwnerMode {
$gid = getgrnam $inf->{General}->{SuiteSpotGroup};
}
- $mode = getMode($inf, $mode, $gidonly);
+ $mode = getMode($inf, $mode, $othermode);
+
$! = 0; # clear errno
chmod $mode, $it;
if ($!) {
@@ -238,9 +240,8 @@ sub makeDSDirs {
debug(3, "Root user " . $inf->{General}->{SuiteSpotUserID} . " already has access to $inf->{slapd}->{run_dir} - skipping\n");
} else {
my $dir = $inf->{slapd}->{run_dir};
- # rwx by user only, or by user & group if a group is defined
- @errs = changeOwnerMode($inf, 7, $dir, 7);
- debug(3, "Changed owner of $dir to " . $inf->{General}->{SuiteSpotUserID} . ": error @errs\n");
+ # rwx by user only, or by user & group if a group is defined. Also only change the group ownership.
+ @errs = changeOwnerMode($inf, 7, $dir, 1);
debug(3, "\t" . `/bin/ls -ld $dir`);
}
# set the group of the parent dir of config_dir and inst_dir
@@ -248,8 +249,8 @@ sub makeDSDirs {
for my $kw (qw(inst_dir config_dir)) {
my $dir = $inf->{slapd}->{$kw};
my $parent = dirname($dir);
- # changeOwnerMode(inf, mode, file, gidonly & default mode);
- @errs = changeOwnerMode($inf, 7, $parent, 5);
+ # changeOwnerMode(inf, mode, file, gidonly, othermode);
+ @errs = changeOwnerMode($inf, 7, $parent, 1, 5);
if (@errs) {
return @errs;
}
13 years, 2 months
Changes to 'refs/tags/Directory_Server_8_2_Errata_Candidate_10610_20110128'
by Nathan Kinder
Changes since the dawn of time:
David Boreham (68):
Move AXIS and DSML jars to /s/b/c
Makefile changes to allow building on Linux machines where uname reports four-part version
Always use the internal regex functions : checkin lost in the AOL/RH move.
Always use the internal regex functions: checkin lost in the AOL/RH move.
Add password change extended operation support.
Add support for password change extended operation.
Always use the internal regex functions: checkin list in the AOL/RH move.
Large stack size for 64-bit builds: checkin lost in AOL/RH move.
Add support for password change extended operation.
Add support for filesystem-based replica initialization.
Add long hostname support for HP-UX
Merge over new code: fractional replication, wan replication and windows sync plus associated UI
Fix the HP build
Additional schama for windows user sync
New windows sync code
Fix unicode conversion for passwords
Merge password sync code from Bozeman Pass
Change DSMLGW to work with Axis1.2rc3
Use axis 1.2rc3
Fix DSMLGW test failures
Change password sync copyright notices, merge fixes to password sync code
Merge fixes to DSMLGW post-axis-version-change
Fix processing of base-64 encoded data
Fixes for windows sync for NT4
Fix instability in re-try and backoff mechanism
Fix RUV updating code
Fix initial RUV logic and add support for Win2003
Take out old code that was #defined out
remove redundant source file and associated Makefile line
remove bogus logging fix bug#154261
Use separate attribute maps for NT4 and AD. Fix 155266
Fix mapping of seeAlso and secretary attributes
Add new NT4 LDAP Service, used by windows sync
Fix for 154837 : non-sync'ed group entries get backed out
Fix mapping of street and streetAddress attrs
Fix for 155141: bug in linked list code
Fix mapping of street attribute, fix total update of previously sync'ed entries
Fix handling of group membership, fix installer GUID, fix handling of entry description
Change GUID for installer
Fix for 155063: remove error messages due to entry parsing failure
Fix for 64-bit bug in dirsync control parsing code
Fix ruv update on skipped change
Fix syncing of contained entries
Fix the fact that if an operation fails in a total update, we immediately halt
Fix schema for NT sync
Fix display names in pass sync to say Fedora
Fix display name to say Fedora...
Fix various bad memory free bugs
Merge fixes over
Allow error on result side to propagate pack to sending side
Fixes for windows sync
Fix for #157020: convert unicode password to little-endian byte order
Fix for #155591: treat an ruv with no min_csn as pristine
Fix for 157021: server doesn't correctly process modifies to windows sync agreements
Fix for #156449 : mangle 'street' attribute to defeat our schema aliasing it with 'streetaddress'
Fix for #155588 : don't leak connections from the ldap connection pool
Fixes for memory leaks in ntds
Patches we apply to apache ds 0.9
Update packaging for ntds
Fix Windows SSL replication in-order processing of operatations
Change NT4 case to send plaintext passwords
Fix ntds installer to allow repair and removal
Fix for #157901 : FMR in windows sync agreement code
Memory Leak Fixes for Apache DS
Fix for #157895 : logon hours doesn't work
Fix for 157919: perform fractional consumer check after acquiring the replica
Fix for 158031: add default indices needed by Windows Sync
Fix for #158253: add attributes to the exclusion list for fractional replication. Add an error string returned to clients if an illegal attribute is configured
Endi S. Dewata (7):
Uninitialized mutex in Retro Changelog Plugin. https://bugzilla.redhat.com/show_bug.cgi?id=554841 Resolves: bug 554841 Bug Description: Enabling Retro Changelog Plugin on a DS instance provisioned by Samba will crash slapd during startup. Branch: HEAD Fix Description: Apparently the retrocl_internal_lock is still NULL when it's used in retrocl_get_first_changenumber(). The solution is to initialize the lock in the retrocl_plugin_init(). Platforms tested: F12 i386
Bug 573375 - MODRDN operation not logged
Bug 566043 - startpid file is only cleaned by initscript runs
Bug 584109 - Slapd crashes while parsing DNA configuration
Bug 542570 - Directory Server port number is not validated in the beginning.
Bug 470684 - Pam_passthru plugin doesn't verify account activation
Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891
Nathan Kinder (339):
Rebranding targets should checkout reltools automatically - nkinder(a)redhat.com
Added rebranding data for RHDS - nkinder(a)redhat.com
Cleaned up UI for rebranding - nkinder(a)redhat.com
146294 - changed dsgw to be brand agnostic - nkinder(a)redhat.com
Fixed axis component pull and cleaned up tomcat references - nkinder(a)redhat.com
146201 - make directory express brand agnostic - nkinder(a)redhat.com
146735 - Fixed HP-UX patch typos - nkinder(a)redhat.com
146804 - Remove 7 day grace period from purging logic - nkinder(a)redhat.com
146804 - Added extra validity check for purge_csn - nkinder(a)redhat.com
147053 - remove dsrk dependency
Added HP-UX makefiles
147044 - convert entry id to big endian before looking up in db
147368 - Made org chart brand agnostic
Fixed PAM plugin for HP builds
Updated nss, nspr, dbm, and jss component versions
New net-snmp subagent
149951 - Updated source code copyrights
Updated SNMP OIDs for Red Hat namespace
Use new RHEL platform naming
Pull svrcore from sbsintegration
Pull DS Console as a component
Fixed declaration syntax error
Fixed missing symbol issues for Solaris ds_newinst
Pull svrcore from sbc
Fix db component pull
Differentiate between internal and external components during branding
Fixed BUILD_MODE flag to look in correct file
Backed out accidental checkin of branded file
Pick up new Axis component (1.2rc3)
Updated copyright info
Update copyrights for DSGW
Copyright updates
Fixed DOS style end of line chars
Update location of ldapconsole component
Remove un-needed Console SDK dependency
Updated copyright info
Updated copyright info
Space in the makefile was causing findstring to fail on RHEL4
Pick up new perldap component
Enable building of SNMP subagent
Compilation and linking fixes for SNMP subagent
Added 64-bit linker options for HP-UX and Solaris
Update components and SNMP config changes
Pick up new Admin Server component
Ensure null termination of strings in SNMP code
Fix swap space reporting on Linux
Pick up new Admin Server and LDAP Console components
Corrected ndd recommendations
153668 - Update dsktune for HP-UX
Update dsktune version date
Updated readme file plus new admin server
Pick up new LDAP Console component
Acceptance and ships fixes for RPMs
Run acceptance in the background
154077 - Check for version 1.4.2.07 of JRE on HP-UX
Pick up new Admin Server
154948 - Fixed fractional repl crash
155068 - Added license to source files
Pick up new ldapconsole
Created LICENSE and EXCEPTION files
HP-UX IPF Porting changes
Pick up new adminserver and ldapconsole components
Removed ldaptags and Whos Online references
Fixed licensing typo
Fixed copyright block error
155460 - Remove crypt password storage from windows build
Use OPL for online help docs
154041 - Added Fedora EULA
Pick up new ldapconsole component
Fixed whitespace issue in Makefile
155782 - Don't include CVS directories in source rpm
Pick up new components
Fix search scope for AD password sync - 159037
164017 - Attribute uniqueness plugin now only checks for conflicts in subtrees that the operation applies to
164843 - Modified indexing to deal with attribute subtypes
165862 - Needed to set BE_INDEX_EQUALITY flag when doing a delete of an entry.
166012 - Use of incorrect iterator in indexing code was causing illegal access of memory which sometimes resulted in crashing.
Pull setuputil from sbsint, not sbc.
167441 - Added SHA2 hashed password storage support.
165228 - Don't have RPM auto-generate provides list
168309 - Removed setup wrappers used for Java packaging and added RPM dependency for java-1.4.2-ibm package.
168322 - Check size of hash needed before base64 encoding password hashes
169388 - Fixed attribute comparision helper function that was causing certain changes to not get synched.
169954 - Winsync initialization would hang with certain entries. Fixed improper use of ldap_get_next.
169954 - Moved illegal declaration to the top of code block
170321 - Increase winsync version to 1.0.1
170328 - Fixed modify type installation so it actually updates the registry
170558 - Add certutil, pk12util and missing dlls to PassSync.msi
170558 - Add certutil, pk12util and missing dlls to PassSync.msi
170135 - Improved passsync logging facilities
170556 - Make passsync obey backoff for retries when DS is down
170816 - Don't consume password changes if modify fails
170071 - Automatically add grouptype for new groups being synchd to NT4
163064 - It appears that Active Directory has a problem where it allows duplicate values for system-only multivalued attributes. This change just skips the dscorepropagationdata attibute when receiving a change from DirSync.
Pull ldapconsole from integration area
Changed cyrus-sasl rpm dependency to >=2.1.15 for RHEL3 compatibility
Need to package online help files for external builds
174550 - Fixed error message typo
178867 - Enhanced password syntax checking
Bug(s) fixed: 180744
Bug(s) fixed: 181032
Fix build-time issue of lib_dsadmin.so for x86_64 support
Bug(s) fixed: 181827
184585 - SASL context needs to be disposed of and a new one created when re-binding
184585 - Adjusted the location of the connection lock when doing a sasl_rebind
185811 - Fixed windows build failures when compiling slapd_chown_if_not_owner function
185811 - Need to exclude pwd.h include on windows
185811 - Don't check localuser config on Windows
185811 - slapi_dn_find_parent needs to be added to libslapd.def for windows build to compile
185811 - Missing const qualifiers were causing Windows compiler errors
188931 - Use system Net-SNMP libraries on Linux systems
189176 - Fixed aci for directory administrators group.
16578 - Fixed off by one error in month in logconv.pl
190724 - Evaluate ACIs before checking password syntax
190724 - Array initialization needed to be changed to fix a HP-UX PA compilation error
202872 - Allow password modify extended operation when using SASL privacy layer
203043 - Support password generation when using the password modify extended operation
203043 - Optimizations in password generation
Test for commits mailing list - ignore.
204355 - Remove winsync code from ldapserver tree
204410 - Pick up new ldapcsdk, nspr, and sasl components
204517 - Use new ber types throughout the server code.
204517 - Cleaned up usage of ber_printf to use new ber types
208058 - Copy decrypted SASL data starting from buffer offset instead of always copying from the beginning of the buffer.
Related: 210736
Resolves: 211234
Resolves: 211386
Resolves: 211419
Resolves: 211554
Resolves: 211554
Resolves: 212038
Resolves: 212483
Related: 213352
Resolves: 214238
Related: 214238
Resolves: 214463
Resolves: 214682
Package libsasl in core libdir for old style build
Resolves: 212112
Resolves: 217796
Resolves: 227754
Resolves: 228082
Resolves: 229095
Resolves: 229428
Resolves: 229428
Resolves: 230458
Resolves: 235143
Resolves: 236612
Resolves: 236612
Resolves: 240240
Resolves: 240583
Summary: Removed unused source files.
Resolves: 251262
Resolves: 253582
Added sasl link to ldap-agent binary.
Resolves: 253818
Resolves: 243221
Resolves: 207893
Resolves: 212671
Resolves: 207567
Resolves: 243227
Resolves: 242551
Resolves: 293541
Resolves: 294301
Removed online help docs now that they've been moved to directoryconsole.
Resolves: 299361
Resolves: 304191
Resolves: 170560
Resolves: 238504
Resolves: 288521
Resolves: 158667
Resolves: 197997
Resolves: 219586
Resolves: 311851
Resolves: 311851
Resolves: 238517
Summary: Re-generated autotools build files.
Resolves: 314791
Resolves: 282911
Resolves: 288321
Resolves: 268101
Resolves: 316281
Resolves: 176302
Resolves: 325281
Resolves: 238630
Resolves: 328741
Resolves: 335081
Resolves: 219587
Resolves: 338611
Resolves: 336871
Resolves: 188320
Resolves: 344631
Resolves: 429799
Resolves: 429793
Initial import of memberof plugin from FreeIPA (refactored from changeset 640:9c57bd91b32f if ipa-memberof.c).
Resolves: 435730
Resolves: 438891
Resolves: 439097
Summary: Avoid adding a group as a memberOf itself.
Resolves: 439907
Resolves: 440333
Resolves: 440474
Resolves: 439628
Resolves: 450107
Resolves: 443241
Resolves: 450746
Resolves: 450989
Resolves: 452169
Resolves: 452537
Resolves: 453011
Resolves: 454328
Resolves: 455913
Resolves: 456162
Resolves: 457260
Resolves: 456968
Resolves: 457329
Resolves: 457951
Resolves: 458135
Resolves: 462920
Resolves: 464188
Related: 207457
Related: 207457
Resolves: 207457
Resolves: 207457
Resolves: 207457
Resolves: 467931
Resolves: 452569
Resolves: 316241
Resolves: 207457
Resolves: 470393
Resolves: 470918
Resolves: 450046
Resolves: 454348
Resolves: 207457
Resolves: 216522
Resolves: 430321
Resolves: 387851
Resolves: 387851
Resolves: 220532
Resolves: 474254
Resolves: 445775
Resolves: 201332
Resolves: 250535
Resolves: 437049
Resolves: 430368
Resolves: 445305
Resolves: 467233
Resolves: 463776
Resolves: 437049
Resolves: 474621
Resolves:479065
Resolves: 381361
Resolves: 381361
Resolves: 472602
Resolves: 170461
Resolves: 174394
Resolves: 437900
Resolves: 253311
Resolves: 442474
Resolves: 184141
Resolves: 248924
Resolves: 204626
Resolves: 474945
Resolves: 480384
Resolves: 474945
Resolves: 470611
Resolves: 452007
Resolves: 463337
Resolves: 455629
Resolves: 455629
Resolves: 446697
Resolves: 245894
Resolves: 245894
Resolves: bug 487574
Resolves: bug 487725
Resolves: 487765
Resolves: bug 486400
Resolves: 445602
Resolves: 442474
Resolves: 496836
Added capability to validate syntax of values being added to the database. Also added numericstring syntax support.
Generated autotools files for syntax validation feature.
Auto-generate SLAPI docs - first pass.
Add strict DN syntax enforcement option.
Add require secure binds switch.
Bug: 181465 - Handle spacing issues in objectClass SUP list.
Add linked attributes plug-in.
Bug: 509401 - dnaNextValue not updated when dnaMaxValue set to -1
Add additional standard syntaxes.
Skip syntax check of encrypted attributes during import.
Use LDAPv3 DN values in ns-newpwpolicy script.
Change aci syntax to Directory String.
Bug 514824: Fix double free in macro ACI code.
Bug 514848: Make selfwrite ACI keyword with with Name And Optional UID syntax attributes.
Bug 514955 - Make DNA handle multiple mods
Add centralized start/stop/restart scipts.
Allow anonymous access to be disabled.
Add minimum SSF setting
Add ssf bind rule to access control plug-in.
Allow anonymous bind resource limits to be set.
BZ 221905 - Add SMD5 password storage support.
Bug 529258 - Make upgrade remove obsolete schema from 99user.ldif
Make removeds.pl remove instance initconfig script
Allow plugin execution order to be defined
387681 - Fix errors in mapping AD tombstones
Bug 511112 - Eliminate fixed length array in password history code.
Bug 497199 - Skip dirsync if disconnected during incremental update
Bug 504817 - Handle LDAPv2 quoted RDN values correctly
Bug 515329 - Correct attribute value inconsistency on replica
Avoid freeing NULL trimmed passwords list
Add bounds checking in DN unescape function
Bug 195302 - Allow fine-grained password storage scheme to be set
Bug 193297 - Call bind pre-op and post-op plug-ins for SASL binds
Bug 201275 - Make SASL EXTERNAL bind obey account lock
Bug 195302 - Fix crash regression from previous fix
Bug 497556 - LDAPI connections cause TCP performance degradation
Set unknown attribute syntax to Octet String.
Bug 518084 - Fix out of order retro changelog entries
Document SLAPI DN related functions.
Add missing paran from fix for bug 518084
Bug 548537 - Fix memory leaks in DNA plugin
Bug 553455 - fix segfault when changing a password
Add Doxygen comments for SLAPI attr, value, and valueset functions.
Bug 536703 - Don't send empty mod to AD for mapped DN values
Bug 549554 - Trim single-valued attributes before sending to AD
Add ldap-agent init script.
Improve search for pcre header file
Bug 434735 - Allow SASL ANONYMOUS mech to work
Allow instance name to be parsed from start-slapd
Bug 578863 - Password modify extop needs to send referrals on replicas
Bug 592389 - Set anonymous resource limits properly
Bug 601433 - Add man pages for start-dirsrv and related commands
Bug 604263 - Fix memory leak when password change is rejected
Bug 612242 - membership change on DS does not show on AD
Bug 612264 - ACI issue with (targetattr='userPassword')
Bug 641944 - Don't normalize non-DN RDN values
Bug 663597 - Memory leaks in normalization code
Bug 671199 - Don't allow other to write to rundir
Bug 672468 - Don't use empty path elements in LD_LIBRARY_PATH
Noriko Hosoi (443):
1) added -p to mkdir built/<PLATFORM_OBJDIR>
fixed packaging -- the path to reltools was incorrect
Stop compiling/packaging presence plugin and its clients "ldaptags" and "online" from DS7.1.
target name should not be identical to the directory name if you want to always execute the command line.
replacing fversion(.c) with dirver(.pl); used on Windows only
[146919] De-brand the Directory Server as "brandx"
[bugzilla 149539] Use Cyrus SASL instead of our custom one
[150809] slapi_ch_smprintf truncates strings when the given args are longer than 100 characters in total.
Instead of getting nes-webapps_6_1.dtd from http://developer.netscape.com/products/servers/enterprise/dtds/, get it from the installed tree.
On windows, snprintf needs underscore '_' at the beginning.
Commented out functions which were removed in the source code clean up.
Moved a part of PR_ASSERT after the variable is initialized.
NSPR header file and the library are needed to use PL_strcatn.
Replaced the variables for ds##[_en].jar and its path with the correct ones:
Added LDAP_NOSSL_LINK for Windows build -- needed for admin/src/ds_newinst.
[149539] Use Cyrus SASL instead of our custom one
fix for breaking the build on HP-UX due to the previous check in.
[Bug 146919] Directory Server rebranding
[152645] dsmlgw acceptance test started to fail on 3/15/2005
[151835] dbscan grows up to 900MB+ and hangs with -i and -l <large value> options
DOC: Internal version also does not package the guides.
[152645] revert AXIS version to 1.2beta
fixed a bug on the static variable introduced by the previous commit.
1) Updated "Last Updated" date.
Revised the usage string.
1) clu dbscan test passes file type option(s) (-e -- entry file, -i -- index file, -c -- changelog file) for any type of files, which could sometimes crashes the command. To prevent it, introduced a simple file type checker and reset the file type if it does not match the real type.
[Bug 153175] SSL 6.x -> 7.0 migration script problems
[Bug 153306] dbscan of changelog files core dumps on Solairs 64 bit builds.
[154068] RPM setup should run with the relative path as well as the absolute path
[154288] usage cleanup
[154766] Online help mentions "this ( 6.2 ) directory server
[154775] Replica Settings page contains 4.0 and 4.1 supplier server.
[154909] Fixed old copyright notice and removed the link to DocHome.
[155066] Typo in properties editor online help; removed '.'
[155140] SASL mapping modify online help not in correct format
[155137] SASL mapping online help not in correct format
[155133] Attribute Encryption, select encryption method, online help uses wrong font / mis-formatted.
[155132] Attribute Encryption, Add, online help uses wrong font / mis-formatted.
Don't pull net-snmp on Windows.
[155628] Fractional Replication: modify does not issue notify;
[155905] mrclone failure: race condition between force_checkpoint and dblayer_close
Fix for the replication bug found in running reliability 16.
[156623] Solaris/HP-UX setup can only be run from the SERVER ROOT
[156759] dsgw/pb charset conversion problem
[156758] bak2db loses index configuration when the overriden conf has some changes.
[154189] Java Console hung during startup and only shows a grey splash screen
[158263] Performance Counter, labels removed. Need to update online help to match
Added testpreop_search to verify bug 147585
[147585] test plugin to verify the bug, the previous check in was not returning SUCCESS.
[Bug 166632] dbscan: not to truncate the entry even if it is larger than BUFSIZ
[Bug 164834] modify/replace allows multiple same valued attributes in an entry
[160003] db2index.pl cannot find libldap50.so if only certain parameters are used
[167264] Update branding script data to include the revision info
[167478] setup script needs to check the DS instance
[167679] modify upgradeServer to upgrade db2index.pl
Fix for NT build failure: undefined symbols in index.c
[167982] Service Pack framework
[167982] Service Pack framework
fixed internal build failure...
[167982] Service Pack framework
[172411] Use system SASL on RHEL
Fixed the build: removed __attribute__ from the previous checkin.
[172411] Use system SASL on RHEL
[172411] Use system SASL on RHEL
[172824] Link SASL library dynamically
[173524] setup scripts retrieves incorrect adminid
[173687] deadlock caused by error log rotation and logging
[173687] deadlock caused by error log rotation and logging
[173931] Error logs not deleted
Fixed the solaris build (log.h); fixed an inappropriate comment
[175063] entry with escaped characters fails to import and index
[175063] entry with escaped characters fails to import and index
[175897] filter'd search not returning matches after index added
[170348] RSEARCH needs to be updated
[174776] Multiple restores from a non-existant directory could wipe out database
[164596] LDCLT distributed with Directory Server
Added copyrights.
[174774] Backup does not clear the backup directory prior to performing backup; Restore tries to restore all the fles from the backupdir
Previous checkin cleaned up too much; restoring commit_good_database.
[176293] repl_chain_on_update() logs a message for every modify operation
[173871] added more precise error message for the dbcache allocation failure.
[164596] LDCLT distributed with Directory Server
[170348] RSEARCH needs to be updated
Fixing nightly build
Fixing the internal build (to build dsmlgw w/ ant, ant-launcher.jar is needed)
Fixing Solaris build
fixing the 64-bit Solaris build
[183222] Directory Server hangs when running VLV search and update operations simultaneously.
[185364] Can't update scripts (e.g., start-slapd) in the instance
[185477] ldif2db allows entries without a parent to be imported
[185477] ldif2db allows entries without a parent to be imported
[185364] Can't update scripts (e.g., start-slapd) in the instance directory
[186642] Directory Server Makefile updates for Internal build
setup.inf, setup.res, silent.inf, unzip_wrapper.pl, LICENSE.txt, README.txt were missing from the tar-gz package file.
[186642] Directory Server Makefile updates for Internal build (Comment #6)
Previous checkin introduced this bug: a whitespace is inserted by putting a comment at the end of the macro assignment for Solaris JDK Version; moved the comment to one line above.
Removed extra $(NS64TAG) from sh_release_config; $(NSCONFIG) contains _64.
accidentally, overrode the change made on revision 1.42; backing off
Moved the SMARTHEAP macro setting from slapd local Makefile to global nsconfig.mk so that the makefile used for packaging gets the info.
[186642] Directory Server Makefile updates for Internal build
Should keep all the components packaged in the 64-bit build in dist/<platform>_64_DBG.OBJ
[189264] 6.11->6.21 upgrade, no db housekeeping threads
pick up new adminutil, adminserver, and WinSync for INTERNAL_BUILD
build fix for Solaris Studio11 compiler
[191832] changing password sometimes crashes the server [Admin Server password always remembers initial password on (part 2)]
[192901] DS returns an entry that does not match the filter
[195258] Changes for the internal build
[195258] Changes for the internal build; Comment#16
[203214] RHDS fails to start on HP-UX 11.23.
[204563] Solaris build problem
[204566] Adjustment for new LDAP C SDK (ber_get_next_buffer_ext)
[206724] Replacing PR_SetNetAddr with PRLDAP_SET_PORT for IPv6 support
Upgraded NSPR_RELDATE to v4.6.3-dstest.
[206724] Processed: Replacing PR_SetNetAddr with PRLDAP_SET_PORT for IPv6 support
[207427] parameterizing the hardcoded paths (Comment #15)
[204808] spurious search timeouts
[208672] parameterizing the hardcoded paths (phase 2. db, log, lock, pid, cert, and instance dir)
Resolves: #204808
Resolves: #210947
Fixed the HP-UX and Solaris build failure introduced by the previous check-in.
Resolves: #212098
Resolves: #212098
Resolves: #212098
Resolves: #210947
Fixed this problem on Solaris: Netscape Portable Runtime error -5977: ld.so.1: ns-slapd: fatal: libns-dshttpd72.so: open failed: No such file or directory
Backed off the previous change for the non-Solaris platforms.
Resolves: #199923
Resolves: #214840
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214728
Resolves: #214533
Resolves: #214533
Resolves: #214533
Resolves: #214533
Added -DIS_FHS; the old build only supports FHS.
Auto-generated by autoheader; needs to be in CVS.
Resolves: #215452
Resolves: #216512
Resolves: #216983
Resolves: #183222
Resolves: 158342
Resolves: #183222
Resolves: #202843
Resolves: #202843
Resolves: #202843
Resolves: #195305, #195307
Resolves: #195305
Resolves: 223861
Resolves: 223861
Replaced white spaces with a tab to fix "Makefile:125: *** missing separator"
Replaced white spaces with a tab to fix "Makefile:150: *** missing separator"
Resolves: 223861
Force to commit template-start-slapd.in and template-stop-slapd.in to make them younger than template-start-slapd and template-stop-slapd.
Resolves: 229576
Resolves: 230673
Resolves: 230673
Resolves: 229280
Resolves: 231221
Resolves: 229513
Resolves: 232050
Resolves: 232050
The line to create db2bak.pl was missing...
Resolves: 232746
Resolves: #233027
Resolves: #233027
Resolves: #233215
Resolves: #233027
Resolves: #232050
Resolves: 233027
Resolves: #233215
Resolves: #233215
Resolves: #233215
Resolves: #237040
Resolves: #237040
Resolves: #237040
Resolves: #237731
Resolves: #237731
Resolves: #237356
Resolves: #237356
Resolves: #237356
Resolves: #237356
Resolves: #237356
Resolves: #237356
Resolves: #237356
Resolves: #237356
Resolves: #239337
Resolves: #237731
Resolves: #243488
Resolves: #237356
Resolves: 237356
Summary: Move DS Admin Code into Admin Server (Comment #62)
Resolves: #237356
Resolves: #244749
Resolves: #244749
Resolves: #245407
Resolves: #245407
Resolves: #244749
Resolves: #246690
Resolves: #247215
Resolves: #247215
Resolves: #247725
Resolves: #249722
Resolves: #249739
Resolves: #250347
Resolves: #250702
Resolves: #251090
Resolves: #253069
Resolves: #260341
Resolves: #260341
Resolves: #260341
Resolves: #273501
Resolves: #236256
Resolves: #240897
Resolves: #243820
Resolves: #171081
Resolves: #287961
Resolves: #241089
Fixed a typo I put in in the previous checkin.
Resolves #222918
Resolves: #312811
Fixed the brand and version mistakenly put in the previous check-in.
Resolves: #314851
Resolves: #196523
Resolves: #316281
Resolves: #304161
Resolves: #173873
Resolves: #193724
Resolves: #327091
Resolves: #188320
Resolves: #193724
Resolves #329951
Resolves: #336871
Resolves: #339031
Resolves: #188320
Resolves: #339791
Resolves: #193724
Resolves: #367671
Resolves: #383141
Resolves: #345671
Resolves: #371751
Resolves: #238649
Resolves: #316281
Resolves: #237040
Resolves: #229576
Resolves: #403351
Resolves: #231093
Resolves: #174776
Resolves: #403751
Resolves: #403751
Resolves: #428163
Resolves: 436397
Resolves: #428764
Resolves: #182621 (#443955)
Resolves: #230673
Resolves: #436400
Resolves: #436390
Resolves: #436388
Resolves: #436390
Resolves: #436837
Resolves: #436837
Resolves: #436837
Resolves: #436837 (comment #9)
Resolves: #436837
Resolves: #452328
Resolves: #437525
Resoves: #448831
Resolves: #450753
Resoves: #428929
Resolves: #447353
Resolves: #447353
Resolves: #436837
Resolves: #448831
Resolves: #456296
Resolves: #456752
Resolves: #428232
Resolves: #457156
Resolves: #457156
Resolves: #466702
reran autogen.sh (automake V1.9.6, autoconf V2.59)
Resolves: 207457
Resolves: 207457
Resolves: #468248
Resolves: #468248
Resolves: #468248
Resolves: 207457
Fixed typos in the HP-UX code: slapi_counter_get => slapi_counter_get_value
Fixing the build on Solaris (ldap_agent_bin-main.o)
Resolves: #207457
Resolves: #469243
Resolves: #469243
Resolves: #462922
Resolves: #469792
Resolves: #459302
Resolves: #466702
Resolves: #463774
Resolves: #207457
Resolves: #471138
Resolves: #471998
Resolves: #470084
Resolves: #472457
Resolves: #430172
Resolves: #472999
Resolves: #430993
Resolves: #469800
Resolves: #474248
Resolves: #474237
Resolves: #240512
Resolves: #474729
Resolves: 459433
Resolves: #447353
Resolves: #475338
Resolves: #475899
Resolves: #430568
Resolves: #475899
Resolves: #178248
Resolves: #438139
Resolves: #436830
Resolves: #464854
Resolves: #460613
Resolves: #469800
Resolves: #208076
Resolves: #483167
Resolves: #483366
Resolves: #483668
Resolves: #484149
Resolves: #484311
Resoves: #484157
Resolves: #485321
Resolves: #464651
Resolves: #476261
Resolves: #488856
Resolves: #476096
Resolves: #489763
Resolves: #489625
Resolves: #490027
Resolves: #476096
Resolves: #491215
Resolves: #489360
Resolves: #492562
Resolves: #475338
Resolves: #475338
Add Simple Paged Results
Use thread aware library for complex regex searches
Initialize smods in ldmb_back_modify
Compiler warnings and paged results on DSE
504383 PCRE breaks SASL Mapping
507460 Access log could mistakenly report notes=U for VLV searches
506137 ns-slapd hang while group aci performance testing
509269 Simple paged result crashes/hangs the server
509269 Simple paged result crashes/hangs the server
510147 clean up the replication log msg
513019 nsslapd-lookthroughlimit is not respected
Entry USN
513170 NULL search result does not return sort control
513172 Simple Paged Results does not respect nsslapd-sizelimit
Revert "513019 nsslapd-lookthroughlimit is not respected"
Apply SYNTAX_DN to Name And Optional UID
514770 remove per-entry response control for GER and Paged Results
GroupOfUniqueNames in template.ldif must have uniqueMember
513916 Server doesn't ignore paged control, if page size and server's estimate of total no of entries are same
509472 db2index all does not reindex all the db backends correctly
506786 Index maintenance mechanism causes wrong search results when
506786 Index maintenance mechanism causes wrong search results when
509472 db2index all does not reindex all the db backends correctly
Plugin Default Config Entry
516089 RFE: ldclt utility should support new dereferencing control searches
Add EntryUSN to the nsslapd-exclude-from-export list
518112 rhds 81 el53 64b ns-slapd seg fault
525007 ldif2db replaces existing modify/create name and timestamps
ldclt: -e randombinddnfromfile fails with LDAP_UNWILLING_TO_PERFORM (53)
544089 - Referential Integrity Plugin does not take into account the attribute
247413 - Incorrect error on multiple identical value add
560827 - Admin Server templates: DistinguishName validation fails
548535 - memory leak in attrcrypt
Fixing config_dir in DSUpdate.pm.in
Fixing a memory leak in repl5_protocol.c
Fixing a memory leak in dblayer.c
Fixing a memory leak in idl_new.c
Fixing a memory leak in dblayer.c
Fixing a memory leak in ldbm_attr.c
Initializing be_usn_counter in Slapi_Backend
Fixing a typo in entrywsi.c
Adding instancedir getter and setter to libglobs.c
Fixing a wrong comment in log.c
Adding DN syntax check API slapi_dn_syntax_check
Fixing error logs in modrdn.c
Check DN syntax in backend add, delete, modify and modrdn
Fixing a memory leak in sasl_map.c
563365 - Error handling problems in the backend functions
565987 - redhat-ds-base fails to build due to undefined struct
527848 - make sure db upgrade to 4.7 and later works correctly
539618 - Replication bulk import reports Invalid read/write
548115 - memory leak in schema reload
555970 - missing read lock in the combination of cos and nsview
539618 - Replication bulk import reports Invalid read/write
570667 - MMR: simultaneous total updates on the masters cause
199923 - subtree search fails to find items under a db
572649 - DS8.2 crashes on RHEL 4 (corresponding to bob, ber_2 test case)
573060 - DN normalizer: ESC HEX HEX is not normalized (
573896 - initializing subtree with invalid syntax crashes ns-slapd
515805 - Stop "initialize Database" crashes the server
548533 - memory leak in Repl_5_Inc_Protocol_new
Fixing a syntax error
Update to New DN Format
585905 - ACL with targattrfilters error crashes the server
574167 - An escaped space at the end of the RDN value is not
591336 - Implementing upgrade DN format tool
590931 - rhds81 import - hardcoded pages_limit for nsslapd-import-cache-autosize
A bug fix made in commit 142d7ada626173de4937330be6776fabbebe9f60
Another bug fix made in commit 142d7ada626173de4937330be6776fabbebe9f60
Yet another bug fix made in commit 142d7ada626173de4937330be6776fabbebe9f60
A bug fix made in commit a5a9949fd16c6d268f0f2676f8bdbb926dc43539
Additional fix for 591336 - Implementing upgrade DN format tool
592497 - rhds82 - nsslapd-syntaxcheck seem to be on by default, need off
593453 - Creating password policy with ns-newpolicy.pl on Replicated
593110 - backup-restore does not ALWAYS work
593899 - adding specific ACI causes very large mem allocate request
588867 - entryusn plugin fails on solaris
593899 - adding specific ACI causes very large mem allocate request
595893 - Base DN in SASL mapping is not normalized
511112 - Password history limited to 25 values
597375 - Deleting LDBM database causes backup/restore problem
605827 - In-place upgrade: upgrade dn format should not run in setup-ds-admin.pl
606920 - anonymous resource limit - nstimelimit -
612771 - RHDS 8.1/389 v1.2.5 accepts 2 identical entries with
612771 - RHDS 8.1/389 v1.2.5 accepts 2 identical entries with
616135 - Upgrade failure on Solaris :
612771 - RHDS 8.1/389 v1.2.5 accepts 2 identical entries with
619229 - Upgrading sub suffix under non-normalized suffix disappears
Bug 644608 - RHDS 8.1->8.2 upgrade fails to properly migrate ACIs
Bug 644608 - RHDS 8.1->8.2 upgrade fails to properly migrate ACIs
Bug 640027 - Naming attribute with a special char sequence parsing bug
Pete Rowley (8):
172683: Search filter does not work on physical entries within views
173375: Problems with schema matching rules
177444: duplicate password policy oids in root DSE
minor edits to remove references to cos in the example
Distributed numeric assignment plugin - initial check in
Add LDAPI
corrected copyright statement
fix defined out code to really be defined out
Rich Megginson (495):
Bug(s) fixed: 145179
remove references to ldapserver from makefiles; use BUILD_ROOT instead of MCOM_ROOT and NSROOT; BUILD_ROOT is now the ldapserver directory rather than its parent
Whoops. Checked in some private stuff I had to work around vsftpd problems.
Do not do the DIST step - we are not distributing this software built here
RPM packaging - parameterize the pkg root directory using INSTDIR
RPM packaging - does the old setup pre and post installation tasks
RPM packaging - the ldapserver.spec file and the builddsrpm.sh script to do the prep work
Derive ABS_INSTDIR directly from INSTDIR
RPM packaging - set the flag to build java files - use serverroot/setup/setup insetad of serverroot/setup
Bug: 147157
Bug(s) fixed: 147162
checkin first version of pam plugin
PAM pass through auth plugin support
added
added
Bug(s) fixed: 147585
Rename add_pwd_control to slapi_add_pwd_control
Fixed problem with declaration after executable code.
Do not build pam auth plugin on Windows
If USING_VSFTPD is defined, some hacks around pulling components via ftp are used.
fix Windows build issues
get rid of adminutil dependency on core DS
readding because otherwise Windows is horked
removed strlist
clean up sprintf usage and many other flawfinder issues; clean up compiler warnings on Linux; remove pam_passthru from DS 7.1
fix Windows build issues
fix Windows build - use local functions instead of NSPR - fix compiler warnings
fix Windows installer breakage - wrong argument to va_start - use fmt instead of s
upgrade to SVRCORE 4.0 - the open source version
This one is mostly strcpy/strcat checking, checking for null strings before strlen, removing some dead code, other odds and ends.
use prefix instead of hardcoded ldapserver
add link debugging for debug builds on linux
add support for instance creation using open source core DS components
use mtmalloc instead of SmartHeap on Solaris
When creating a script, if the destination directory does not exist, just print a notice and skip that script. This is to allow the open source instance creator to skip creating the repl monitor script in admin/admin which does not yet exist.
Fix snprintf into sizeof(char *) instead of actual buffer size
This files contents have been merged into internal_buildpaths.mk, components.mk, and internal_comp_deps.mk
was using wrong section
add ability to build from open source components
remove ns_usedb.mk
put sh_ in front of smartheap component name
Bug(s) fixed: 145179
Use v5.15 of ldapsdk
Bug(s) fixed: 152030
1) remove fortezza stuff
fixed spacing
Bug(s) fixed: 151567
Bug(s) fixed: 151721
I got rid of ldapserver.spec. Instead, the spec file will be created on the fly. The only parameter passed in is the flavor - redhat or fedora. Everything else comes from the brandver.dat file. PLATFORM is derived from BUILD_ARCH in the usual Makefile way. So we could easily support Solaris or whatever else. The Makefile change is to allow you to produce the .spec file without having to build everything else. The change to reltools/brandver.pl allows us to change only the named files rather than every file in the .dat file.
--macros seems not to work - using --define to define our macro on the command line
Bug(s) fixed: 147886
fix brandDirectory breakage - skip redhat-ds.spec when branding
Use setup -q to suppress tar output
Bug(s) fixed: 153686
Make RPM binary name .opt.rpm or .dbg.rpm depending on build flavor
make rpm name .flavor.rpm - flavor must be defined in rpmbuild
Bug(s) fixed: 145179
setup/setup was being installed as setup/setup/setup
Bug(s) fixed: 154064
Reviewed by Nathan (Thanks!)
Check for last version removal in preun - only run uninstall if removing the last version
Bug(s) fixed: 154235
Added more support for building from source, specifically support for
Bug(s) fixed: 154431
Bug(s) fixed: 153955
Bug(s) fixed: 155087
Fix Solaris open source build breakage - reviewed by Noriko
Change release to 2
Upgrade to ldapconsole 20050510 and ldap c sdk 5.16
Bug(s) fixed: 157377
Bump up ldapconsole version to 20050513
Bug(s) fixed: 157341
Change version of ad sync and nt4 sync to 0516
Correctly report in the repl agreement status attrs that the repl init failed when it failed due to attempting to do fractional replication to another master.
Only check the read only status of the consumer for the fractional case if the acquire process has been successful thus far.
remove full and optimize from the file names of the winsync components
Bug: 158250
Bug(s) fixed: 158235
Bug(s) fixed: 158330
Bug(s) fixed: 158368
bug 158368 - remove nt group type as well
Bug(s) fixed: 158549
Bug 160008
PAM is not thread safe. Therefore, we must put the code that accesses PAM
Bug(s) fixed: 165600
Bug(s) fixed: 165640
Bug(s) fixed: 165827
Bug(s) fixed: 151678
Bug(s) fixed: 166229
Bug(s) fixed: 165641
Bug(s) fixed: 167453
upgrade winsync to 20050912 for bug 159037 and upgrade directory console to 20050913 for bug 167761
Bug(s) fixed: 169663
also checkin fix for 170350 onto trunk
Bug(s) fixed: 171066
Bug(s) fixed: 171854
Bug(s) fixed: 171892
Bug(s) fixed: 172005
Bug(s) fixed: 172056
Bug(s) fixed: 166229, 166081
Bug(s) fixed: 172672
Bug(s) fixed: 172818
Reviewed by Nathan (Thanks!)
set defaults to build java code, and use java, ant, and perl from PATH for external builds
added a dependency on httpd
add jar files back to the main package - even though the gpl and apl are not generally compatible, they are compatible for this specific case
remove Requires for java - breaks non-RHEL platforms - we should either change the spec file to include the dependency only on RHEL, or just wait until gcj/classpath can run our stuff
Fix the problem with the Admin Server console - error opening the encryption tab. The solution is to chown the alias directory to the admin server uid so that the security CGI can create the key/cert dbs in that directory.
Fix two problems
The DS console Configuration Encryption tab was giving an error. The error was due to the security CGI not being able to read the ds key/cert db files. They were owned by root instead of the server uid because they were being created by NSS_Initialize which was being called before the server did the setuid.
Move ssl init on the secure socket into main with the rest of the nss/ssl init
Move NSS/SSL initialization after the setuid so that key/cert/other nss
1) Move the import, export, etc. (non network server mode) code to after the NSS/SSL init. For example, import needs to hash passwords, export of encrypted attrs needs encryption.
Cannot pass const strings into slapi_str2filter, since it can modify
Bug(s) fixed: 175053
Bug(s) fixed: 175098
Bump version from 1.0 to 1.0.1
add the console-ld-libpath.patch for bug 174981
need to patch the console in both upgrade installation and regular installation
the install is an upgrade if the %post argument is greater than 1, not greater than or equal to 1
Bug(s) fixed: 176302
Bug(s) fixed: 180515
Bug(s) fixed: 178479
Use NSS 3.11 and NSPR 4.6.1 - NSS 3.11 requires the new freebl lib at runtime,
Wan-Teh pointed out that the platform specific freebl libs are needed _instead of_ libfreebl3, not _in addition to_. So, set the list of platform specific freebl libs and add them to the list of libs to package.
Bug(s) fixed: 181587
The correct naming convention for RHEL is
Bug(s) fixed: 181776
1) Fix moz objdir name for generic linux x86_64
Reviewed by Nathan (Thanks!)
Don't attempt to package 32 bit NSS apps/libs with the 64 bit package on rhel/linux - assume everything is native 64 bit.
Change version to 1.0.2
Still need the console ld libpath patch for startconsole
Bug(s) fixed: 182613
Bug(s) fixed: 179135
Bug(s) fixed: 179137
Bug: 179810
Have to add back softokn3 to the link libs - dependent libs are linked directly against it and expect it to be present at link time.
Some DSGW programs must not be linked with SSL, including the LDAP ssl library. On RHEL3, this causes a linker error, but appears to be fine on other platforms. So, just use the LDAP_NOSSL_LINK macro for those programs, and use the LDAPLINK macro for the other programs.
added patch file for upgrading from 1.0.1 - fixes the use of admpw for basic auth
Added admserv-conf-admpw.patch to fix the use of admpw for basic auth in the actual config file
Bug(s) fixed: 179723
Make the build/pull work like the adminserver does with respect to console. Otherwise, dsbuild with recent code no longer works.
Bug(s) fixed: 186280
Bug(s) fixed: 186280
use slapi_entry_attr_get_bool instead of slapi_entry_attr_get_int for the fallback and secure config attrs
Bug(s) fixed: 205456
Bug: 205456
Bug: 205456
Bug: 205456
remove extraneous endif
Create core DS tarball for acceptance test
Bug: 205456
Bug(s) fixed: 206450
Bug: 206527
minor change to test commit email notification
use new 20060915 version of perldap
Bug: 206527
Bug(s) fixed: 206662
fix build breakage - use PERLDAP_BUILT_DIR as the location to download perl since the full DEP has two directory levels in it
update internal builds to use latest components
Bug(s) fixed: 202889:
Bug(s) fixed: 199321
Bug(s) fixed: 210075
Bug(s) fixed: 210120
Bug(s) fixed: 210220
Bug(s) fixed: 185364
Bug(s) fixed: 183903
Bug(s) fixed: 185780
For FDS 103 - When I changed the makefiles around for the earlier fix to enable rpmbuild,
Bug(s) fixed: 204623
Change the way ldapserver links with SASL. Rather than specifying a hard coded link path
enable pam_passthru for fedora ds builds
Bug(s) fixed: 211426
Bug(s) fixed: 213352
Bug(s) fixed: 213786
upgrade version to 1.0.4
Bug(s) fixed: 214243
1) Fedora Core 6 build fixes
Bug: 214733
Bug: 214733
Resolves: bug 215669
Resolves: bug 214851
Resolves: bug 215995
Bug(s) fixed: 216758
Bug: 210947
Resolves: bug 217403
I noticed a problem with the autoconf style builds that shows up on 64 bit - some of the scripts had /usr/lib/mozldap6 in the PATH, and some had /usr/lib64/mozldap6. All of them should have lib64. What was happening is that make would create some script templates from the corresponding template .in file, and some it would just copy over (those that have both a template-script and a template-script.in). The template-script files have hardcoded /usr/lib/ - it requires the conversion from template-script.in to template-script to substitute /usr/lib64/ instead.
Resolves: bug 218076
Resolves: bug 222398
Resolves: bug 224291
Resolves: bug 224606
Resolves: bug 224672
Resolves: bug 147886
Resolves: bug 224606
fix build problems on Solaris; minor m4 cleanup
fix licensing in sasl.m4
Resolves: bug 227452
esolves: bug 227618
Resolves: bug 227771
Resolves: bug 160235
Resolves: bug 227771
make sure .in files are newer than corresponding template script file
Remove some bash-isms that were causing problems on RHEL-4
Resolves: bug 228334
change version to 1.1.0a1
Resolves: bug 229286
Resolves: bug 229691
Need to terminate dna plugin config entry with a newline
Resolves: bug 229825
Resolves: bug 229077
Resolves: bug 230498
Resolves: bug 230808
Resolves: bug 231507
Resolves: bug 232377
Resolves: bug 232684
Resolves: bug 231905
Resolves: bug 232684
Bump version to 1.1.0 alpha 3 (1.1.0a3)
Resolves: bug 233410
Resolves: bug 235743
Resolves: bug 239764
Resolves: bug 238563
Resolves: bug 239765
Resolves: bug 243205
Resolves: bug 237356
Resolves: bug 237356
Resolves: bug 243639
Resolves: bug 237356
Resolves: bug 237356
Resolves: bug 237356
Resolves: bug 237356
Resolves: bug 237356
Resolves: bug 237356
remove obsolete files
Resolves: bug 245815
Added nsslapd-ldifdir and nsslapd-bakdir
Resolves: bug 246683
Resolves: bug 245815
Resolves: bug 248145
Resolves: bug 248145
Resolves: bug 248272
Resolves: bug 248145
Resolves: bug 248820
move setup-ds.pl and migrate-ds.pl to sbindir
removed more obsolete files
forgot to tell Makefile.am about removed obsolete files
Resolves: bug 249470
Resolves: bug 249633
Resolves: bug 250535
Resolves: bug 237356
Resolves: bug 251227
The arguments to memset were in the wrong order. This code is only used on Windows.
forgot to commit the autotool generated files
revert back to using autoconf 2.59 - 2.61 causes the -avoid-version flag to be ignored, which causes rpm packaging errors
Resolves: bug 251227
Resolves: bug 251227
using ldap also pulls in nss and nspr, so we have to add those - also, put those first in the link line, so that the build finds the dirsec versions of those components and not the mozilla/seamonkey ones in libdir
Resolves: bug 251549
Resolves: bug 252190
Resolves: bug 252190
Resolves: bug 253047
Resolves: bug 252263
Resolves: bug 260341
Resolves: bug 262021
Resolves: bug 276741
Resolves: bug 281631
Resolves: bug 244475
Resolves: bug 282741
Resolves: bug 283041
try to fix build breakage on RHEL5
Resolves: bug 288451
Resolves: bug 288451
Resolves: bug 288451
Resolves: bug 249366
Resolves: bug 262021
Resolves: bug 301431
Resolves: bug 262021
Resolves: bug 301811
Resolves: bug 249366
Resolves: bug 282911
Resolves: bug 249366
Resolves: bug 249366
Resolves: bug 248169
Resolves: bug 190220
Resolves: bug 305121
Resolves: bug 244475
migration starts instances now
Resolves: bug 317651
Resolves: bug 165761
remove obsolete schema
Resolves: bug 288291
Resolves: bug 330121
Resolves: bug 330141
Resolves: bug 185602
Resolves: bug 333291
Resolves: bug 250179
Resolves: bug 250179
Have to free instdir not instname
Resolves: bug 232910
Resolves: bug 297221
Resolves: bug 338991
Resolves: bug 339041
Resolves: bug 336881
Resolves: bug 297221
Resolves: bug 340211
Resolves: bug 232910
Resolves: bug 340361
Resolves: bug 232910
Resolves: bug 345711
Resolves: bug 345711
Resolves: Bug 345711
Resolves: bug 353071
bump source code version to 1.1.0 beta 2
Resolves: bug 339041
Resolves: bug 367721
Resolves: bug 345711
Resolves: bug 197997
Resolves: bug 388021
Resolves: bug 371771
Resolves: bug 400421
Reviewed by: nhosoi (Thanks!)
Resolves: bug 416721
Resolves: bug 424381
Resolves: bug 424381
Resolves: bug 425861
Resolves: bug 425849
bump version to 1.1.0 for Fedora DS 1.1 release
Resolves bug 434403
merge in autotool file fixes for gcc43 with the memberof autotool file additions
Resolves: bug 439829
bump version to 1.1.1 - add define for new public slapi task interface
have to use *be instead of be in call to be_isdeleted
Resolves: bug 442170
Resolves: bug 450973
Resolves: bug 233642
Resolves: bug 431103
Resolves: bug 452323
Resolves: bug 435774
Resolves: bug 440899
Reviewed by: nkinder (Thanks!)
Resolves: bug 428765
Resolves: bug 447614
Resolves: bug 447353
Resolves: bug 457846
Resolves: bug 447353
Resolves: bug 457846
Resolves: bug 458171
Resolves: bug 457156
Resolves: bug 458506
Resolves: bug 458507
Resolves: bug 458510
Resolves: bug 458668
Resolves: bug 458675
Resolves: bug 458677
Resolves: bug 458666
a couple of enhancements that make it easier to run the server under various debugging tools
Resolves: bug 457846
Resolves: bug 460381
Resolves: bug 459850
Resolves: bug 457846
bump version to 1.1.3
Resolves: bug 457846
Bug Description: Need to address 64-bit compiler warnings - part 1
Resolves: bug 454030
Resolves: bug 454030, bug 463991
fix inttypes build breakage on HP-UX
Resolves: bug 455026 bug 441026
Resolves: bug 454030
fix typo
Resolves: bug 469261
Resolves: bug 469243
Resolves: bug 469261
Resolves: bug 469261
Resolves: bug 469261
Resolves: bug 469261
Resolves: bug 469261
Resolves: bug 454030
Resolves: bug 476127
Resolves: bug 476891
Resolves: bug 476891
Resolves: bug 479077
Resolves: bug 478656
Resolves: bug 471068
Resolves: bug 204966
Resolves: bug 479202
Resolves: bug 479313
Resolves: bug 222055
Resolves: bug 202134
Resolves: bug 179956
Resolves: bug 481223
Resolves: bug 479253
Resolves: bug 482909
Resolves: bug 480642
Resolves: bug 483256
Resolves: bug 483254
Resolves: bug 431607
Resolves: bug 481052
Resolves: bug 477009
Resolves: bug 485694
Resolves: bug 486191
Resolves: bug 486191
Resolves: bug 468474
Resolves: bug 486474
Resolves: bug 486495
Resolves: bug 480869
Resolves: bug 450575
Resolves: bug 487425
Resolves: bug 488866
Resolves: bug 488814
Resolves: bug 488866
Resolves: bug 488866
Resolves: bug 480869
Resolves: bug 489360
Resolves: bug 479254
bump version to 1.2.0
add back support for linux ppc
re-enable ppc support
Rename to 389
bump version to 1.2.1 - added .gitignore
fix rpmlint issues - config files and perl modules should not be executable
Fix various compiler warnings
Resolves: bug 501490 - Error creating view on FDS 1.2
Added full text of GPLv2 license
Implement SASL I/O as an NSPR I/O layer
initial commit of io function improvements
OpenLDAP support
Clean up compiler warnings
Reduce noise reported by valgrind
Fix attrcrypt usage of nsSymmetricKey
Fix unsalted password comparisons
Dereference support
Change default branding to 389 - remove lite code
fix pcre build issues
Fix usage of pre-hashed salted passwords
bump version to 1.2.2
Retry SASL writes if buffer not fully sent
https://bugzilla.redhat.com/show_bug.cgi?id=487425
Fails to start if attrcrypt can't unwrap keys
Clean up build warnings
Add update code - make setup-ds.pl -u do updates
389-ds-base/glibmm24: conflicting perl provides
Start script hardcodes file permissions mask to 077 (600), so the nsslapd-*log-mode configuration attributes don't work
logs created at startup can get wrong file mode
Should not attempt to pop SASL IO layer if not using SASL IO
empty principal name used when using server to server sasl for db chaining
MODIFY/replace with empty values does not ignore missing or unknown attributes
Bitwise Plugin: Bitwise filter doesn't return except the first entry if its multi-valued
SASL IO sometimes loops with "error: would block"
Updated man page with the new update options and documentation.
more updates - add missing rundir - remove ldapiautodnsuffix
bump version to 1.2.4
Implement support for versioning and release engineering procedures - version 1.2.5.a1
Add Named Pipe Log Script, plugins, man page
bump version to 1.2.5.rc1
bump version to 1.2.5.rc2
bump version to 1.2.5.rc3
Password replication from 389DS to AD fails
version 1.2.5.rc4
Workaround bogus base64 encoded passwords that end in newline
bump version to 1.2.6.a1
rhds81 hub with 71 master - err=32 on replica base search during replication
Bug 519459 - Semi-hardcoded include and lib directories in db.m4
several spelling errors
Net::LDAP password modify extop breaks; msgid in response is 0xFF
Bug 543080 - Bitwise plugin fails to return the exact matched entries for Bitwise search filter
Bug 537466 - nsslapd-distribution-plugin should not require plugin name to begin with "lib"
fix memory leak in attr replace when replacement fails
Bug 568196 - Install DS8.2 on Solaris fails
Bug 568196 - Install DS8.2 on Solaris fails - part 2
389 DS segfaults on libsyntax-plugin.so - part 1
389 DS segfaults on libsyntax-plugin.so - part 2
fix various memory leaks
Bug 554573 - ACIs use bind DN from bind req rather than cert mapped DN from sasl/external
Bug 570905 - postalAddress syntax should allow empty lines (should allow $$)
Bug 572677 - Memory leak in searches including GER control
Bug 571677 - Busy replica on consumers when directly deleting a replication conflict
Bug 576074 - search filters with parentheses fail
Bug 567429 - slapd didn't close connection and get into CLOSE_WAIT state
Bug 578167 - repl. of mod/replace deletes multi-valued attrs
Bug 561575 - setup-ds-admin fails to supply nsds5ReplicaName when configuring via ConfigFile
Bug 577384 - Remove-ds.pl script throws "sh: STARTPIDFILE.*=: not found" error on Solaris 9
Bug 578229 - Blocked sync afer UID or ntUserDomainId change
Bug 572162 - the string "|*" within a search filter on a non-indexed attribute returns all elements.
Bug 576644 - segfault while multimaster replication (paired node won't find deleted entries)
Bug 583167 - remove-ds.pl gives error Couldn't open /etc/sysconfig/dirsrv-$INSTANCE
Fix too few args for format warning in acllas
Bug 591685 - Server instances Fail to Start on Solaris due to Library Path and pcre
Bug 593392 - setup-ds-admin.pl -k creates world readable file
Bug 595874 - 99user.ldif getting overpopulated
Bug 604453 - SASL Stress and Server crash: Program quits with the assertion failure in PR_Poll
Bug 604453 - SASL Stress and Server crash: Program quits with the assertion failure in PR_Poll
Bug 603942 - null deref in _ger_parse_control() for subjectdn
Bug 617013 - repl-monitor.pl use cpu upto 90%
Bug 666076 - dirsrv crash (1.2.7.5) with multiple simple paged result searches
Rob Crittenden (7):
149510
149510
149510
149510
156273
156273
Changes so DS can be built with gcc on Solaris.
Thomas Lackey (13):
Replace missing makefile referenced by SunOS5.8.mk and SunOS5.9.mk. This file is needed to build on Solaris.
Add new sync wizard help pages. Alter text of repl4 (summary) wizard page.
Pickup new doc files.
Allow the migration scripts to recognize the Red Hat-branded server.
Add makefile and component information to build the Apache DS for User Sync
Build PassSync on Windows.
Fix NTDS maven location.
Add WiX component information.
Add Wix dependency.
Add installer icons.
Modify NTDS and PassSync to build in the 'built' directory.
Use WinSync components from sbc.
Fix bug 155276, crash if config has changed since restore.
Yi Zhang (2):
459181 - Add attreplacefile option to ldclt
516089 - add dereference search option into ldclt
cvsadm (1):
Moving NSCP Directory Server from DirectoryBranch to TRUNK, initial drop. (foxworth)
svrbld (4):
SNMP subagent fixes for HP-UX compiler errors
New RPM packaging options
Use Linux rpm build for longduration test.
Fixed object build path: convert relative path to absolute path (tlackey)
unknown (1):
This commit was manufactured by cvs2git to create branch
13 years, 2 months
Branch 'Directory_Server_8_2_Branch' - 3 commits - ldap/admin ldap/servers wrappers/cl-dump.in wrappers/dbscan.in wrappers/infadd.in wrappers/initscript.in wrappers/ldap-agent.in wrappers/ldclt.in wrappers/ldif.in wrappers/migratecred.in wrappers/mmldif.in wrappers/pwdhash.in wrappers/repl-monitor.in wrappers/rsearch.in
by Nathan Kinder
ldap/admin/src/scripts/10fixrundir.pl | 11 +++
ldap/admin/src/scripts/DSCreate.pm.in | 13 ++--
ldap/admin/src/scripts/start-dirsrv.in | 15 ++++
ldap/admin/src/scripts/template-bak2db.in | 15 +++-
ldap/admin/src/scripts/template-bak2db.pl.in | 21 ++++++
ldap/admin/src/scripts/template-db2bak.in | 15 +++-
ldap/admin/src/scripts/template-db2bak.pl.in | 21 ++++++
ldap/admin/src/scripts/template-db2index.in | 14 +++-
ldap/admin/src/scripts/template-db2index.pl.in | 21 ++++++
ldap/admin/src/scripts/template-db2ldif.in | 15 +++-
ldap/admin/src/scripts/template-db2ldif.pl.in | 21 ++++++
ldap/admin/src/scripts/template-dbverify.in | 15 +++-
ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in | 21 ++++++
ldap/admin/src/scripts/template-fixup-memberof.pl.in | 21 ++++++
ldap/admin/src/scripts/template-ldif2db.in | 15 +++-
ldap/admin/src/scripts/template-ldif2db.pl.in | 22 ++++++-
ldap/admin/src/scripts/template-ldif2ldap.in | 16 ++++-
ldap/admin/src/scripts/template-monitor.in | 17 ++++-
ldap/admin/src/scripts/template-ns-accountstatus.pl.in | 21 ++++++
ldap/admin/src/scripts/template-ns-activate.pl.in | 21 ++++++
ldap/admin/src/scripts/template-ns-inactivate.pl.in | 21 ++++++
ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in | 21 ++++++
ldap/admin/src/scripts/template-restoreconfig.in | 15 ++++
ldap/admin/src/scripts/template-saveconfig.in | 15 ++++
ldap/admin/src/scripts/template-schema-reload.pl.in | 21 ++++++
ldap/admin/src/scripts/template-suffix2instance.in | 15 ++++
ldap/admin/src/scripts/template-syntax-validate.pl.in | 21 ++++++
ldap/admin/src/scripts/template-upgradedb.in | 15 ++++
ldap/admin/src/scripts/template-upgradednformat.in | 15 +++-
ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in | 21 ++++++
ldap/admin/src/scripts/template-verify-db.pl.in | 19 +++++-
ldap/admin/src/scripts/template-vlvindex.in | 15 ++++
ldap/servers/slapd/back-ldbm/ldbm_search.c | 8 +-
ldap/servers/slapd/opshared.c | 10 +++
ldap/servers/slapd/pagedresults.c | 37 ++++++++++++
ldap/servers/slapd/proto-slap.h | 2
ldap/servers/slapd/slap.h | 7 ++
wrappers/cl-dump.in | 11 ++-
wrappers/dbscan.in | 10 ++-
wrappers/infadd.in | 12 +++
wrappers/initscript.in | 10 ++-
wrappers/ldap-agent.in | 12 +++
wrappers/ldclt.in | 12 +++
wrappers/ldif.in | 12 +++
wrappers/migratecred.in | 14 +++-
wrappers/mmldif.in | 14 +++-
wrappers/pwdhash.in | 14 +++-
wrappers/repl-monitor.in | 11 ++-
wrappers/rsearch.in | 12 +++
49 files changed, 666 insertions(+), 107 deletions(-)
New commits:
commit 514ce78d6e288c35e9a4949ca7703f358ed6fc3e
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Thu Jan 13 13:44:15 2011 -0700
Bug 666076 - dirsrv crash (1.2.7.5) with multiple simple paged result searches
https://bugzilla.redhat.com/show_bug.cgi?id=666076
Resolves: bug 666076
Bug Description: dirsrv crash (1.2.7.5) with multiple simple paged result searches
Reviewed by: nkinder, nhosoi (Thanks!)
Branch: Directory_Server_8_2_Branch
Fix Description: Only allow one simple paged results search per-connection
at a time. The new function pagedresults_check_or_set_processing() will
check the flag in the connection to see if pagedresults processing is in
progress. If so, the function will return True and the search will terminate
with LDAP_UNWILLING_TO_PERFORM (as per section 3 in RFC 2696, a server is
allowed to return unwillingToPerform if there is a limit to the number of
outstanding paged search requests from a given client). The processing
flag will be reset once the search result has been sent to the client.
Since the problem is multiple threads in the same connection accessing
the pagedresults data, the workaround is to just set
nsslapd-maxthreadsperconn: 1
in cn=config in dse.ldif.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index c25935d..ccfd68c 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -1145,6 +1145,7 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension )
if ( !use_extension )
{
cache_return( &inst->inst_cache, &(sr->sr_entry) );
+ sr->sr_entry = NULL;
}
if(sr->sr_vlventry != NULL && !use_extension )
@@ -1182,7 +1183,6 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension )
curtime = current_time();
if ( tlimit != -1 && curtime > stoptime )
{
- slapi_send_ldap_result( pb, LDAP_TIMELIMIT_EXCEEDED, NULL, NULL, nentries, urls );
/* in case paged results, clean up the conn */
pagedresults_set_search_result(pb->pb_conn, NULL);
slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_SET, NULL );
@@ -1192,13 +1192,13 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension )
slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, NULL );
delete_search_result_set( &sr );
rc = SLAPI_FAIL_GENERAL;
+ slapi_send_ldap_result( pb, LDAP_TIMELIMIT_EXCEEDED, NULL, NULL, nentries, urls );
goto bail;
}
/* check lookthrough limit */
if ( llimit != -1 && sr->sr_lookthroughcount >= llimit )
{
- slapi_send_ldap_result( pb, LDAP_ADMINLIMIT_EXCEEDED, NULL, NULL, nentries, urls );
/* in case paged results, clean up the conn */
pagedresults_set_search_result(pb->pb_conn, NULL);
slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_SET, NULL );
@@ -1208,6 +1208,7 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension )
slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, NULL );
delete_search_result_set( &sr );
rc = SLAPI_FAIL_GENERAL;
+ slapi_send_ldap_result( pb, LDAP_ADMINLIMIT_EXCEEDED, NULL, NULL, nentries, urls );
goto bail;
}
@@ -1394,12 +1395,14 @@ ldbm_back_next_search_entry_ext( Slapi_PBlock *pb, int use_extension )
else
{
cache_return ( &inst->inst_cache, &(sr->sr_entry) );
+ sr->sr_entry = NULL;
}
}
else
{
/* Failed the filter test, and this isn't a VLV Search */
cache_return( &inst->inst_cache, &(sr->sr_entry) );
+ sr->sr_entry = NULL;
if (LDAP_UNWILLING_TO_PERFORM == filter_test) {
/* Need to catch this error to detect the vattr loop */
slapi_send_ldap_result( pb, filter_test, NULL,
@@ -1459,6 +1462,7 @@ delete_search_result_set( back_search_result_set **sr )
{
idl_free( (*sr)->sr_candidates );
}
+ memset( *sr, 0, sizeof( back_search_result_set ) );
slapi_ch_free( (void**)sr );
}
diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c
index d06dd2d..761d48a 100644
--- a/ldap/servers/slapd/opshared.c
+++ b/ldap/servers/slapd/opshared.c
@@ -221,6 +221,7 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
Slapi_Backend *pr_be = NULL;
void *pr_search_result = NULL;
int pr_search_result_count = 0;
+ int pr_reset_processing = 0;
be_list[0] = NULL;
referral_list[0] = NULL;
@@ -371,6 +372,12 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
rc = pagedresults_parse_control_value(ctl_value,
&pagesize, &curr_search_count);
if (LDAP_SUCCESS == rc) {
+ if (pagedresults_check_or_set_processing(pb->pb_conn)) {
+ send_ldap_result(pb, LDAP_UNWILLING_TO_PERFORM,
+ NULL, "Simple Paged Results Search already in progress on this connection", 0, NULL);
+ goto free_and_return_nolock;
+ }
+ pr_reset_processing = 1; /* need to reset after we are done with this op */
operation->o_flags |= OP_FLAG_PAGED_RESULTS;
pr_be = pagedresults_get_current_be(pb->pb_conn);
pr_search_result = pagedresults_get_search_result(pb->pb_conn);
@@ -837,6 +844,9 @@ next_be:
slapi_pblock_set(pb, SLAPI_PLUGIN_OPRETURN, &rc);
index_subsys_filter_decoders_done(pb);
slapi_sdn_done(&sdn);
+ if (pr_reset_processing) {
+ pagedresults_reset_processing(pb->pb_conn);
+ }
}
/* Returns 1 if this processing on this entry is finished
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
index e82053b..919dd4c 100644
--- a/ldap/servers/slapd/pagedresults.c
+++ b/ldap/servers/slapd/pagedresults.c
@@ -313,3 +313,40 @@ pagedresults_set_timelimit(Connection *conn, time_t timelimit)
return rc;
}
+/*
+ * check to see if this connection is currently processing
+ * a pagedresults search - if it is, return True - if not,
+ * mark that it is processing, and return False
+ */
+int
+pagedresults_check_or_set_processing(Connection *conn)
+{
+ int ret = 0;
+ if (conn) {
+ PR_Lock(conn->c_mutex);
+ ret = conn->c_flags&CONN_FLAG_PAGEDRESULTS_PROCESSING;
+ /* if ret is true, the following doesn't do anything */
+ conn->c_flags |= CONN_FLAG_PAGEDRESULTS_PROCESSING;
+ PR_Unlock(conn->c_mutex);
+ }
+ return ret;
+}
+
+/*
+ * mark the connection as being done with pagedresults
+ * processing - returns True if it was processing,
+ * False otherwise
+ */
+int
+pagedresults_reset_processing(Connection *conn)
+{
+ int ret = 0;
+ if (conn) {
+ PR_Lock(conn->c_mutex);
+ ret = conn->c_flags&CONN_FLAG_PAGEDRESULTS_PROCESSING;
+ /* if ret is false, the following doesn't do anything */
+ conn->c_flags &= ~CONN_FLAG_PAGEDRESULTS_PROCESSING;
+ PR_Unlock(conn->c_mutex);
+ }
+ return ret;
+}
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h
index 96b2ad3..f11565c 100644
--- a/ldap/servers/slapd/proto-slap.h
+++ b/ldap/servers/slapd/proto-slap.h
@@ -1349,6 +1349,8 @@ int pagedresults_set_with_sort(Connection *conn, int flags);
int pagedresults_get_sort_result_code(Connection *conn);
int pagedresults_set_sort_result_code(Connection *conn, int code);
int pagedresults_set_timelimit(Connection *conn, time_t timelimit);
+int pagedresults_check_or_set_processing(Connection *conn);
+int pagedresults_reset_processing(Connection *conn);
/*
* sort.c
diff --git a/ldap/servers/slapd/slap.h b/ldap/servers/slapd/slap.h
index 534b6eb..1ec7224 100644
--- a/ldap/servers/slapd/slap.h
+++ b/ldap/servers/slapd/slap.h
@@ -1342,6 +1342,13 @@ typedef struct conn {
#define CONN_FLAG_PAGEDRESULTS_WITH_SORT 64 /* paged results control is
* sent with server side sorting
*/
+
+#define CONN_FLAG_PAGEDRESULTS_UNINDEXED 128 /* If the search is unindexed,
+ * store the info in c_flags
+ */
+#define CONN_FLAG_PAGEDRESULTS_PROCESSING 256 /* there is an operation
+ * processing a pagedresults search
+ */
#define CONN_GET_SORT_RESULT_CODE (-1)
#define START_TLS_OID "1.3.6.1.4.1.1466.20037"
commit 13748d9e7606e19238b6e0d1cdaa561794d0a1de
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Thu Jan 27 12:10:01 2011 -0800
Bug 672468 - Don't use empty path elements in LD_LIBRARY_PATH
Many of the command line wrappers and perl scripts have their
LD_LIBRARY_PATH and SHLIB_PATH defined with macros that are
replaced by configure. It is common for some of these macros
to be empty, which results in empty path elements.
This patch adds a bit more logic to the creation of the libpath
to avoid empty path elements and leading and trailing colons.
diff --git a/ldap/admin/src/scripts/start-dirsrv.in b/ldap/admin/src/scripts/start-dirsrv.in
index d3788be..f910e90 100755
--- a/ldap/admin/src/scripts/start-dirsrv.in
+++ b/ldap/admin/src/scripts/start-dirsrv.in
@@ -6,6 +6,11 @@
# 1: Server could not be started
# 2: Server already running
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
# Starts a single instance
start_instance() {
# The first argument is the server ID. Anything
@@ -22,9 +27,15 @@ start_instance() {
fi
prefix="$DS_ROOT"
- LD_LIBRARY_PATH=$prefix$SERVER_DIR:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:@pcre_libdir@
+
+ libpath_add "$prefix$SERVER_DIR"
+ libpath_add "$prefix@nss_libdir@"
+ libpath_add "$prefix@libdir@"
+ libpath_add "@nss_libdir@"
+ libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
- SHLIB_PATH=$prefix$SERVER_DIR:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:@pcre_libdir@
+ SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
DS_CONFIG_DIR=$CONFIG_DIR
diff --git a/ldap/admin/src/scripts/template-bak2db.in b/ldap/admin/src/scripts/template-bak2db.in
index 12d46ca..093e156 100755
--- a/ldap/admin/src/scripts/template-bak2db.in
+++ b/ldap/admin/src/scripts/template-bak2db.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-bak2db.pl.in b/ldap/admin/src/scripts/template-bak2db.pl.in
index 0d057e7..2656d6d 100644
--- a/ldap/admin/src/scripts/template-bak2db.pl.in
+++ b/ldap/admin/src/scripts/template-bak2db.pl.in
@@ -125,8 +125,25 @@ $entry = "${dn}${misc}${cn}${nsinstance}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-db2bak.in b/ldap/admin/src/scripts/template-db2bak.in
index a0fe1f5..5b9fb04 100755
--- a/ldap/admin/src/scripts/template-db2bak.in
+++ b/ldap/admin/src/scripts/template-db2bak.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-db2bak.pl.in b/ldap/admin/src/scripts/template-db2bak.pl.in
index fac526d..27c73b0 100644
--- a/ldap/admin/src/scripts/template-db2bak.pl.in
+++ b/ldap/admin/src/scripts/template-db2bak.pl.in
@@ -114,9 +114,26 @@ $entry = "${dn}${misc}${cn}${nsarchivedir}${nsdbtype}";
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
print("Back up directory: $archivedir\n");
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-db2index.in b/ldap/admin/src/scripts/template-db2index.in
index e0e9a55..3dc4740 100755
--- a/ldap/admin/src/scripts/template-db2index.in
+++ b/ldap/admin/src/scripts/template-db2index.in
@@ -4,10 +4,16 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-db2index.pl.in b/ldap/admin/src/scripts/template-db2index.pl.in
index e993d88..431a48f 100644
--- a/ldap/admin/src/scripts/template-db2index.pl.in
+++ b/ldap/admin/src/scripts/template-db2index.pl.in
@@ -69,8 +69,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -224,3 +229,15 @@ $entry = "${dn}${misc}${cn}${nsinstance}${attribute}${vlvattribute}";
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-db2ldif.in b/ldap/admin/src/scripts/template-db2ldif.in
index e519f3e..2989b77 100755
--- a/ldap/admin/src/scripts/template-db2ldif.in
+++ b/ldap/admin/src/scripts/template-db2ldif.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-db2ldif.pl.in b/ldap/admin/src/scripts/template-db2ldif.pl.in
index af5f0d7..ff36000 100644
--- a/ldap/admin/src/scripts/template-db2ldif.pl.in
+++ b/ldap/admin/src/scripts/template-db2ldif.pl.in
@@ -258,9 +258,26 @@ $entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsreplica}${
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
print("Exporting to ldif file: ${ldiffile}\n");
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-dbverify.in b/ldap/admin/src/scripts/template-dbverify.in
index 0f71450..8c1a98e 100755
--- a/ldap/admin/src/scripts/template-dbverify.in
+++ b/ldap/admin/src/scripts/template-dbverify.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in b/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
index 48a8926..3f295c5 100644
--- a/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
+++ b/ldap/admin/src/scripts/template-fixup-linkedattrs.pl.in
@@ -61,8 +61,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -150,3 +155,15 @@ $entry = "${dn}${misc}${cn}${basedn}${linkdn}";
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-fixup-memberof.pl.in b/ldap/admin/src/scripts/template-fixup-memberof.pl.in
index 3f04d4a..925ab89 100644
--- a/ldap/admin/src/scripts/template-fixup-memberof.pl.in
+++ b/ldap/admin/src/scripts/template-fixup-memberof.pl.in
@@ -65,8 +65,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -161,3 +166,15 @@ $entry = "${dn}${misc}${cn}${basedn}${filter}";
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ldif2db.in b/ldap/admin/src/scripts/template-ldif2db.in
index ce64193..8f92acf 100755
--- a/ldap/admin/src/scripts/template-ldif2db.in
+++ b/ldap/admin/src/scripts/template-ldif2db.in
@@ -4,10 +4,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-ldif2db.pl.in b/ldap/admin/src/scripts/template-ldif2db.pl.in
index 1d99123..33f02e1 100644
--- a/ldap/admin/src/scripts/template-ldif2db.pl.in
+++ b/ldap/admin/src/scripts/template-ldif2db.pl.in
@@ -217,8 +217,26 @@ $entry = "${dn}${misc}${cn}${nsinstance}${nsincluded}${nsexcluded}${nsldiffiles}
$vstr = "";
if ($verbose != 0) { $vstr = "-v"; }
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
+
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ldif2ldap.in b/ldap/admin/src/scripts/template-ldif2ldap.in
index 1a98e3a..7767c72 100755
--- a/ldap/admin/src/scripts/template-ldif2ldap.in
+++ b/ldap/admin/src/scripts/template-ldif2ldap.in
@@ -5,10 +5,20 @@ if [ "$prefix" = "/" ] ; then
prefix=""
fi
-PATH=$prefix@ldapsdk_bindir@:@ldapsdk_bindir@
-LD_LIBRARY_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix@ldapsdk_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
+PATH=$prefix@ldapsdk_bindir@:@ldapsdk_bindir@
ldapmodify -a -p {{SERVER-PORT}} -D "$1" -w "$2" -f $3
diff --git a/ldap/admin/src/scripts/template-monitor.in b/ldap/admin/src/scripts/template-monitor.in
index e4683ae..29dae9e 100755
--- a/ldap/admin/src/scripts/template-monitor.in
+++ b/ldap/admin/src/scripts/template-monitor.in
@@ -1,11 +1,22 @@
#!/bin/sh
-PATH=$prefix@ldapsdk_bindir@:@ldapsdk_bindir@
-LD_LIBRARY_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix@ldapsdk_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix@ldapsdk_libdir@:@ldapsdk_libdir@:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
+PATH=$prefix@ldapsdk_bindir@:@ldapsdk_bindir@
+
if [ "x$1" != "x" ];
then MDN="$1";
else MDN="cn=monitor";
diff --git a/ldap/admin/src/scripts/template-ns-accountstatus.pl.in b/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
index 258a602..7c216d3 100644
--- a/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
+++ b/ldap/admin/src/scripts/template-ns-accountstatus.pl.in
@@ -393,8 +393,13 @@ else
debug("Running ** $cmd ** $operation\n");
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$ldapsearch="ldapsearch -1";
$ldapmodify="ldapmodify";
@@ -842,3 +847,15 @@ debug("$modrole, $entry\n");
out("$entry $state.\n");
exit 0;
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ns-activate.pl.in b/ldap/admin/src/scripts/template-ns-activate.pl.in
index 258a602..7c216d3 100644
--- a/ldap/admin/src/scripts/template-ns-activate.pl.in
+++ b/ldap/admin/src/scripts/template-ns-activate.pl.in
@@ -393,8 +393,13 @@ else
debug("Running ** $cmd ** $operation\n");
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$ldapsearch="ldapsearch -1";
$ldapmodify="ldapmodify";
@@ -842,3 +847,15 @@ debug("$modrole, $entry\n");
out("$entry $state.\n");
exit 0;
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ns-inactivate.pl.in b/ldap/admin/src/scripts/template-ns-inactivate.pl.in
index 258a602..7c216d3 100644
--- a/ldap/admin/src/scripts/template-ns-inactivate.pl.in
+++ b/ldap/admin/src/scripts/template-ns-inactivate.pl.in
@@ -393,8 +393,13 @@ else
debug("Running ** $cmd ** $operation\n");
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$ldapsearch="ldapsearch -1";
$ldapmodify="ldapmodify";
@@ -842,3 +847,15 @@ debug("$modrole, $entry\n");
out("$entry $state.\n");
exit 0;
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in
index fe09920..f55ae1a 100755
--- a/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in
+++ b/ldap/admin/src/scripts/template-ns-newpwpolicy.pl.in
@@ -47,8 +47,13 @@ use lib qw(@perlpath@);
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
# Add new password policy specific entries
#############################################################################
@@ -283,3 +288,15 @@ sub usage {
}
} # end of $opt_U
}
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-restoreconfig.in b/ldap/admin/src/scripts/template-restoreconfig.in
index 0e5de9b..480af88 100755
--- a/ldap/admin/src/scripts/template-restoreconfig.in
+++ b/ldap/admin/src/scripts/template-restoreconfig.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-saveconfig.in b/ldap/admin/src/scripts/template-saveconfig.in
index 737c97b..4c8f3d6 100755
--- a/ldap/admin/src/scripts/template-saveconfig.in
+++ b/ldap/admin/src/scripts/template-saveconfig.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-schema-reload.pl.in b/ldap/admin/src/scripts/template-schema-reload.pl.in
index d4a510f..0a9ff46 100644
--- a/ldap/admin/src/scripts/template-schema-reload.pl.in
+++ b/ldap/admin/src/scripts/template-schema-reload.pl.in
@@ -60,8 +60,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -150,3 +155,15 @@ $entry = "${dn}${misc}${cn}${basedn}${schemadir}";
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-suffix2instance.in b/ldap/admin/src/scripts/template-suffix2instance.in
index 994f8af..8186ef8 100755
--- a/ldap/admin/src/scripts/template-suffix2instance.in
+++ b/ldap/admin/src/scripts/template-suffix2instance.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-syntax-validate.pl.in b/ldap/admin/src/scripts/template-syntax-validate.pl.in
index 4e4fa74..23f43f8 100644
--- a/ldap/admin/src/scripts/template-syntax-validate.pl.in
+++ b/ldap/admin/src/scripts/template-syntax-validate.pl.in
@@ -65,8 +65,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -161,3 +166,15 @@ $entry = "${dn}${misc}${cn}${basedn}${filter}";
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-upgradedb.in b/ldap/admin/src/scripts/template-upgradedb.in
index 9b6f03d..a36acc6 100755
--- a/ldap/admin/src/scripts/template-upgradedb.in
+++ b/ldap/admin/src/scripts/template-upgradedb.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/ldap/admin/src/scripts/template-upgradednformat.in b/ldap/admin/src/scripts/template-upgradednformat.in
index ea4f18a..d1ff5c8 100755
--- a/ldap/admin/src/scripts/template-upgradednformat.in
+++ b/ldap/admin/src/scripts/template-upgradednformat.in
@@ -11,10 +11,17 @@ prefix="{{DS-ROOT}}"
if [ "$prefix" = "/" ] ; then
prefix=""
fi
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:$prefix@pcre_libdir@
-if [ -n "$prefix" ] ; then
- LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@nss_libdir@"
-fi
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
diff --git a/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in b/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
index bd8c257..274dc2f 100644
--- a/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
+++ b/ldap/admin/src/scripts/template-usn-tombstone-cleanup.pl.in
@@ -64,8 +64,13 @@ $verbose = 0;
$prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "$prefix@ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
-$ENV{'SHLIB_PATH'} = "$prefix@nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib";
+
+libpath_add("$prefix@nss_libdir@");
+libpath_add("$prefix/usr/lib");
+libpath_add("@nss_libdir@");
+libpath_add("/usr/lib");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
$i = 0;
while ($i <= $#ARGV)
@@ -178,3 +183,15 @@ $entry = "${dn}${misc}${cn}${basedn}${args}";
open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" );
print(FOO "$entry");
close(FOO);
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-verify-db.pl.in b/ldap/admin/src/scripts/template-verify-db.pl.in
index 25bb46b..c352eb2 100644
--- a/ldap/admin/src/scripts/template-verify-db.pl.in
+++ b/ldap/admin/src/scripts/template-verify-db.pl.in
@@ -170,8 +170,11 @@ my $dbdirs = getDbDir($startpoint);
my $prefix = "{{DS-ROOT}}";
$ENV{'PATH'} = "{{INST-DIR}}:$prefix@db_bindir@:$prefix/usr/bin:@db_bindir@:/usr/bin";
-$ENV{'LD_LIBRARY_PATH'} = "@db_libdir@:@libdir@";
-$ENV{'SHLIB_PATH'} = "@db_libdir@:@libdir@";
+
+libpath_add("@db_libdir@");
+libpath_add("@libdir@");
+
+$ENV{'SHLIB_PATH'} = "$ENV{'LD_LIBRARY_PATH'}";
# Check transaction logs by db_printlog
for (my $i = 0; "$$dbdirs[$i]" ne ""; $i++)
@@ -256,3 +259,15 @@ else
print "Good\n";
exit(0);
}
+
+sub libpath_add {
+ my $libpath = shift;
+
+ if ($libpath) {
+ if ($ENV{'LD_LIBRARY_PATH'}) {
+ $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath";
+ } else {
+ $ENV{'LD_LIBRARY_PATH'} = "$libpath";
+ }
+ }
+}
diff --git a/ldap/admin/src/scripts/template-vlvindex.in b/ldap/admin/src/scripts/template-vlvindex.in
index e6cd743..193667a 100755
--- a/ldap/admin/src/scripts/template-vlvindex.in
+++ b/ldap/admin/src/scripts/template-vlvindex.in
@@ -1,9 +1,20 @@
#!/bin/sh
prefix="{{DS-ROOT}}"
-LD_LIBRARY_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "$prefix{{SERVER-DIR}}"
+libpath_add "$prefix@nss_libdir@"
+libpath_add "$prefix@libdir@"
+libpath_add "@nss_libdir@"
+libpath_add "$prefix@pcre_libdir@"
+
export LD_LIBRARY_PATH
-SHLIB_PATH=$prefix/{{SERVER-DIR}}:$prefix@nss_libdir@:$prefix@libdir@:@nss_libdir@:$prefix@pcre_libdir@
+SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
cd {{SERVERBIN-DIR}}
diff --git a/wrappers/cl-dump.in b/wrappers/cl-dump.in
index 9a6301a..d42c6f2 100755
--- a/wrappers/cl-dump.in
+++ b/wrappers/cl-dump.in
@@ -43,8 +43,15 @@
# wrapper for cl-dump.pl
# set the library paths and call cl-dump.pl
-LD_LIBRARY_PATH=@nss_libdir@:/usr/lib
-SHLIB_PATH=@nss_libdir@:/usr/lib
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "/usr/lib"
+
+SHLIB_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH SHLIB_PATH
@bindir(a)/cl-dump.pl "$@"
diff --git a/wrappers/dbscan.in b/wrappers/dbscan.in
index 115a126..942ffc9 100755
--- a/wrappers/dbscan.in
+++ b/wrappers/dbscan.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nspr_libdir@:@db_libdir@
BIN_DIR=@bindir@
COMMAND=dbscan-bin
@@ -14,7 +13,14 @@ COMMAND=dbscan-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nspr_libdir@"
+libpath_add "@db_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/infadd.in b/wrappers/infadd.in
index 89eb0ea..3ebc40b 100755
--- a/wrappers/infadd.in
+++ b/wrappers/infadd.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=infadd-bin
@@ -14,7 +13,16 @@ COMMAND=infadd-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/initscript.in b/wrappers/initscript.in
index e84ff9d..8be58db 100644
--- a/wrappers/initscript.in
+++ b/wrappers/initscript.in
@@ -54,6 +54,11 @@ success()
}
}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
# On Solaris /var/run is in tmpfs and gets wiped out upon reboot
# we have to recreate the /var/run/@package_name@ directory
# We also have to make sure that the directory is writable
@@ -120,7 +125,10 @@ fi
start() {
if [ -n "$INSTANCES" ]; then
- LD_LIBRARY_PATH=@libdir@/@package_name@:@nss_libdir@:@pcre_libdir@
+ libpath_add "@libdir@/@package_name@"
+ libpath_add "@nss_libdir@"
+ libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
echo "Starting $prog: "
# Start every slapd instance that isn't already running
diff --git a/wrappers/ldap-agent.in b/wrappers/ldap-agent.in
index 266507a..62c3d6e 100755
--- a/wrappers/ldap-agent.in
+++ b/wrappers/ldap-agent.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@netsnmp_libdir@
BIN_DIR=@sbindir@
COMMAND=ldap-agent-bin
@@ -17,7 +16,16 @@ export MIBS
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@netsnmp_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/ldclt.in b/wrappers/ldclt.in
index 079e33c..7f0a3cc 100755
--- a/wrappers/ldclt.in
+++ b/wrappers/ldclt.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=ldclt-bin
@@ -14,7 +13,16 @@ COMMAND=ldclt-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
SASL_PATH=@sasl_path@
export SASL_PATH
diff --git a/wrappers/ldif.in b/wrappers/ldif.in
index 8fcaf17..5407920 100755
--- a/wrappers/ldif.in
+++ b/wrappers/ldif.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=ldif-bin
@@ -14,7 +13,16 @@ COMMAND=ldif-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/migratecred.in b/wrappers/migratecred.in
index dd44800..49de8d7 100755
--- a/wrappers/migratecred.in
+++ b/wrappers/migratecred.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@serverdir@:@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@pcre_libdir@
BIN_DIR=@bindir@
COMMAND=migratecred-bin
@@ -14,7 +13,18 @@ COMMAND=migratecred-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@serverdir@"
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/mmldif.in b/wrappers/mmldif.in
index a11932e..aa09bae 100755
--- a/wrappers/mmldif.in
+++ b/wrappers/mmldif.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@serverdir@:@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@pcre_libdir@
BIN_DIR=@bindir@
COMMAND=mmldif-bin
@@ -14,7 +13,18 @@ COMMAND=mmldif-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@serverdir@"
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/pwdhash.in b/wrappers/pwdhash.in
index b3ef3fa..69618fa 100755
--- a/wrappers/pwdhash.in
+++ b/wrappers/pwdhash.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@serverdir@:@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@:@pcre_libdir@
BIN_DIR=@bindir@
COMMAND=pwdhash-bin
@@ -14,7 +13,18 @@ COMMAND=pwdhash-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@serverdir@"
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+libpath_add "@pcre_libdir@"
+
export LD_LIBRARY_PATH
diff --git a/wrappers/repl-monitor.in b/wrappers/repl-monitor.in
index 116dbb5..cba72a1 100755
--- a/wrappers/repl-monitor.in
+++ b/wrappers/repl-monitor.in
@@ -43,8 +43,15 @@
# wrapper for repl-monitor.pl
# set the library paths and call repl-monitor.pl
-LD_LIBRARY_PATH=@nss_libdir@:/usr/lib
-SHLIB_PATH=@nss_libdir@:/usr/lib
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "/usr/lib"
+
+SHLIB_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH SHLIB_PATH
@bindir(a)/repl-monitor.pl "$@"
diff --git a/wrappers/rsearch.in b/wrappers/rsearch.in
index cebecf1..a78abd7 100755
--- a/wrappers/rsearch.in
+++ b/wrappers/rsearch.in
@@ -4,7 +4,6 @@
## (1) Specify variables used by this script. ##
###############################################################################
-LIB_DIR=@nss_libdir@:@nspr_libdir@:@ldapsdk_libdir@:@sasl_libdir@
BIN_DIR=@bindir@
COMMAND=rsearch-bin
@@ -14,7 +13,16 @@ COMMAND=rsearch-bin
## search order this command wrapper uses to find shared libraries. ##
###############################################################################
-LD_LIBRARY_PATH=${LIB_DIR}
+libpath_add() {
+ [ -z "$1" ] && return
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
+}
+
+libpath_add "@nss_libdir@"
+libpath_add "@nspr_libdir@"
+libpath_add "@ldapsdk_libdir@"
+libpath_add "@sasl_libdir@"
+
export LD_LIBRARY_PATH
commit 3e345888813c3cabaf99898155b7e2fed3ed3ed4
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Tue Jan 25 14:52:13 2011 -0800
Bug 671199 - Don't allow other to write to rundir
The persmissions on /var/run/dirsrv currently get set to 777 by
the setup program. There were some discrepencies with the way the
changeOwnerMode subroutine is used that cause 777 to be the mode
set when we intended for it to be 770. This patch fixes up the
way changeOwnerMode is used to sllow one to reset the group
ownership without altering the permissions for other.
In addition, this patch makes an upgrade remove any permissions that
are set for other on the rundir.
diff --git a/ldap/admin/src/scripts/10fixrundir.pl b/ldap/admin/src/scripts/10fixrundir.pl
index a1e7524..b7a395c 100644
--- a/ldap/admin/src/scripts/10fixrundir.pl
+++ b/ldap/admin/src/scripts/10fixrundir.pl
@@ -6,6 +6,7 @@ sub runinst {
my ($inf, $inst, $dseldif, $conn) = @_;
my @errs;
+ my $mode;
# see if nsslapd-rundir is defined
my $ent = $conn->search("cn=config", "base", "(objectclass=*)");
@@ -24,5 +25,15 @@ sub runinst {
}
}
+ # ensure that other doesn't have permissions on rundir
+ $mode = (stat($inf->{slapd}->{run_dir}))[2] or return ('error_chmoding_file', $inf->{slapd}->{run_dir}, $!);
+ # mask off permissions for other
+ $mode &= 07770;
+ $! = 0; # clear errno
+ chmod $mode, $inf->{slapd}->{run_dir};
+ if ($!) {
+ return ('error_chmoding_file', $inf->{slapd}->{run_dir}, $!);
+ }
+
return ();
}
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index 86a8b0f..3262ec8 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -161,6 +161,7 @@ sub changeOwnerMode {
my $mode = shift;
my $it = shift;
my $gidonly = shift;
+ my $othermode = shift;
my $uid = getpwnam $inf->{General}->{SuiteSpotUserID};
my $gid = -1; # default to leave it alone
@@ -170,7 +171,8 @@ sub changeOwnerMode {
$gid = getgrnam $inf->{General}->{SuiteSpotGroup};
}
- $mode = getMode($inf, $mode, $gidonly);
+ $mode = getMode($inf, $mode, $othermode);
+
$! = 0; # clear errno
chmod $mode, $it;
if ($!) {
@@ -236,9 +238,8 @@ sub makeDSDirs {
debug(3, "Root user " . $inf->{General}->{SuiteSpotUserID} . " already has access to $inf->{slapd}->{run_dir} - skipping\n");
} else {
my $dir = $inf->{slapd}->{run_dir};
- # rwx by user only, or by user & group if a group is defined
- @errs = changeOwnerMode($inf, 7, $dir, 7);
- debug(3, "Changed owner of $dir to " . $inf->{General}->{SuiteSpotUserID} . ": error @errs\n");
+ # rwx by user only, or by user & group if a group is defined. Also only change the group ownership.
+ @errs = changeOwnerMode($inf, 7, $dir, 1);
debug(3, "\t" . `/bin/ls -ld $dir`);
}
# set the group of the parent dir of config_dir and inst_dir
@@ -246,8 +247,8 @@ sub makeDSDirs {
for my $kw (qw(inst_dir config_dir)) {
my $dir = $inf->{slapd}->{$kw};
my $parent = dirname($dir);
- # changeOwnerMode(inf, mode, file, gidonly & default mode);
- @errs = changeOwnerMode($inf, 7, $parent, 5);
+ # changeOwnerMode(inf, mode, file, gidonly, othermode);
+ @errs = changeOwnerMode($inf, 7, $parent, 1, 5);
if (@errs) {
return @errs;
}
13 years, 2 months
Branch '389-ds-base-1.2.8' - ldap/servers
by Nathan Kinder
ldap/servers/plugins/mep/mep.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
New commits:
commit 42fd02cefd7ae7e27fd6a6f06a80e2329b23cd3b
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Mon Feb 21 14:44:46 2011 -0800
Bug 678646 - Ignore tombstone operations in managed entry plug-in
The managed entry plug-in currently doesn't ignore operations tombstone
entries. If one is using replication and deletes an origin entry, then
re-adds an origin entry with the same name, the associated managed entry
will be deleted when the tombstone is cleaned up. This results in an
origin entry with no associated managed entry.
This patch makes the managed entry delete post-op skip processing for
tombstone entries.
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index 5ecc815..cc4be8e 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -2008,6 +2008,12 @@ mep_mod_post_op(Slapi_PBlock *pb)
goto bail;
}
+ /* If the entry is a tombstone, just bail. */
+ if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
+ SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ goto bail;
+ }
+
/* Check if we're an origin entry. Update the
* mapped attrs of it's managed entry if so. */
managed_dn = slapi_entry_attr_get_charptr(e, MEP_MANAGED_ENTRY_TYPE);
@@ -2108,6 +2114,12 @@ mep_add_post_op(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &e);
if (e) {
+ /* If the entry is a tombstone, just bail. */
+ if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
+ SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ return 0;
+ }
+
/* Check if a config entry applies
* to the entry being added. */
mep_config_read_lock();
@@ -2164,6 +2176,12 @@ mep_del_post_op(Slapi_PBlock *pb)
if (e) {
char *managed_dn = NULL;
+ /* If the entry is a tombstone, just bail. */
+ if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
+ SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ return 0;
+ }
+
/* See if we're an origin entry . */
managed_dn = slapi_entry_attr_get_charptr(e, MEP_MANAGED_ENTRY_TYPE);
if (managed_dn) {
@@ -2236,6 +2254,12 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
return 0;
}
+ /* If the entry is a tombstone, just bail. */
+ if (slapi_entry_attr_hasvalue(post_e, SLAPI_ATTR_OBJECTCLASS,
+ SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ return 0;
+ }
+
/* See if we're an origin entry . */
managed_dn = slapi_entry_attr_get_charptr(post_e, MEP_MANAGED_ENTRY_TYPE);
if (managed_dn) {
13 years, 3 months
ldap/servers
by Nathan Kinder
ldap/servers/plugins/mep/mep.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
New commits:
commit 59209af33184119912d2807147f3175a36dded7e
Author: Nathan Kinder <nkinder(a)redhat.com>
Date: Mon Feb 21 14:44:46 2011 -0800
Bug 678646 - Ignore tombstone operations in managed entry plug-in
The managed entry plug-in currently doesn't ignore operations tombstone
entries. If one is using replication and deletes an origin entry, then
re-adds an origin entry with the same name, the associated managed entry
will be deleted when the tombstone is cleaned up. This results in an
origin entry with no associated managed entry.
This patch makes the managed entry delete post-op skip processing for
tombstone entries.
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index 5ecc815..cc4be8e 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -2008,6 +2008,12 @@ mep_mod_post_op(Slapi_PBlock *pb)
goto bail;
}
+ /* If the entry is a tombstone, just bail. */
+ if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
+ SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ goto bail;
+ }
+
/* Check if we're an origin entry. Update the
* mapped attrs of it's managed entry if so. */
managed_dn = slapi_entry_attr_get_charptr(e, MEP_MANAGED_ENTRY_TYPE);
@@ -2108,6 +2114,12 @@ mep_add_post_op(Slapi_PBlock *pb)
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &e);
if (e) {
+ /* If the entry is a tombstone, just bail. */
+ if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
+ SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ return 0;
+ }
+
/* Check if a config entry applies
* to the entry being added. */
mep_config_read_lock();
@@ -2164,6 +2176,12 @@ mep_del_post_op(Slapi_PBlock *pb)
if (e) {
char *managed_dn = NULL;
+ /* If the entry is a tombstone, just bail. */
+ if (slapi_entry_attr_hasvalue(e, SLAPI_ATTR_OBJECTCLASS,
+ SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ return 0;
+ }
+
/* See if we're an origin entry . */
managed_dn = slapi_entry_attr_get_charptr(e, MEP_MANAGED_ENTRY_TYPE);
if (managed_dn) {
@@ -2236,6 +2254,12 @@ mep_modrdn_post_op(Slapi_PBlock *pb)
return 0;
}
+ /* If the entry is a tombstone, just bail. */
+ if (slapi_entry_attr_hasvalue(post_e, SLAPI_ATTR_OBJECTCLASS,
+ SLAPI_ATTR_VALUE_TOMBSTONE)) {
+ return 0;
+ }
+
/* See if we're an origin entry . */
managed_dn = slapi_entry_attr_get_charptr(post_e, MEP_MANAGED_ENTRY_TYPE);
if (managed_dn) {
13 years, 3 months