|Summary:||2.1AS: rexec prompts for username/password before checking ~/.netrc|
|Product:||Red Hat Enterprise Linux 2.1||Reporter:||David Lehman <dlehman>|
|Component:||rsh||Assignee:||Karel Zak <kzak>|
|Status:||CLOSED ERRATA||QA Contact:||Ben Levenson <benl>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2004-12-13 20:35:52 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
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 Vokal 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.