Lines Matching refs:peercred
367 cupsd_ucred_t peercred; /* Peer credentials */ in cupsdAuthorize() local
370 peersize = sizeof(peercred); in cupsdAuthorize()
372 if (getsockopt(httpGetFd(con->http), 0, LOCAL_PEERCRED, &peercred, &peersize)) in cupsdAuthorize()
378 if ((pwd = getpwuid(CUPSD_UCRED_UID(peercred))) == NULL) in cupsdAuthorize()
380 …n, CUPSD_LOG_ERROR, "Unable to find UID %d for peer credentials.", (int)CUPSD_UCRED_UID(peercred)); in cupsdAuthorize()
401 cupsd_ucred_t peercred; /* Peer credentials */ in cupsdAuthorize() local
442 peersize = sizeof(peercred); in cupsdAuthorize()
445 if (getsockopt(httpGetFd(con->http), 0, LOCAL_PEERCRED, &peercred, &peersize)) in cupsdAuthorize()
447 if (getsockopt(httpGetFd(con->http), SOL_SOCKET, SO_PEERCRED, &peercred, &peersize)) in cupsdAuthorize()
454 if (pwd->pw_uid != CUPSD_UCRED_UID(peercred)) in cupsdAuthorize()
456 …als for \"%s\" - got %d, expected %d.", authorization + 9, CUPSD_UCRED_UID(peercred), pwd->pw_uid); in cupsdAuthorize()
458 cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cr_version=%d", peercred.cr_version); in cupsdAuthorize()
459 cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cr_uid=%d", peercred.cr_uid); in cupsdAuthorize()
460 cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cr_ngroups=%d", peercred.cr_ngroups); in cupsdAuthorize()
461 cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cr_groups[0]=%d", peercred.cr_groups[0]); in cupsdAuthorize()
469 con->gss_uid = CUPSD_UCRED_UID(peercred); in cupsdAuthorize()
837 cupsd_ucred_t peercred; /* Peer credentials */ in cupsdAuthorize() local
840 peersize = sizeof(peercred); in cupsdAuthorize()
843 if (getsockopt(httpGetFd(con->http), 0, LOCAL_PEERCRED, &peercred, &peersize)) in cupsdAuthorize()
845 if (getsockopt(httpGetFd(con->http), SOL_SOCKET, SO_PEERCRED, &peercred, in cupsdAuthorize()
853 cupsdLogClient(con, CUPSD_LOG_DEBUG, "Using credentials for UID %d.", CUPSD_UCRED_UID(peercred)); in cupsdAuthorize()
854 con->gss_uid = CUPSD_UCRED_UID(peercred); in cupsdAuthorize()