Module Name: src Committed By: pooka Date: Wed Jun 12 12:14:35 UTC 2013
Modified Files: src/sys/rump/librump/rumpvfs: rumpfs.c Log Message: 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)); To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/rump/librump/rumpvfs/rumpfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/librump/rumpvfs/rumpfs.c diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.115 src/sys/rump/librump/rumpvfs/rumpfs.c:1.116 --- src/sys/rump/librump/rumpvfs/rumpfs.c:1.115 Mon Jun 10 14:15:03 2013 +++ src/sys/rump/librump/rumpvfs/rumpfs.c Wed Jun 12 12:14:35 2013 @@ -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 @@ rump_check_permitted(struct vnode *vp, s { 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