diff options
author | jbj <devnull@localhost> | 1999-12-10 18:13:23 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-12-10 18:13:23 +0000 |
commit | 8b63e8893f97921794630572436227c7d5dcb4e1 (patch) | |
tree | a8056b89952511fdc5cafde67e33e47469e16186 /lib/url.c | |
parent | 16782dd67fa7014caa61518e4bdae1f39c8c13a0 (diff) | |
download | rpm-8b63e8893f97921794630572436227c7d5dcb4e1.tar.gz rpm-8b63e8893f97921794630572436227c7d5dcb4e1.tar.bz2 rpm-8b63e8893f97921794630572436227c7d5dcb4e1.zip |
fix: don't look at password when searching urlCache.
CVS patchset: 3469
CVS date: 1999/12/10 18:13:23
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -146,12 +146,14 @@ static int urlStrcmp(const char *str1, const char *str2) return 0; } -static void urlFind(urlinfo *uret, int mustAsk) +#define urlFind(_a, _b) XurlFind(_a, _b, __LINE__) +static void XurlFind(urlinfo *uret, int mustAsk, unsigned line) { urlinfo u; int ucx; int i; +fprintf(stderr, "*** urlFind(%p,%d) %s:%u\n", uret, mustAsk, __FILE__, line); if (uret == NULL) return; @@ -173,14 +175,10 @@ static void urlFind(urlinfo *uret, int mustAsk) */ if (urlStrcmp(u->service, ou->service)) continue; - if (urlStrcmp(u->service, ou->service)) - continue; if (urlStrcmp(u->host, ou->host)) continue; if (urlStrcmp(u->user, ou->user)) continue; - if (urlStrcmp(u->password, ou->password)) - continue; if (urlStrcmp(u->portstr, ou->portstr)) continue; break; /* Found item in cache */ @@ -223,7 +221,7 @@ static void urlFind(urlinfo *uret, int mustAsk) if (mustAsk || (u->user != NULL && u->password == NULL)) { char * prompt; - prompt = alloca(strlen(u->host) + strlen(u->user) + 40); + prompt = alloca(strlen(u->host) + strlen(u->user) + 256); sprintf(prompt, _("Password for %s@%s: "), u->user, u->host); FREE(u->password); u->password = xstrdup( /*@-unrecog@*/ getpass(prompt) /*@=unrecog@*/ ); |