Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs Make sure root creds override fs mo...
details: https://anonhg.NetBSD.org/src/rev/0ff2367129da
branches: trunk
changeset: 787356:0ff2367129da
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Jun 12 12:14:35 2013 +0000
description:
Make sure root creds override fs mode (at least in a root cred secmodel).
The correct way is of course for the access method to perform this:
return kauth_authorize_vnode(cred, KAUTH_ACCESS_ACTION(mode,
vp->v_type, attr->va_mode), vp, NULL, genfs_can_access(vp->v_type,
attr->va_mode, attr->va_uid, attr->va_gid, mode, cred));
diffstat:
sys/rump/librump/rumpvfs/rumpfs.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 1339a11b15ca -r 0ff2367129da sys/rump/librump/rumpvfs/rumpfs.c
--- a/sys/rump/librump/rumpvfs/rumpfs.c Wed Jun 12 12:08:08 2013 +0000
+++ b/sys/rump/librump/rumpvfs/rumpfs.c Wed Jun 12 12:14:35 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpfs.c,v 1.115 2013/06/10 14:15:03 pooka Exp $ */
+/* $NetBSD: rumpfs.c,v 1.116 2013/06/12 12:14:35 pooka Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.115 2013/06/10 14:15:03 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.116 2013/06/12 12:14:35 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -846,8 +846,9 @@
{
struct vattr *attr = &rnode->rn_va;
- return genfs_can_access(vp->v_type, attr->va_mode, attr->va_uid,
- attr->va_gid, mode, cred);
+ return kauth_authorize_vnode(cred, KAUTH_ACCESS_ACTION(mode,
+ vp->v_type, attr->va_mode), vp, NULL, genfs_can_access(vp->v_type,
+ attr->va_mode, attr->va_uid, attr->va_gid, mode, cred));
}
int
Home |
Main Index |
Thread Index |
Old Index