diff options
Diffstat (limited to '')
-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 |