andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
b69e47
From 3937047eee31638df068b3294aa90ef603915676 Mon Sep 17 00:00:00 2001
b69e47
From: Mark Reynolds <mreynolds@redhat.com>
b69e47
Date: Mon, 10 Apr 2017 14:55:55 -0400
b69e47
Subject: [PATCH] Issue 47662 - CLI args get removed
b69e47
b69e47
Bug Description.  Regression from previous fix.  The process to check unknown
b69e47
                  CLI options blows away the built-in arg list "$@"
b69e47
b69e47
Fix Description:  Make a copy of $@, and use it as needed.
b69e47
b69e47
https://pagure.io/389-ds-base/issue/47662
b69e47
b69e47
Reviewed by: nhosoi(Thanks!)
b69e47
---
b69e47
 ldap/admin/src/scripts/db2ldif.in | 3 ++-
b69e47
 ldap/admin/src/scripts/ldif2db.in | 3 ++-
b69e47
 2 files changed, 4 insertions(+), 2 deletions(-)
b69e47
b69e47
diff --git a/ldap/admin/src/scripts/db2ldif.in b/ldap/admin/src/scripts/db2ldif.in
b69e47
index 85854b3..08f30e4 100755
b69e47
--- a/ldap/admin/src/scripts/db2ldif.in
b69e47
+++ b/ldap/admin/src/scripts/db2ldif.in
b69e47
@@ -130,6 +130,7 @@ do
b69e47
     esac
b69e47
 done
b69e47
 
b69e47
+ARGS=$@
b69e47
 shift $(($OPTIND - 1))
b69e47
 if [ $1 ]
b69e47
 then
b69e47
@@ -156,7 +157,7 @@ fi
b69e47
 servid=`normalize_server_id $initfile`
b69e47
 . $initfile
b69e47
 
b69e47
-ldif_file=`make_ldiffile $@`
b69e47
+ldif_file=`make_ldiffile $ARGS`
b69e47
 rn=$?
b69e47
 
b69e47
 echo "Exported ldif file: $ldif_file"
b69e47
diff --git a/ldap/admin/src/scripts/ldif2db.in b/ldap/admin/src/scripts/ldif2db.in
b69e47
index f968303..20c7d46 100755
b69e47
--- a/ldap/admin/src/scripts/ldif2db.in
b69e47
+++ b/ldap/admin/src/scripts/ldif2db.in
b69e47
@@ -87,6 +87,7 @@ then
b69e47
     exit 1
b69e47
 fi
b69e47
 
b69e47
+ARGS=$@
b69e47
 shift $(($OPTIND - 1))
b69e47
 if [ $1 ]
b69e47
 then
b69e47
@@ -106,7 +107,7 @@ fi
b69e47
 
b69e47
 . $initfile
b69e47
 
b69e47
-handleopts $@
b69e47
+handleopts $ARGS
b69e47
 quiet=$?
b69e47
 if [ $quiet -eq 0 ]; then
b69e47
     echo importing data ...
b69e47
-- 
b69e47
2.9.3
b69e47