Bug 480631 - Error in shell script "fedora-idm-console" causes problems with arguments containing spaces
Summary: Error in shell script "fedora-idm-console" causes problems with arguments con...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Directory Console
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 249650 FDS1.2.0
TreeView+ depends on / blocked
 
Reported: 2009-01-19 15:03 UTC by Aleksander Adamowski
Modified: 2015-01-04 23:36 UTC (History)
3 users (show)

Fixed In Version: 8.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-29 23:09:33 UTC


Attachments (Terms of Use)

Description Aleksander Adamowski 2009-01-19 15:03:40 UTC
Description of problem:

When calling fedora-idm-console with an argument which contains whitespace, due to a simple mistake in the shel script the argument is treated as multiple separate arguments.


fedora-idm-console -u 'cn=Directory Manager' 

Version-Release number of selected component (if applicable):
fedora-idm-console-1.1.1-2.fc9

How reproducible:
Try running:

fedora-idm-console -u 'cn=Directory Manager'

You'll notice that in the splash screen, it will display:
Authenticating User ID "cn=Directory"...

instead of:
Authenticating User ID "cn=Directory Manager"...

The fix is very simple, in the last row of the script one has to change the arguments placeholder from $* to "$@".

Like this:

diff  /usr/bin/fedora-idm-console.orig /usr/bin/fedora-idm-console
34c34
< java -cp /usr/lib/java/jss4.jar:/usr/share/java/ldapjdk.jar:$CLASSDEST/idm-console-base.jar:$CLASSDEST/idm-console-mcc.jar:$CLASSDEST/idm-console-mcc_en.jar:$CLASSDEST/idm-console-nmclf.jar:$CLASSDEST/idm-console-nmclf_en.jar:$CLASSDEST/fedora-idm-console-1.1.1_en.jar -Djava.library.path=/usr/lib64 -Djava.util.prefs.systemRoot="$HOME/.fedora-idm-console" -Djava.util.prefs.userRoot="$HOME/.fedora-idm-console" com.netscape.management.client.console.Console $*
---
> java -cp /usr/lib/java/jss4.jar:/usr/share/java/ldapjdk.jar:$CLASSDEST/idm-console-base.jar:$CLASSDEST/idm-console-mcc.jar:$CLASSDEST/idm-console-mcc_en.jar:$CLASSDEST/idm-console-nmclf.jar:$CLASSDEST/idm-console-nmclf_en.jar:$CLASSDEST/fedora-idm-console-1.1.1_en.jar -Djava.library.path=/usr/lib64 -Djava.util.prefs.systemRoot="$HOME/.fedora-idm-console" -Djava.util.prefs.userRoot="$HOME/.fedora-idm-console" com.netscape.management.client.console.Console "$@"

Comment 1 Rich Megginson 2009-01-21 21:31:07 UTC
Checking in fedora-idm-console;
/cvs/dirsec/fedora-idm-console/fedora-idm-console,v  <--  fedora-idm-console
new revision: 1.3; previous revision: 1.2
done

Comment 2 Jenny Severance 2009-03-19 17:04:22 UTC
Not sure if this is valid for Red Hat Directory Server or just Fedora DS - but able to launch redhat-idm-console -u 'cn=Directory Manager' without issue.

Comment 3 Chandrasekar Kannan 2009-04-29 23:09:33 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0455.html


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