defopt verified_exec.
This commit is contained in:
parent
da48256d5a
commit
1510fe1543
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: exec_script.c,v 1.41 2005/06/27 17:11:20 elad Exp $ */
|
/* $NetBSD: exec_script.c,v 1.42 2005/07/16 22:47:18 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou
|
* Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou
|
||||||
@ -31,12 +31,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.41 2005/06/27 17:11:20 elad Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.42 2005/07/16 22:47:18 christos Exp $");
|
||||||
|
|
||||||
#if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS)
|
#if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS)
|
||||||
#define FDSCRIPTS /* Need this for safe set-id scripts. */
|
#define FDSCRIPTS /* Need this for safe set-id scripts. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "opt_verified_exec.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/proc.h>
|
#include <sys/proc.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: init_main.c,v 1.249 2005/07/15 03:59:31 simonb Exp $ */
|
/* $NetBSD: init_main.c,v 1.250 2005/07/16 22:47:18 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
|
* Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
|
||||||
@ -71,7 +71,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.249 2005/07/15 03:59:31 simonb Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.250 2005/07/16 22:47:18 christos Exp $");
|
||||||
|
|
||||||
#include "fs_nfs.h"
|
#include "fs_nfs.h"
|
||||||
#include "opt_nfsserver.h"
|
#include "opt_nfsserver.h"
|
||||||
@ -85,6 +85,7 @@ __KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.249 2005/07/15 03:59:31 simonb Exp $
|
|||||||
#include "opt_posix.h"
|
#include "opt_posix.h"
|
||||||
#include "opt_kcont.h"
|
#include "opt_kcont.h"
|
||||||
#include "opt_rootfs_magiclinks.h"
|
#include "opt_rootfs_magiclinks.h"
|
||||||
|
#include "opt_verified_exec.h"
|
||||||
|
|
||||||
#include "opencrypto.h"
|
#include "opencrypto.h"
|
||||||
#include "rnd.h"
|
#include "rnd.h"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: init_sysctl.c,v 1.46 2005/06/17 23:53:21 atatat Exp $ */
|
/* $NetBSD: init_sysctl.c,v 1.47 2005/07/16 22:47:18 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||||
@ -37,11 +37,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.46 2005/06/17 23:53:21 atatat Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.47 2005/07/16 22:47:18 christos Exp $");
|
||||||
|
|
||||||
#include "opt_sysv.h"
|
#include "opt_sysv.h"
|
||||||
#include "opt_multiprocessor.h"
|
#include "opt_multiprocessor.h"
|
||||||
#include "opt_posix.h"
|
#include "opt_posix.h"
|
||||||
|
#include "opt_verified_exec.h"
|
||||||
#include "pty.h"
|
#include "pty.h"
|
||||||
#include "rnd.h"
|
#include "rnd.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: kern_exec.c,v 1.204 2005/07/11 20:15:26 cube Exp $ */
|
/* $NetBSD: kern_exec.c,v 1.205 2005/07/16 22:47:18 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou
|
* Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou
|
||||||
@ -33,11 +33,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.204 2005/07/11 20:15:26 cube Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.205 2005/07/16 22:47:18 christos Exp $");
|
||||||
|
|
||||||
#include "opt_ktrace.h"
|
#include "opt_ktrace.h"
|
||||||
#include "opt_syscall_debug.h"
|
#include "opt_syscall_debug.h"
|
||||||
#include "opt_compat_netbsd.h"
|
#include "opt_compat_netbsd.h"
|
||||||
|
#include "opt_verified_exec.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -224,11 +225,8 @@ static void link_es(struct execsw_entry **, const struct execsw *);
|
|||||||
* exec header unmodified.
|
* exec header unmodified.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
#ifdef VERIFIED_EXEC
|
/*ARGSUSED*/
|
||||||
check_exec(struct proc *p, struct exec_package *epp, int flag)
|
check_exec(struct proc *p, struct exec_package *epp, int flag)
|
||||||
#else
|
|
||||||
check_exec(struct proc *p, struct exec_package *epp)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int error, i;
|
int error, i;
|
||||||
struct vnode *vp;
|
struct vnode *vp;
|
||||||
@ -478,7 +476,7 @@ execve1(struct lwp *l, const char *path, char * const *args,
|
|||||||
#ifdef VERIFIED_EXEC
|
#ifdef VERIFIED_EXEC
|
||||||
if ((error = check_exec(p, &pack, VERIEXEC_DIRECT)) != 0)
|
if ((error = check_exec(p, &pack, VERIEXEC_DIRECT)) != 0)
|
||||||
#else
|
#else
|
||||||
if ((error = check_exec(p, &pack)) != 0)
|
if ((error = check_exec(p, &pack, 0)) != 0)
|
||||||
#endif
|
#endif
|
||||||
goto freehdr;
|
goto freehdr;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: kern_verifiedexec.c,v 1.31 2005/07/01 19:50:04 elad Exp $ */
|
/* $NetBSD: kern_verifiedexec.c,v 1.32 2005/07/16 22:47:18 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright 2005 Elad Efrat <elad@bsd.org.il>
|
* Copyright 2005 Elad Efrat <elad@bsd.org.il>
|
||||||
@ -30,7 +30,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.31 2005/07/01 19:50:04 elad Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.32 2005/07/16 22:47:18 christos Exp $");
|
||||||
|
|
||||||
|
#include "opt_verified_exec.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: vfs_syscalls.c,v 1.225 2005/07/10 14:26:02 cube Exp $ */
|
/* $NetBSD: vfs_syscalls.c,v 1.226 2005/07/16 22:47:18 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1989, 1993
|
* Copyright (c) 1989, 1993
|
||||||
@ -37,11 +37,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.225 2005/07/10 14:26:02 cube Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.226 2005/07/16 22:47:18 christos Exp $");
|
||||||
|
|
||||||
#include "opt_compat_netbsd.h"
|
#include "opt_compat_netbsd.h"
|
||||||
#include "opt_compat_43.h"
|
#include "opt_compat_43.h"
|
||||||
#include "opt_ktrace.h"
|
#include "opt_ktrace.h"
|
||||||
|
#include "opt_verified_exec.h"
|
||||||
#include "fss.h"
|
#include "fss.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: vfs_vnops.c,v 1.92 2005/06/19 18:22:36 elad Exp $ */
|
/* $NetBSD: vfs_vnops.c,v 1.93 2005/07/16 22:47:18 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1982, 1986, 1989, 1993
|
* Copyright (c) 1982, 1986, 1989, 1993
|
||||||
@ -37,7 +37,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.92 2005/06/19 18:22:36 elad Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.93 2005/07/16 22:47:18 christos Exp $");
|
||||||
|
|
||||||
|
#include "opt_verified_exec.h"
|
||||||
|
|
||||||
#include "fs_union.h"
|
#include "fs_union.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user