.netrc support rewritten
- From: Pavel Roskin <proski gnu org>
- To: mc-devel gnome org
- Cc: Thomas Zajic <zlatko gmx at>
- Subject: .netrc support rewritten
- Date: Fri, 12 Jul 2002 20:31:00 -0400 (EDT)
Hello!
I have reimplemented lookup_netrc() and related functions. The scanning
in .netrc has been simplified - double loop has been eliminated, which
means that lookup_netrc() finds "default" or "machine" for the given
hostname only once. The consequence is that .netrc cannot have passwords
for more than one user for the same host.
I find this limitation reasonable. .netrc can be used to find username
for the given host, and having more than one record for the same host
would cause undefined behavior.
All the logic for looking up password in .netrc for known user has been
moved to ftp_split_url(), where it's easier to implement.
I tried to make the new code more readable. The old code was too terse,
and I'm surprized that Thomas could understand it at all to make his
changes.
Unfortunately, all the code by Thomas has been removed. There is no
special processing for *netrc* anymore. But I hope that the new code is
fairly stable and works as it should.
The proxy code has been fixed as well. I don't have time to install
FTP proxies, but it would be great if somebody tests this code.
--
Regards,
Pavel Roskin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]