Bug 700627 - If nsslapd-port is modified, some command line tools in the server instance dir stop working
Summary: If nsslapd-port is modified, some command line tools in the server instance d...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Command Line Utilities
Version: 1.2.8
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Nathan Kinder
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 690319
TreeView+ depends on / blocked
 
Reported: 2011-04-28 20:27 UTC by Noriko Hosoi
Modified: 2015-01-04 23:48 UTC (History)
2 users (show)

Fixed In Version: 389-ds-base-1.3.1.0-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-18 19:50:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Noriko Hosoi 2011-04-28 20:27:13 UTC
Description of problem:
The initial port number is hardcoded in the tools.  They'd better be dynamically retrieved from the config file.
# egrep 389 *
bak2db.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
db2bak.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
db2index.pl:    $indexes_list="ldapsearch  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -s one " .
db2index.pl:    $vlvindexes_list="ldapsearch  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -s sub -b \"cn=\"$instance\", cn=ldbm database,cn=plugins,cn=config\" \"objectclass=vlvIndex\" cn";
db2index.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
db2ldif.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
fixup-linkedattrs.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
fixup-memberof.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
ldif2db.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
ldif2ldap:ldapmodify  -a -p 389 -D "$1" -w "$2" -f $3
monitor:ldapsearch  -p 389 -b "$MDN" -s base "objectClass=*"
ns-accountstatus.pl:$defport= "389";
ns-accountstatus.pl:$port= "389";
ns-activate.pl:$defport= "389";
ns-activate.pl:$port= "389";
ns-inactivate.pl:$defport= "389";
ns-inactivate.pl:$port= "389";
ns-newpwpolicy.pl:$opt_p = "389";
schema-reload.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
syntax-validate.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );
usn-tombstone-cleanup.pl:open(FOO, "| ldapmodify  $vstr -h <host> -p 389 -D \"$rootdn\" -w \"$passwd\" -a" );

Comment 1 Rich Megginson 2011-04-29 15:51:12 UTC
I think it would be better if we just got rid of all instance specific stuff from our command line tools.  We need to move them to @sbindir@ or @bindir@ and make them so that you just pass in the instance to operate on, and have a default instance if none is specified.

Ideally, we should just get rid of /usr/lib[64]/dirsrv/slapd-INSTANCE - it is problematic since many admins want to mount /usr read-only except for package install - this is the reason that ipa uses /var instead.

Comment 4 Martin Kosek 2012-01-04 13:23:44 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/47

Comment 5 Nathan Kinder 2013-12-18 19:50:07 UTC
This was fixed in 389-ds-base-1.3.1.0-1.


Note You need to log in before you can comment on or make changes to this bug.