Correctly handle the case of executing a 'FILE' entry.
This commit is contained in:
parent
803a5ae17e
commit
ab99f231f8
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: kern_verifiedexec.c,v 1.23 2005/06/13 21:09:49 elad Exp $ */
|
/* $NetBSD: kern_verifiedexec.c,v 1.24 2005/06/13 22:46:56 elad Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright 2005 Elad Efrat <elad@bsd.org.il>
|
* Copyright 2005 Elad Efrat <elad@bsd.org.il>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.23 2005/06/13 21:09:49 elad Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.24 2005/06/13 22:46:56 elad Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
@ -394,9 +394,7 @@ veriexec_verify(struct proc *p, struct vnode *vp, struct vattr *va,
|
|||||||
switch (flag) {
|
switch (flag) {
|
||||||
case VERIEXEC_DIRECT:
|
case VERIEXEC_DIRECT:
|
||||||
case VERIEXEC_INDIRECT:
|
case VERIEXEC_INDIRECT:
|
||||||
break;
|
if ((vp->vhe != NULL) && (vp->vhe->type == VERIEXEC_FILE)) {
|
||||||
case VERIEXEC_FILE:
|
|
||||||
if ((vp->vhe != NULL) && (vp->vhe->type != VERIEXEC_FILE)) {
|
|
||||||
veriexec_report("Execution of 'FILE' entry.",
|
veriexec_report("Execution of 'FILE' entry.",
|
||||||
name, va, p, REPORT_NOVERBOSE,
|
name, va, p, REPORT_NOVERBOSE,
|
||||||
REPORT_ALARM, REPORT_NOPANIC);
|
REPORT_ALARM, REPORT_NOPANIC);
|
||||||
@ -406,6 +404,9 @@ veriexec_verify(struct proc *p, struct vnode *vp, struct vattr *va,
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VERIEXEC_FILE:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
Loading…
Reference in New Issue
Block a user