Bug 796542 - Incorrect error message is displayed when no argument is provided for optional switches.
Summary: Incorrect error message is displayed when no argument is provided for optiona...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: certmonger
Version: 6.3
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Nalin Dahyabhai
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-23 07:08 UTC by Kaleem
Modified: 2012-06-20 13:43 UTC (History)
2 users (show)

Fixed In Version: certmonger-0.56-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:43:12 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0833 0 normal SHIPPED_LIVE certmonger bug fix and enhancement update 2012-06-19 20:49:14 UTC

Description Kaleem 2012-02-23 07:08:11 UTC
Description of problem:
When no argument is provided for optional switches, an incorrect error message is displayed.
  "request: invalid option -- 'I'" which should be "request : option requires an argument --'I'"

Version-Release number of selected component (if applicable):
certmonger-0.55-1.el6.x86_64.rpm

How reproducible:
Always

Steps to Reproduce:
1.Install certmonger and start certmonger service
2.Try to generate a certificate request without providing argument to one of optional switches. e.g.
  getcert request -d /tmp/kaleem/ -n certtest -c Selfsign -I
3.Observe the error message displayed on console.
  
Actual results:

[root@dhcp201-197 ~]# getcert request -d /tmp/kaleem/ -n certtest -I
request: invalid option -- 'I'
getcert - client certificate enrollment tool
Usage: getcert request [options]

Expected results:
Error message of line 2 in above output, should be like RHEL 6.2's error message.
  "request : option requires an argument --'I'"

Comment 4 Kaleem 2012-03-08 14:02:49 UTC
Verified.

Certmonger Version:
[root@dhcp201-197 ~]# rpm -q certmonger
certmonger-0.56-1.el6.x86_64
[root@dhcp201-197 ~]#

Now following error message is displayed when no argument is provided with optional switches.

Manual:

[root@dhcp201-197 ~]# getcert request -d /tmp/kaleem/ -n certtest -c SelfSign -I
request: option requires an argument -- 'I'
getcert - client certificate enrollment tool

Automated:
:: [   PASS   ] :: Running 'getcert request -f /tmp/tmp.KJR6qqpdyp/test.crt -k /tmp/tmp.KJR6qqpdyp/test.key -c SelfSign -g > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'g''
:: [   PASS   ] :: Running 'getcert request -d /tmp/tmp.KJR6qqpdyp -n certtest -c SelfSign -I > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: Running 'cat /tmp/tmp.KJR6qqpdyp/temp_test.out '
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'I''
:: [   PASS   ] :: Running 'getcert request -d /tmp/tmp.KJR6qqpdyp -n certtest -c > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'c''
:: [   PASS   ] :: Running 'getcert request -d /tmp/tmp.KJR6qqpdyp -n certtest -c SelfSign -P > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'P''
:: [   PASS   ] :: Running 'getcert request -d /tmp/tmp.KJR6qqpdyp -n certtest -c SelfSign -p > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'p''
:: [   PASS   ] :: Running 'getcert request -d /tmp/tmp.KJR6qqpdyp -n certtest -c SelfSign -U > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'U''
:: [   PASS   ] :: Running 'getcert request -d /tmp/tmp.KJR6qqpdyp -n certtest -c SelfSign -E > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'E''
:: [   PASS   ] :: Running 'selfsign-getcert request -d /tmp/tmp.KJR6qqpdyp -n certtest -N > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'N''
:: [   PASS   ] :: Running 'getcert request -d /tmp/tmp.KJR6qqpdyp -n certtest -c SelfSign -K > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: Running 'cat /tmp/tmp.KJR6qqpdyp/temp_test.out'
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'K''
:: [   PASS   ] :: Running 'getcert request -d /tmp/tmp.KJR6qqpdyp -n certtest -c SelfSign -D > /tmp/tmp.KJR6qqpdyp/temp_test.out 2>&1'
:: [   PASS   ] :: File '/tmp/tmp.KJR6qqpdyp/temp_test.out' should contain 'request: option requires an argument -- 'D''

Comment 6 errata-xmlrpc 2012-06-20 13:43:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0833.html


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