PERFORCE change 27246 for review
Robert Watson
rwatson at freebsd.org
Sun Mar 23 03:07:16 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=27246
Change 27246 by rwatson at rwatson_paprika on 2003/03/22 19:06:15
Adapt ufs_create() and ufs_mknod() for new cmask semantics;
don't permit ACL override of the umask yet since I haven't
decided how best to re-mix ufs_makeinode(), etc.
Affected files ...
.. //depot/projects/trustedbsd/acl/sys/ufs/ufs/ufs_vnops.c#3 edit
Differences ...
==== //depot/projects/trustedbsd/acl/sys/ufs/ufs/ufs_vnops.c#3 (text+ko) ====
@@ -190,13 +190,19 @@
struct vnode **a_vpp;
struct componentname *a_cnp;
struct vattr *a_vap;
+ int a_cmask;
} */ *ap;
{
+ u_short mode;
int error;
+ /*
+ * XXXACL: No ACL umask override here yet.
+ */
+ mode = ap->a_vap->va_mode &~ ap->a_cmask;
error =
- ufs_makeinode(MAKEIMODE(ap->a_vap->va_type, ap->a_vap->va_mode),
- ap->a_dvp, ap->a_vpp, ap->a_cnp);
+ ufs_makeinode(MAKEIMODE(ap->a_vap->va_type, mode), ap->a_dvp,
+ ap->a_vpp, ap->a_cnp);
if (error)
return (error);
VN_KNOTE(ap->a_dvp, NOTE_WRITE);
@@ -214,16 +220,22 @@
struct vnode **a_vpp;
struct componentname *a_cnp;
struct vattr *a_vap;
+ int a_cmask;
} */ *ap;
{
struct vattr *vap = ap->a_vap;
struct vnode **vpp = ap->a_vpp;
struct inode *ip;
+ u_short mode;
ino_t ino;
int error;
- error = ufs_makeinode(MAKEIMODE(vap->va_type, vap->va_mode),
- ap->a_dvp, vpp, ap->a_cnp);
+ /*
+ * XXXACL: No ACL umask override here yet.
+ */
+ mode = vap->va_mode &~ ap->a_cmask;
+ error = ufs_makeinode(MAKEIMODE(vap->va_type, mode), ap->a_dvp, vpp,
+ ap->a_cnp);
if (error)
return (error);
VN_KNOTE(ap->a_dvp, NOTE_WRITE);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list