Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6-0]: src/sys/secmodel/extensions Pull up following revision(s) (...
details: https://anonhg.NetBSD.org/src/rev/5dbd2ca47215
branches: netbsd-6-0
changeset: 774776:5dbd2ca47215
user: riz <riz%NetBSD.org@localhost>
date: Thu Mar 14 21:56:41 2013 +0000
description:
Pull up following revision(s) (requested by martin in ticket #839):
sys/secmodel/extensions/secmodel_extensions.c: revision 1.5
Make the callback deal with embryonic connections which do not have
credentials yet. Fixes PR kern/47598.
diffstat:
sys/secmodel/extensions/secmodel_extensions.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 1ad1be4844a5 -r 5dbd2ca47215 sys/secmodel/extensions/secmodel_extensions.c
--- a/sys/secmodel/extensions/secmodel_extensions.c Thu Mar 14 19:55:38 2013 +0000
+++ b/sys/secmodel/extensions/secmodel_extensions.c Thu Mar 14 21:56:41 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_extensions.c,v 1.2.8.1 2013/02/08 23:04:01 riz Exp $ */
+/* $NetBSD: secmodel_extensions.c,v 1.2.8.2 2013/03/14 21:56:41 riz Exp $ */
/*-
* Copyright (c) 2011 Elad Efrat <elad%NetBSD.org@localhost>
* All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: secmodel_extensions.c,v 1.2.8.1 2013/02/08 23:04:01 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_extensions.c,v 1.2.8.2 2013/03/14 21:56:41 riz Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -461,6 +461,9 @@
if (curtain != 0) {
struct socket *so = (struct socket *)arg1;
+ if (__predict_false(so == NULL || so->so_cred == NULL))
+ return KAUTH_RESULT_DENY;
+
if (!kauth_cred_uidmatch(cred, so->so_cred)) {
int error;
bool isroot = false;
Home |
Main Index |
Thread Index |
Old Index