2007-07-20 13:12:20 +00:00
|
|
|
--- kdelibs-3.5.7/kdeprint/cups/cupsdconf2/cups-util.c.cups13 2006-10-01 12:33:43.000000000 -0500
|
|
|
|
+++ kdelibs-3.5.7/kdeprint/cups/cupsdconf2/cups-util.c 2007-07-19 15:12:48.000000000 -0500
|
|
|
|
@@ -108,7 +108,8 @@ cupsGetConf(void)
|
2007-07-19 11:54:32 +00:00
|
|
|
* See if we should retry the current digest password...
|
|
|
|
*/
|
|
|
|
|
|
|
|
- if (strncmp(cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Basic", 5) == 0 ||
|
2007-07-19 19:27:48 +00:00
|
|
|
+ if (strncmp(httpGetField (cups_server, HTTP_FIELD_WWW_AUTHENTICATE),
|
|
|
|
+ "Basic", 5) == 0 ||
|
2007-07-19 11:54:32 +00:00
|
|
|
digest_tries > 1 || !pwdstring[0])
|
|
|
|
{
|
|
|
|
/*
|
2007-07-20 13:12:20 +00:00
|
|
|
@@ -116,7 +117,7 @@ cupsGetConf(void)
|
2007-07-19 11:54:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
snprintf(prompt, sizeof(prompt), "Password for %s on %s? ", cupsUser(),
|
|
|
|
- cups_server->hostname);
|
|
|
|
+ cupsServer());
|
|
|
|
|
|
|
|
if ((password = cupsGetPassword(prompt)) == NULL)
|
|
|
|
break;
|
2007-07-20 13:12:20 +00:00
|
|
|
@@ -135,7 +136,8 @@ cupsGetConf(void)
|
2007-07-19 11:54:32 +00:00
|
|
|
* Got a password; encode it for the server...
|
|
|
|
*/
|
|
|
|
|
|
|
|
- if (strncmp(cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Basic", 5) == 0)
|
2007-07-19 19:27:48 +00:00
|
|
|
+ if (strncmp(httpGetField (cups_server, HTTP_FIELD_WWW_AUTHENTICATE),
|
|
|
|
+ "Basic", 5) == 0)
|
2007-07-19 11:54:32 +00:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Basic authentication...
|
2007-07-20 13:12:20 +00:00
|
|
|
@@ -334,7 +336,8 @@ cupsPutConf(const char *name) /* I - Na
|
2007-07-19 11:54:32 +00:00
|
|
|
* See if we should retry the current digest password...
|
|
|
|
*/
|
|
|
|
|
|
|
|
- if (strncmp(cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Basic", 5) == 0 ||
|
2007-07-19 19:27:48 +00:00
|
|
|
+ if (strncmp(httpGetField (cups_server, HTTP_FIELD_WWW_AUTHENTICATE),
|
|
|
|
+ "Basic", 5) == 0 ||
|
2007-07-19 11:54:32 +00:00
|
|
|
digest_tries > 1 || !pwdstring[0])
|
|
|
|
{
|
|
|
|
/*
|
2007-07-20 13:12:20 +00:00
|
|
|
@@ -342,7 +345,7 @@ cupsPutConf(const char *name) /* I - Na
|
2007-07-19 11:54:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
snprintf(prompt, sizeof(prompt), "Password for %s on %s? ", cupsUser(),
|
|
|
|
- cups_server->hostname);
|
|
|
|
+ cupsServer());
|
|
|
|
|
|
|
|
if ((password = cupsGetPassword(prompt)) == NULL)
|
|
|
|
break;
|
2007-07-20 13:12:20 +00:00
|
|
|
@@ -361,7 +364,8 @@ cupsPutConf(const char *name) /* I - Na
|
2007-07-19 11:54:32 +00:00
|
|
|
* Got a password; encode it for the server...
|
|
|
|
*/
|
|
|
|
|
|
|
|
- if (strncmp(cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Basic", 5) == 0)
|
2007-07-19 19:27:48 +00:00
|
|
|
+ if (strncmp(httpGetField (cups_server, HTTP_FIELD_WWW_AUTHENTICATE),
|
|
|
|
+ "Basic", 5) == 0)
|
2007-07-19 11:54:32 +00:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Basic authentication...
|
2007-07-20 13:12:20 +00:00
|
|
|
--- kdelibs-3.5.7/kdeprint/cups/ipprequest.cpp.cups13 2007-01-15 05:34:19.000000000 -0600
|
|
|
|
+++ kdelibs-3.5.7/kdeprint/cups/ipprequest.cpp 2007-07-19 15:15:09.000000000 -0500
|
|
|
|
@@ -309,7 +309,8 @@ bool IppRequest::doFileRequest(const QSt
|
2007-07-19 19:27:48 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
-#ifdef HAVE_CUPS_NO_PWD_CACHE
|
|
|
|
+#if defined(HAVE_CUPS_NO_PWD_CACHE) && \
|
|
|
|
+ CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 3
|
|
|
|
strncpy( HTTP->authstring, cups_authstring.data(), HTTP_MAX_VALUE );
|
|
|
|
#endif
|
|
|
|
|
2007-07-20 13:12:20 +00:00
|
|
|
@@ -319,7 +320,8 @@ bool IppRequest::doFileRequest(const QSt
|
2007-07-19 19:27:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
request_ = cupsDoFileRequest(HTTP, request_, (res.isEmpty() ? "/" : res.latin1()), (filename.isEmpty() ? NULL : filename.latin1()));
|
|
|
|
-#ifdef HAVE_CUPS_NO_PWD_CACHE
|
2007-07-20 13:12:20 +00:00
|
|
|
+#if defined(HAVE_CUPS_NO_PWD_CACHE) && \
|
2007-07-19 19:27:48 +00:00
|
|
|
+ CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 3
|
|
|
|
cups_authstring = HTTP->authstring;
|
|
|
|
#endif
|
|
|
|
httpClose(HTTP);
|