Lines Matching defs:cred
5795 vauth_node_owner(struct vnode_attr *vap, kauth_cred_t cred)
5806 result = (vap->va_uid == kauth_cred_getuid(cred)) ? 1 : 0;
5816 * Description: Ask if a cred is a member of the group owning the vnode object
5820 * cred credential to check
5830 vauth_node_group(struct vnode_attr *vap, kauth_cred_t cred, int *ismember, int idontknow)
5845 error = kauth_cred_ismember_gid(cred, vap->va_gid, &result);
6190 kauth_cred_t cred = vcp->ctx->vc_ucred;
6224 error = kauth_acl_evaluate(cred, &eval);
6272 if ((error = kauth_acl_evaluate(cred, &eval)) != 0) {
6301 vcp->vp, cred->cr_posix.cr_uid, vap->va_uid, dvap->va_uid);
6323 kauth_cred_t cred = vcp->ctx->vc_ucred;
6378 if ((error = kauth_acl_evaluate(cred, &eval)) != 0) {
6664 vnode_authorize_callback(kauth_cred_t cred, void *idata, kauth_action_t action,
6741 result = vnode_authorize_callback_int(cred, idata, action, arg0, arg1, arg2, arg3);
6765 kauth_cred_t cred;
6781 * Note that we authorize against the context, not the passed cred
6784 cred = ctx->vc_ucred;
6794 if ((ctx == NULL) || (vp == NULL) || (cred == NULL))
6795 panic("vnode_authorize: bad arguments (context %p vp %p cred %p)", ctx, vp, cred);
7052 kauth_cred_t cred;
7153 cred = vfs_context_ucred(ctx);
7183 if ((error = kauth_cred_ismember_gid(cred, vap->va_gid, &ismember)) != 0) {
7195 if ((vap->va_mode & S_ISUID) && (vap->va_uid != kauth_cred_getuid(cred))) {
7201 if (!defaulted_owner && (vap->va_uid != kauth_cred_getuid(cred))) {
7207 if ((error = kauth_cred_ismember_gid(cred, vap->va_gid, &ismember)) != 0) {
7220 if ((error = kauth_cred_getguid(cred, &changer)) != 0) {
7232 if ((error = kauth_cred_ismember_guid(cred, &vap->va_guuid, &ismember)) != 0) {
7278 kauth_cred_t cred;
7303 cred = vfs_context_ucred(ctx);
7304 has_priv_suser = kauth_cred_issuser(cred);
7410 if (has_priv_suser || vauth_node_owner(&ova, cred)) {
7464 if ((error = kauth_cred_ismember_gid(cred, group, &ismember)) != 0) {
7491 if (owner != kauth_cred_getuid(cred)) {
7575 if (!has_priv_suser && (kauth_cred_getuid(cred) != vap->va_uid)) {
7594 if ((error = kauth_cred_ismember_gid(cred, vap->va_gid, &ismember)) != 0) {
7641 if ((error = kauth_cred_getguid(cred, &changer)) != 0) {
7691 else if ((error = kauth_cred_ismember_guid(cred, &vap->va_guuid, &ismember)) != 0) {