summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-12-10 18:13:23 +0000
committerjbj <devnull@localhost>1999-12-10 18:13:23 +0000
commit8b63e8893f97921794630572436227c7d5dcb4e1 (patch)
treea8056b89952511fdc5cafde67e33e47469e16186 /lib/url.c
parent16782dd67fa7014caa61518e4bdae1f39c8c13a0 (diff)
downloadlibrpm-tizen-8b63e8893f97921794630572436227c7d5dcb4e1.tar.gz
librpm-tizen-8b63e8893f97921794630572436227c7d5dcb4e1.tar.bz2
librpm-tizen-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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/url.c b/lib/url.c
index 25fead34e..f7c96b8a4 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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@*/ );