diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:56:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:56:01 +0000 |
commit | 502c540485a1626fce474639d572904a4e3c55fe (patch) | |
tree | c8bb1ed8bda9ce49697a30eaab650191e9462e2a /src/netrc.c | |
parent | Adding debian version 1.21.4-1. (diff) | |
download | wget-502c540485a1626fce474639d572904a4e3c55fe.tar.xz wget-502c540485a1626fce474639d572904a4e3c55fe.zip |
Merging upstream version 1.24.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/netrc.c')
-rw-r--r-- | src/netrc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/netrc.c b/src/netrc.c index 25a8393..285f595 100644 --- a/src/netrc.c +++ b/src/netrc.c @@ -1,5 +1,5 @@ /* Read and parse the .netrc file to get hosts, accounts, and passwords. - Copyright (C) 1996, 2007-2011, 2015, 2018-2023 Free Software + Copyright (C) 1996, 2007-2011, 2015, 2018-2024 Free Software Foundation, Inc. This file is part of GNU Wget. @@ -388,7 +388,8 @@ parse_netrc_fp (const char *path, FILE *fp) else if (!strcmp (tok, "default")) maybe_add_to_list (¤t, &retval); - else if (!strcmp (tok, "login")) + /* fetchmail compatibility, "user" is an alias for "login" */ + else if (!strcmp (tok, "login") || !strcmp (tok, "user")) last_token = tok_login; else if (!strcmp (tok, "macdef")) @@ -397,7 +398,8 @@ parse_netrc_fp (const char *path, FILE *fp) else if (!strcmp (tok, "machine")) last_token = tok_machine; - else if (!strcmp (tok, "password")) + /* fetchmail compatibility, "passwd" is an alias for "password" */ + else if (!strcmp (tok, "password") || !strcmp (tok, "passwd")) last_token = tok_password; /* GNU extensions 'port' and 'force', not operational |