Date: Wed, 5 May 2004 12:20:57 -0700 (PDT) From: Andrew Reisse <areisse@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 52309 for review Message-ID: <200405051920.i45JKv3a011793@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=52309 Change 52309 by areisse@areisse_ibook on 2004/05/05 12:20:57 mac_check_vnode_open passes open flags, not access flags. Affected files ... .. //depot/projects/trustedbsd/sedarwin73/apsl/xnu/security/sebsd/sebsd.c#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin73/apsl/xnu/security/sebsd/sebsd.c#2 (text+ko) ==== @@ -48,6 +48,7 @@ #include <sys/systm.h> #include <sys/vnode.h> #include <sys/dirent.h> +#include <sys/fcntl.h> #ifdef __APPLE__ /* @@ -1788,8 +1789,15 @@ static int sebsd_check_vnode_open(struct ucred *cred, struct vnode *vp, - struct label *filelabel, int acc_mode) + struct label *filelabel, int fmode) { + int acc_mode = 0; + if (fmode & O_TRUNC) + acc_mode |= VWRITE; + if (fmode & FWRITE) + acc_mode |= VWRITE; + if (fmode & FREAD) + acc_mode |= VREAD; if (!acc_mode) return 0;help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405051920.i45JKv3a011793>
