Add 'stop' routines to do the exact opposite of the 'start' routines for
'securelevel' and 'suser' parts of secmodel_bsd44.
This commit is contained in:
parent
81fe5ba5fc
commit
faf71534b5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: secmodel_bsd44_securelevel.c,v 1.26 2007/01/02 23:30:29 elad Exp $ */
|
||||
/* $NetBSD: secmodel_bsd44_securelevel.c,v 1.27 2007/01/02 23:58:20 elad Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2006 Elad Efrat <elad@NetBSD.org>
|
||||
* All rights reserved.
|
||||
|
@ -38,7 +38,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: secmodel_bsd44_securelevel.c,v 1.26 2007/01/02 23:30:29 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: secmodel_bsd44_securelevel.c,v 1.27 2007/01/02 23:58:20 elad Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_insecure.h"
|
||||
|
@ -131,6 +131,18 @@ secmodel_bsd44_securelevel_start(void)
|
|||
secmodel_bsd44_securelevel_device_cb, NULL);
|
||||
}
|
||||
|
||||
#if defined(_LKM)
|
||||
void
|
||||
secmodel_bsd44_securelevel_stop(void)
|
||||
{
|
||||
kauth_unlisten_scope(l_system);
|
||||
kauth_unlisten_scope(l_process);
|
||||
kauth_unlisten_scope(l_network);
|
||||
kauth_unlisten_scope(l_machdep);
|
||||
kauth_unlisten_scope(l_device);
|
||||
}
|
||||
#endif /* _LKM */
|
||||
|
||||
/*
|
||||
* kauth(9) listener
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: secmodel_bsd44_suser.c,v 1.27 2007/01/02 23:30:29 elad Exp $ */
|
||||
/* $NetBSD: secmodel_bsd44_suser.c,v 1.28 2007/01/02 23:58:20 elad Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2006 Elad Efrat <elad@NetBSD.org>
|
||||
* All rights reserved.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: secmodel_bsd44_suser.c,v 1.27 2007/01/02 23:30:29 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: secmodel_bsd44_suser.c,v 1.28 2007/01/02 23:58:20 elad Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -83,6 +83,19 @@ secmodel_bsd44_suser_start(void)
|
|||
secmodel_bsd44_suser_device_cb, NULL);
|
||||
}
|
||||
|
||||
#if defined(_LKM)
|
||||
void
|
||||
secmodel_bsd44_suser_stop(void)
|
||||
{
|
||||
kauth_unlisten_scope(l_generic);
|
||||
kauth_unlisten_scope(l_system);
|
||||
kauth_unlisten_scope(l_process);
|
||||
kauth_unlisten_scope(l_network);
|
||||
kauth_unlisten_scope(l_machdep);
|
||||
kauth_unlisten_scope(l_device);
|
||||
}
|
||||
#endif /* _LKM */
|
||||
|
||||
/*
|
||||
* kauth(9) listener
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: securelevel.h,v 1.3 2007/01/02 23:35:37 elad Exp $ */
|
||||
/* $NetBSD: securelevel.h,v 1.4 2007/01/02 23:58:20 elad Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2006 Elad Efrat <elad@NetBSD.org>
|
||||
* All rights reserved.
|
||||
|
@ -38,6 +38,7 @@ void secmodel_bsd44_securelevel_init(void);
|
|||
void secmodel_bsd44_securelevel_start(void);
|
||||
|
||||
#if defined(_LKM)
|
||||
void secmodel_bsd44_securelevel_stop(void);
|
||||
SYSCTL_SETUP_PROTO(sysctl_security_bsd44_securelevel_setup);
|
||||
#endif /* _LKM */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: suser.h,v 1.2 2006/09/30 20:05:57 elad Exp $ */
|
||||
/* $NetBSD: suser.h,v 1.3 2007/01/02 23:58:20 elad Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2006 Elad Efrat <elad@NetBSD.org>
|
||||
* All rights reserved.
|
||||
|
@ -36,6 +36,10 @@ extern int secmodel_bsd44_curtain;
|
|||
|
||||
void secmodel_bsd44_suser_start(void);
|
||||
|
||||
#if defined(_LKM)
|
||||
void secmodel_bsd44_suser_stop(void);
|
||||
#endif /* _LKM */
|
||||
|
||||
int secmodel_bsd44_suser_generic_cb(kauth_cred_t, kauth_action_t, void *,
|
||||
void *, void *, void *, void *);
|
||||
int secmodel_bsd44_suser_system_cb(kauth_cred_t, kauth_action_t, void *,
|
||||
|
|
Loading…
Reference in New Issue