Bug 135643 (IT_51707) - 2.1AS: rexec prompts for username/password before checking ~/.netrc
Summary: 2.1AS: rexec prompts for username/password before checking ~/.netrc
Keywords:
Status: CLOSED ERRATA
Alias: IT_51707
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: rsh
Version: 2.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-13 22:33 UTC by David Lehman
Modified: 2007-11-30 22:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-13 20:35:52 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2004:605 0 normal SHIPPED_LIVE Updated rsh package 2005-01-17 05:00:00 UTC

Description David Lehman 2004-10-13 22:33:40 UTC
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 22:38:19 UTC
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 17:46:38 UTC
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 17:48:48 UTC
Correction to initial comments: rexec prompts for password but not
username (unless -n option specified).

Comment 6 Radek Vokál 2004-10-15 08:18:44 UTC
Thanks Dave, fixed version will soon appear in errata

Comment 9 John Flanagan 2004-12-13 20:35:53 UTC
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 09:44:36 UTC
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.