Lines Matching refs:creds
104 cctx->creds = talloc_zero(cctx, struct cli_creds);
105 if (!cctx->creds) return ENOMEM;
110 cctx->creds->ucred.uid = -1;
111 cctx->creds->ucred.gid = -1;
112 cctx->creds->ucred.pid = -1;
114 ret = getsockopt(cctx->cfd, SOL_SOCKET, SO_PEERCRED, &cctx->creds->ucred,
129 "Client creds: euid[%d] egid[%d] pid[%d].\n",
130 cctx->creds->ucred.uid, cctx->creds->ucred.gid,
131 cctx->creds->ucred.pid);
144 cctx->creds->selinux_ctx = SELINUX_context_new(secctx);
151 uid_t client_euid(struct cli_creds *creds)
153 if (!creds) return -1;
154 return cli_creds_get_uid(creds);
451 if (cctx->creds == NULL) {
455 if (cctx->creds->selinux_ctx == NULL) {
459 SELINUX_context_free(cctx->creds->selinux_ctx);
460 cctx->creds->selinux_ctx = NULL;
540 if (client_euid(cctx->creds) == -1) {
550 ret = check_allowed_uids(client_euid(cctx->creds), rctx->allowed_uids_count,
556 client_euid(cctx->creds));