|
|
a2f18f |
From 6a07ebb40ee121c176f789d01937d7ceedc77776 Mon Sep 17 00:00:00 2001
|
|
|
a2f18f |
From: Noriko Hosoi <nhosoi@redhat.com>
|
|
|
a2f18f |
Date: Thu, 20 Aug 2015 17:01:28 -0700
|
|
|
a2f18f |
Subject: [PATCH 49/52] Ticket #48254 - CLI db2index fails with usage errors
|
|
|
a2f18f |
|
|
|
a2f18f |
Bug Description:
|
|
|
a2f18f |
1) CLI db2index had an issue in option handling, which accidentally
|
|
|
a2f18f |
added '=' at the end of the previous option.
|
|
|
a2f18f |
2) if a value of an option includes a white space, e.g., -T "by MCC
|
|
|
a2f18f |
ou=People dc=example dc=com", the value was not passed to the program
|
|
|
a2f18f |
as a string.
|
|
|
a2f18f |
|
|
|
a2f18f |
Fix Description:
|
|
|
a2f18f |
1) Removed unnecessary '='.
|
|
|
a2f18f |
2) Quote $OPTARG which could include a white space, and call ns-slapd
|
|
|
a2f18f |
command line vai eval.
|
|
|
a2f18f |
|
|
|
a2f18f |
https://fedorahosted.org/389/ticket/48254
|
|
|
a2f18f |
|
|
|
a2f18f |
Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
|
|
|
a2f18f |
|
|
|
a2f18f |
(cherry picked from commit 3507c46c9f1156df11b6cf05eba695d81088b416)
|
|
|
a2f18f |
(cherry picked from commit a6d7e3bd29eb63def170f73dc21e967df230f20a)
|
|
|
a2f18f |
---
|
|
|
a2f18f |
ldap/admin/src/scripts/db2index.in | 16 ++++++++--------
|
|
|
a2f18f |
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
a2f18f |
|
|
|
a2f18f |
diff --git a/ldap/admin/src/scripts/db2index.in b/ldap/admin/src/scripts/db2index.in
|
|
|
a2f18f |
index 2b76cd1..6a0785e 100755
|
|
|
a2f18f |
--- a/ldap/admin/src/scripts/db2index.in
|
|
|
a2f18f |
+++ b/ldap/admin/src/scripts/db2index.in
|
|
|
a2f18f |
@@ -39,13 +39,13 @@ do
|
|
|
a2f18f |
benameopt="set";;
|
|
|
a2f18f |
s) args=$args" -s $OPTARG"
|
|
|
a2f18f |
includeSuffix="set";;
|
|
|
a2f18f |
- t) args=$args" -t $OPTARG";;
|
|
|
a2f18f |
- T) args=$args=" -T $OPTARG";;
|
|
|
a2f18f |
- d) args=$args=" -d $OPTARG";;
|
|
|
a2f18f |
- a) args=$args=" -a $OPTARG";;
|
|
|
a2f18f |
- x) args=$args=" -x $OPTARG";;
|
|
|
a2f18f |
- v) args=$args=" -v";;
|
|
|
a2f18f |
- S) args=$args=" -S";;
|
|
|
a2f18f |
+ t) args=$args" -t "\"$OPTARG\";;
|
|
|
a2f18f |
+ T) args=$args" -T "\"$OPTARG\";;
|
|
|
a2f18f |
+ d) args=$args" -d $OPTARG";;
|
|
|
a2f18f |
+ a) args=$args" -a $OPTARG";;
|
|
|
a2f18f |
+ x) args=$args" -x $OPTARG";;
|
|
|
a2f18f |
+ v) args=$args" -v";;
|
|
|
a2f18f |
+ S) args=$args" -S";;
|
|
|
a2f18f |
D) args=$args" -D $OPTARG";;
|
|
|
a2f18f |
?) usage
|
|
|
a2f18f |
exit 1;;
|
|
|
a2f18f |
@@ -79,5 +79,5 @@ then
|
|
|
a2f18f |
usage
|
|
|
a2f18f |
exit 1
|
|
|
a2f18f |
else
|
|
|
a2f18f |
- @sbindir@/ns-slapd db2index -D $CONFIG_DIR $args
|
|
|
a2f18f |
+ eval @sbindir@/ns-slapd db2index -D $CONFIG_DIR $args
|
|
|
a2f18f |
fi
|
|
|
a2f18f |
--
|
|
|
a2f18f |
1.9.3
|
|
|
a2f18f |
|