Bug 135643 - (IT_51707) 2.1AS: rexec prompts for username/password before checking ~/.netrc
2.1AS: rexec prompts for username/password before checking ~/.netrc
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: rsh (Show other bugs)
2.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-13 18:33 EDT by David Lehman
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-13 15:35:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to read/parse ~/.netrc before prompting for username/passwd (6.67 KB, patch)
2004-10-14 13:46 EDT, David Lehman
no flags Details | Diff

  None (edit)
Description David Lehman 2004-10-13 18:33:40 EDT
Description of problem:
rexec prompts for username and password regardless of whether or not
~/.netrc exists and/or contains this information. The rexec(3) call in
glibc is where the ~/.netrc parsing occurs, but by then rexec(1) will
have either prompted for username/password or exited.

It's effectively as though the '-n' option was automatically added.

Version-Release number of selected component (if applicable):
rsh-0.17-17

How reproducible:
Always

Steps to Reproduce:
1. Set up a ~/.netrc with username and password
2. run rexec without -n
3.
  
Actual results:
You will be prompted for a username and password

Expected results:
The username and password for ~/.netrc are used

Additional info:
It appears the prompting was added in response to Bug#4328. The real
bug is/was that glibc's rexec(3) doesn't prompt for username/password
in the event that ~/.netrc doesn't supply them. AFAICT all other libcs
do prompt if needed. At any rate rexec is now broken according to it's
own docs.
Comment 1 David Lehman 2004-10-13 18:38:19 EDT
Probably the simplest solution is to duplicate ruserpass.c from
glibc-<version>/inet/ or from ftp (netkit-ftp). This way rexec can
process an existing ~/.netrc and then prompt for username/password if
needed before calling rexec(3). This is how our ftp(1) does it.
Comment 4 David Lehman 2004-10-14 13:46:38 EDT
Created attachment 105217 [details]
Patch to read/parse ~/.netrc before prompting for username/passwd

I've verified the patch prevents the prompt when .netrc is populated and that
-n still causes rexec to prompt.
Comment 5 David Lehman 2004-10-14 13:48:48 EDT
Correction to initial comments: rexec prompts for password but not
username (unless -n option specified).
Comment 6 Radek Vokal 2004-10-15 04:18:44 EDT
Thanks Dave, fixed version will soon appear in errata
Comment 9 John Flanagan 2004-12-13 15:35:53 EST
An errata 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 the 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-2004-605.html
Comment 12 Karel Zak 2005-01-21 04:44:36 EST
The path netkit-rsh-0.17-rexec-netrc.patch is not in RHEL3 yet. I
think we still have development period for U5. I will add it to this
branch next week.

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