]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/auth.c
Fix some issues detected by clang.
[thirdparty/cups.git] / scheduler / auth.c
index b1dd60810abc2d39924fc07a5b7cb5e89446c320..5566e6ce650392594b8a8acbda1f2a0e9c2a3ae3 100644 (file)
@@ -458,7 +458,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
 #endif /* HAVE_AUTHORIZATION_H */
 #if defined(SO_PEERCRED) && defined(AF_LOCAL)
   else if (!strncmp(authorization, "PeerCred ", 9) &&
-           con->http->hostaddr->addr.sa_family == AF_LOCAL)
+           con->http->hostaddr->addr.sa_family == AF_LOCAL && con->best)
   {
    /*
     * Use peer credentials from domain socket connection...