Changeset View
Changeset View
Standalone View
Standalone View
sys/security/mac_lomac/mac_lomac.c
Show First 20 Lines • Show All 548 Lines • ▼ Show 20 Lines | maybe_demote(struct mac_lomac *subjlabel, struct mac_lomac *objlabel, | ||||
subjtext = sbuf_data(&subjtext_sb); | subjtext = sbuf_data(&subjtext_sb); | ||||
sbuf_new(&objlabel_sb, NULL, 0, SBUF_AUTOEXTEND); | sbuf_new(&objlabel_sb, NULL, 0, SBUF_AUTOEXTEND); | ||||
lomac_to_string(&objlabel_sb, objlabel); | lomac_to_string(&objlabel_sb, objlabel); | ||||
sbuf_finish(&objlabel_sb); | sbuf_finish(&objlabel_sb); | ||||
objlabeltext = sbuf_data(&objlabel_sb); | objlabeltext = sbuf_data(&objlabel_sb); | ||||
pgid = p->p_pgrp->pg_id; /* XXX could be stale? */ | pgid = p->p_pgrp->pg_id; /* XXX could be stale? */ | ||||
if (vp != NULL && VOP_GETATTR(vp, &va, curthread->td_ucred) == 0) { | if (vp != NULL && VOP_GETATTR(vp, 0, &va, curthread->td_ucred) == 0) { | ||||
log(LOG_INFO, "LOMAC: level-%s subject p%dg%du%d:%s demoted to" | log(LOG_INFO, "LOMAC: level-%s subject p%dg%du%d:%s demoted to" | ||||
" level %s after %s a level-%s %s (inode=%ju, " | " level %s after %s a level-%s %s (inode=%ju, " | ||||
"mountpount=%s)\n", | "mountpount=%s)\n", | ||||
subjlabeltext, p->p_pid, pgid, curthread->td_ucred->cr_uid, | subjlabeltext, p->p_pid, pgid, curthread->td_ucred->cr_uid, | ||||
p->p_comm, subjtext, actionname, objlabeltext, objname, | p->p_comm, subjtext, actionname, objlabeltext, objname, | ||||
(uintmax_t)va.va_fileid, vp->v_mount->mnt_stat.f_mntonname); | (uintmax_t)va.va_fileid, vp->v_mount->mnt_stat.f_mntonname); | ||||
} else { | } else { | ||||
log(LOG_INFO, "LOMAC: level-%s subject p%dg%du%d:%s demoted to" | log(LOG_INFO, "LOMAC: level-%s subject p%dg%du%d:%s demoted to" | ||||
▲ Show 20 Lines • Show All 2,505 Lines • Show Last 20 Lines |