>Sadly the code doesn't do this at all -- the user always comes from
>calling getusername(), which only does a passwd file lookup. We
>don't call ruserpass() (which is what reads .netrc) until sm_get_pass(),
>which will be after we've already sent the wrong username to the
>server.

I'm starting to remember this now ... I had some of the logic in there to
handle the username, but I recall that it would have required a lot of
surgery to make it work, and I said, "Oh, I'll do it later".  Which
turned out to be never.

>So it's not a trivial thing to fix, and perhaps we could do with
>some cleanup of this area. For instance, just in playing about with
>this, I found bug #23167 -- if your .netrc is world readable then
>post segfaults; and it doesn't seem to close the file properly
>either. Should ruserpass() call getusername() to get its default
>user name?

That seems reasonable to me.  And yes, it looks like a general cleanup
would be useful.

--Ken


_______________________________________________
Nmh-workers mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to