Bug 773102 - spacewalk-channel reads username wrong
Summary: spacewalk-channel reads username wrong
Keywords:
Status: CLOSED DUPLICATE of bug 720966
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools
Version: 5.7
Hardware: All
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-10 22:54 UTC by Roy Keene
Modified: 2012-04-27 08:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-27 08:35:22 UTC
Target Upstream Version:


Attachments (Terms of Use)
Patch to correct this bug (528 bytes, patch)
2012-01-10 22:54 UTC, Roy Keene
no flags Details | Diff

Description Roy Keene 2012-01-10 22:54:21 UTC
Created attachment 551961 [details]
Patch to correct this bug

Description of problem:
"spacewalk-channel" from (rhn-setup-0.4.20-56.el5) reads the username from stdin if not presented on the commandline, however it does not truncate the newline from the input.

    if not OPTIONS.user and not OPTIONS.list:
        print("Username: ")
        OPTIONS.user = sys.stdin.readline()

This results in all usernames being rejected as such:
# spacewalk-channel -c epel-x86_64-5 -a 
Username: 
rkeene
Password: 
Error validating data at server:

Error Message:
    Invalid username/password combination
Error Class Code: 2
Error Class Info: Invalid username and password combination.
Explanation: 
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.




Version-Release number of selected component (if applicable):
0.4.20-56.el5

How reproducible:
100%

Steps to Reproduce:
1. Run spacewalk-channel without the "-u" option
2. Specify a username
3. Specify a password
  
Actual results:
"Invalid username/password combination" and channel not added

Expected results:
Channel added and no output

Additional info:
See attached patch

Comment 1 Roy Keene 2012-01-10 22:57:25 UTC
I typed in the component as "rhn-setup", not sure why this got changed to "rhn-hypervisor5" -- changing it to something closer since the particular RHN package is not listed.

Comment 2 Milan Zázrivec 2012-01-11 09:55:17 UTC
(In reply to comment #1)
> I typed in the component as "rhn-setup", not sure why this got changed to
> "rhn-hypervisor5" -- changing it to something closer since the particular RHN
> package is not listed.

Just FYI -- it's the source package name that makes the component choice.

Thank you for your report.

Comment 4 RHEL Program Management 2012-04-02 10:40:28 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 5 Radek Bíba 2012-04-27 08:35:22 UTC
I believe this has already been fixed in RHEL 5, see bug 720966.

*** This bug has been marked as a duplicate of bug 720966 ***


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