summaryrefslogtreecommitdiffstats
path: root/sys/fs/nullfs
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-03-15 02:54:29 +0000
committerrwatson <rwatson@FreeBSD.org>2001-03-15 02:54:29 +0000
commitf773ff5a8798de6b68501943b6bd61072bf7ad59 (patch)
tree4a7c01bb18a84c0addaffb71077d3617e573835b /sys/fs/nullfs
parent30e261c307c1465d0c1e2ca74ddbd8886812d581 (diff)
downloadFreeBSD-src-f773ff5a8798de6b68501943b6bd61072bf7ad59.zip
FreeBSD-src-f773ff5a8798de6b68501943b6bd61072bf7ad59.tar.gz
o Change the API and ABI of the Extended Attribute kernel interfaces to
introduce a new argument, "namespace", rather than relying on a first- character namespace indicator. This is in line with more recent thinking on EA interfaces on various mailing lists, including the posix1e, Linux acl-devel, and trustedbsd-discuss forums. Two namespaces are defined by default, EXTATTR_NAMESPACE_SYSTEM and EXTATTR_NAMESPACE_USER, where the primary distinction lies in the access control model: user EAs are accessible based on the normal MAC and DAC file/directory protections, and system attributes are limited to kernel-originated or appropriately privileged userland requests. o These API changes occur at several levels: the namespace argument is introduced in the extattr_{get,set}_file() system call interfaces, at the vnode operation level in the vop_{get,set}extattr() interfaces, and in the UFS extended attribute implementation. Changes are also introduced in the VFS extattrctl() interface (system call, VFS, and UFS implementation), where the arguments are modified to include a namespace field, as well as modified to advoid direct access to userspace variables from below the VFS layer (in the style of recent changes to mount by adrian@FreeBSD.org). This required some cleanup and bug fixing regarding VFS locks and the VFS interface, as a vnode pointer may now be optionally submitted to the VFS_EXTATTRCTL() call. Updated documentation for the VFS interface will be committed shortly. o In the near future, the auto-starting feature will be updated to search two sub-directories to the ".attribute" directory in appropriate file systems: "user" and "system" to locate attributes intended for those namespaces, as the single filename is no longer sufficient to indicate what namespace the attribute is intended for. Until this is committed, all attributes auto-started by UFS will be placed in the EXTATTR_NAMESPACE_SYSTEM namespace. o The default POSIX.1e attribute names for ACLs and Capabilities have been updated to no longer include the '$' in their filename. As such, if you're using these features, you'll need to rename the attribute backing files to the same names without '$' symbols in front. o Note that these changes will require changes in userland, which will be committed shortly. These include modifications to the extended attribute utilities, as well as to libutil for new namespace string conversion routines. Once the matching userland changes are committed, a buildworld is recommended to update all the necessary include files and verify that the kernel and userland environments are in sync. Note: If you do not use extended attributes (most people won't), upgrading is not imperative although since the system call API has changed, the new userland extended attribute code will no longer compile with old include files. o Couple of minor cleanups while I'm there: make more code compilation conditional on FFS_EXTATTR, which should recover a bit of space on kernels running without EA's, as well as update copyright dates. Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r--sys/fs/nullfs/null_vfsops.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index b852cc4..c9a6801 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -73,7 +73,9 @@ static int nullfs_unmount(struct mount *mp, int mntflags, struct proc *p);
static int nullfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp);
static int nullfs_vptofh(struct vnode *vp, struct fid *fhp);
static int nullfs_extattrctl(struct mount *mp, int cmd,
- const char *attrname, caddr_t arg, struct proc *p);
+ struct vnode *filename_vp,
+ int namespace, const char *attrname,
+ struct proc *p);
/*
* Mount null layer
@@ -408,15 +410,16 @@ nullfs_vptofh(vp, fhp)
}
static int
-nullfs_extattrctl(mp, cmd, attrname, arg, p)
+nullfs_extattrctl(mp, cmd, filename_vp, namespace, attrname, p)
struct mount *mp;
int cmd;
+ struct vnode *filename_vp;
+ int namespace;
const char *attrname;
- caddr_t arg;
struct proc *p;
{
- return VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, attrname,
- arg, p);
+ return VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, filename_vp,
+ namespace, attrname, p);
}
OpenPOWER on IntegriCloud