rexec(3) should prompt the user for the logname/password if it's not supplied by the caller, if it's not in the environment and if it's not in $HOME/.netrc. The problem is in glibc's inet/rexec.c. It's passing a nil pointer into write() and dropping core. rexec(3) _should_ be calling getuser() and getpass() prior to doing that write(). I've tried to explain this to Ulrich but the message isn't getting through. Perhaps you guys will have more luck. To demonstrate: # rm $HOME/.netrc # rexec -a localhost date Memory fault - core dumped
This appears to be a glibc problem.
yes, it is a glibc issue. Please see the bug-glibc mailing list discussion "rexec, rexec() and ruserpass()" at http://sourceware.cygnus.com/ml/bug-glibc/1999-07/ for the full story. Note also the memory leak which I have identified. Ulrich tells me that he'll be looking at this issue RSN, but that was a couple of weeks back.
It is really a debate whether we can change the current behavior in glibc 2.1. I'd be inclined to say no, bacuse this type of change does not necessarily fits the definition of a bug fix because it leads to a changed functionality. I'll make sure that this will get fixed in glibc 2.2, but for 2.1.x series I'd rather not change it.
This is not a matter of changed functionality or of changing the interface. Every other rexec(2) in the world prompts the user if the credentials are not available. However glibc's rexec(2) will dereference a nil pointer and drops core. It's a bug.
*** Bug 9715 has been marked as a duplicate of this bug. ***
I can't fix the glibc segfault, but rexec in rsh-0.16-10 now prompts for password (and exits rather than segfaulting).
assign to jakub