From 502c540485a1626fce474639d572904a4e3c55fe Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 10:56:01 +0200 Subject: Merging upstream version 1.24.5. Signed-off-by: Daniel Baumann --- src/netrc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/netrc.c') 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 -- cgit v1.2.3