File cups-1.7.5-CVE-2023-34241.patch of Package cups.29370
--- scheduler/client.c.orig 2014-07-22 16:03:19.000000000 +0200
+++ scheduler/client.c 2023-06-12 14:49:07.840267865 +0200
@@ -270,16 +270,16 @@ cupsdAcceptClient(cupsd_listener_t *lis)
* Can't have an unresolved IP address with double-lookups enabled...
*/
+ cupsdLogMessage(CUPSD_LOG_WARN,
+ "Name lookup failed - closing connection from %s!",
+ con->http.hostname);
+
#ifdef WIN32
closesocket(con->http.fd);
#else
close(con->http.fd);
#endif /* WIN32 */
- cupsdLogMessage(CUPSD_LOG_WARN,
- "Name lookup failed - connection from %s closed!",
- con->http.hostname);
-
free(con);
return;
}
@@ -313,15 +313,16 @@ cupsdAcceptClient(cupsd_listener_t *lis)
* with double-lookups enabled...
*/
+ cupsdLogMessage(CUPSD_LOG_WARN,
+ "IP lookup failed - closing connection from %s!",
+ con->http.hostname);
+
#ifdef WIN32
closesocket(con->http.fd);
#else
close(con->http.fd);
#endif /* WIN32 */
- cupsdLogMessage(CUPSD_LOG_WARN,
- "IP lookup failed - connection from %s closed!",
- con->http.hostname);
free(con);
return;
}
@@ -337,15 +338,16 @@ cupsdAcceptClient(cupsd_listener_t *lis)
if (!hosts_access(&wrap_req))
{
+ cupsdLogMessage(CUPSD_LOG_WARN,
+ "Connection from %s refused by /etc/hosts.allow and "
+ "/etc/hosts.deny rules.", con->http.hostname);
+
#ifdef WIN32
closesocket(con->http.fd);
#else
close(con->http.fd);
#endif /* WIN32 */
- cupsdLogMessage(CUPSD_LOG_WARN,
- "Connection from %s refused by /etc/hosts.allow and "
- "/etc/hosts.deny rules.", con->http.hostname);
free(con);
return;
}