diff options
| author | elad <elad@NetBSD.org> | 2006-10-13 15:39:18 +0000 |
|---|---|---|
| committer | elad <elad@NetBSD.org> | 2006-10-13 15:39:18 +0000 |
| commit | 8c494ca7419598111bdd6c686b010acdeda9a8a6 (patch) | |
| tree | e3f7bd0b3010c82786bf6109a0e92e3337a4719b /share/examples/secmodel/secmodel_example.c | |
| parent | 498acdb5723ae2f58df422a2fa8e46aa125f7d6d (diff) | |
Introduce KAUTH_REQ_NETWORK_SOCKET_CANSEE. Since we're not gonna be having
credentials on sockets, at least not anytime soon, this is a way to check
if we can "look" at a socket. Later on when (and if) we do have socket
credentials, the interface usage remains the same because we pass the
socket.
This also fixes sysctl for inet/inet6 pcblist.
Diffstat (limited to 'share/examples/secmodel/secmodel_example.c')
| -rw-r--r-- | share/examples/secmodel/secmodel_example.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/share/examples/secmodel/secmodel_example.c b/share/examples/secmodel/secmodel_example.c index 4a0527e6b91..fc60f5181a7 100644 --- a/share/examples/secmodel/secmodel_example.c +++ b/share/examples/secmodel/secmodel_example.c @@ -1,4 +1,4 @@ -/* $NetBSD: secmodel_example.c,v 1.1 2006/09/15 15:49:29 elad Exp $ */ +/* $NetBSD: secmodel_example.c,v 1.2 2006/10/13 15:39:18 elad Exp $ */ /* * This file is placed in the public domain. @@ -13,7 +13,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: secmodel_example.c,v 1.1 2006/09/15 15:49:29 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: secmodel_example.c,v 1.2 2006/10/13 15:39:18 elad Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -330,6 +330,7 @@ secmodel_example_network_cb(kauth_cred_t cred, kauth_action_t action, switch((u_long)arg0) { case KAUTH_REQ_NETWORK_SOCKET_ATTACH: case KAUTH_REQ_NETWORK_SOCKET_RAWSOCK: + case KAUTH_REQ_NETWORK_SOCKET_CANSEE: default: result = KAUTH_RESULT_DEFER; break; |
