From 8a4dd2d69d36ad2eef8d458d03a56e10209906c4 Mon Sep 17 00:00:00 2001 From: elad Date: Sun, 31 Dec 2006 12:07:16 +0000 Subject: [PATCH] #if 0 -> #ifdef notyet, and no need to forward declare internal data-structures anymore. --- sys/kern/kern_verifiedexec.c | 10 ++++++---- sys/sys/verified_exec.h | 11 +++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/kern/kern_verifiedexec.c b/sys/kern/kern_verifiedexec.c index 4938dfa63ea5..deff74531adf 100644 --- a/sys/kern/kern_verifiedexec.c +++ b/sys/kern/kern_verifiedexec.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_verifiedexec.c,v 1.88 2006/12/30 15:26:55 elad Exp $ */ +/* $NetBSD: kern_verifiedexec.c,v 1.89 2006/12/31 12:07:16 elad Exp $ */ /*- * Copyright 2005 Elad Efrat @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.88 2006/12/30 15:26:55 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.89 2006/12/31 12:07:16 elad Exp $"); #include "opt_veriexec.h" @@ -382,12 +382,12 @@ veriexec_fp_calc(struct lwp *l, struct vnode *vp, if (error) return (error); -#if 0 /* XXX - for now */ +#ifdef notyet /* XXX - for now */ if ((vfe->type & VERIEXEC_UNTRUSTED) && (vfe->page_fp_status == PAGE_FP_NONE)) do_perpage = 1; else -#endif +#endif /* notyet */ do_perpage = 0; ctx = (void *) malloc(vfe->ops->context_size, M_VERIEXEC, M_WAITOK); @@ -632,6 +632,7 @@ veriexec_verify(struct lwp *l, struct vnode *vp, const u_char *name, int flag, return (error); } +#ifdef notyet /* * Evaluate per-page fingerprints. */ @@ -700,6 +701,7 @@ veriexec_page_verify(struct veriexec_file_entry *vfe, struct vm_page *pg, return (error); } +#endif /* notyet */ /* * Veriexec remove policy code. diff --git a/sys/sys/verified_exec.h b/sys/sys/verified_exec.h index 42dab650a61d..069e33d8b20a 100644 --- a/sys/sys/verified_exec.h +++ b/sys/sys/verified_exec.h @@ -1,4 +1,4 @@ -/* $NetBSD: verified_exec.h,v 1.48 2006/12/30 15:26:55 elad Exp $ */ +/* $NetBSD: verified_exec.h,v 1.49 2006/12/31 12:07:16 elad Exp $ */ /*- * Copyright 2005 Elad Efrat @@ -84,9 +84,6 @@ typedef void (*veriexec_fpop_final_t)(u_char *, void *); #if defined(_KERNEL) && !defined(HAVE_NBTOOL_CONFIG_H) MALLOC_DECLARE(M_VERIEXEC); -struct veriexec_file_entry; -struct veriexec_table_entry; - extern int veriexec_verbose; extern int veriexec_strict; @@ -110,14 +107,16 @@ int veriexec_table_add(struct lwp *, prop_dictionary_t); int veriexec_file_add(struct lwp *, prop_dictionary_t); int veriexec_verify(struct lwp *, struct vnode *, const u_char *, int, boolean_t *); +#ifdef notyet +int veriexec_page_verify(struct veriexec_file_entry *, struct vm_page *, + size_t, struct lwp *); +#endif /* notyet */ boolean_t veriexec_lookup(struct vnode *); int veriexec_file_delete(struct vnode *); int veriexec_table_delete(struct mount *); int veriexec_convert(struct vnode *, prop_dictionary_t); void veriexec_report(const u_char *, const u_char *, struct lwp *, int); void veriexec_purge(struct vnode *); -int veriexec_page_verify(struct veriexec_file_entry *, struct vm_page *, - size_t, struct lwp *); int veriexec_removechk(struct vnode *, const char *, struct lwp *l); int veriexec_renamechk(struct vnode *, const char *, struct vnode *, const char *, struct lwp *);