Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/secmodel/suser Use the socket credentials, now that we h...
details: https://anonhg.NetBSD.org/src/rev/439ffd6ab2b9
branches: trunk
changeset: 750375:439ffd6ab2b9
user: elad <elad%NetBSD.org@localhost>
date: Tue Dec 29 04:25:30 2009 +0000
description:
Use the socket credentials, now that we have them, instead of uidinfo.
diffstat:
sys/secmodel/suser/secmodel_suser.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 7f4c07b6b8c0 -r 439ffd6ab2b9 sys/secmodel/suser/secmodel_suser.c
--- a/sys/secmodel/suser/secmodel_suser.c Tue Dec 29 04:24:32 2009 +0000
+++ b/sys/secmodel/suser/secmodel_suser.c Tue Dec 29 04:25:30 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_suser.c,v 1.33 2009/12/24 19:02:07 elad Exp $ */
+/* $NetBSD: secmodel_suser.c,v 1.34 2009/12/29 04:25:30 elad Exp $ */
/*-
* Copyright (c) 2006 Elad Efrat <elad%NetBSD.org@localhost>
* All rights reserved.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.33 2009/12/24 19:02:07 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.34 2009/12/29 04:25:30 elad Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -50,7 +50,6 @@
#include <sys/sysctl.h>
#include <sys/vnode.h>
#include <sys/proc.h>
-#include <sys/uidinfo.h>
#include <sys/module.h>
#include <secmodel/suser/suser.h>
@@ -752,11 +751,10 @@
if (secmodel_suser_curtain) {
struct socket *so;
- uid_t so_uid;
so = (struct socket *)arg1;
- so_uid = so->so_uidinfo->ui_uid;
- if (kauth_cred_geteuid(cred) != so_uid)
+
+ if (!proc_uidmatch(cred, so->so_cred))
result = KAUTH_RESULT_DENY;
}
Home |
Main Index |
Thread Index |
Old Index