diff options
author | rwatson <rwatson@FreeBSD.org> | 2000-04-15 03:34:27 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2000-04-15 03:34:27 +0000 |
commit | a0dd5ab0fdc3b34857eb18eae8dae879d1e5b8cf (patch) | |
tree | 4c1ff739a8025b89f8c9ed37caf68cd1a78eaedd /sys/gnu | |
parent | e7f9f3a94cc8b0fedca28cad6fd0d3a6c248d6d8 (diff) | |
download | FreeBSD-src-a0dd5ab0fdc3b34857eb18eae8dae879d1e5b8cf.zip FreeBSD-src-a0dd5ab0fdc3b34857eb18eae8dae879d1e5b8cf.tar.gz |
Introduce extended attribute support for FFS, allowing arbitrary
(name, value) pairs to be associated with inodes. This support is
used for ACLs, MAC labels, and Capabilities in the TrustedBSD
security extensions, which are currently under development.
In this implementation, attributes are backed to data vnodes in the
style of the quota support in FFS. Support for FFS extended
attributes may be enabled using the FFS_EXTATTR kernel option
(disabled by default). Userland utilities and man pages will be
committed in the next batch. VFS interfaces and man pages have
been in the repo since 4.0-RELEASE and are unchanged.
o ufs/ufs/extattr.h: UFS-specific extattr defines
o ufs/ufs/ufs_extattr.c: bulk of support routines
o ufs/{ufs,ffs,mfs}/*.[ch]: hooks and extattr.h includes
o contrib/softupdates/ffs_softdep.c: extattr.h includes
o conf/options, conf/files, i386/conf/LINT: added FFS_EXTATTR
o coda/coda_vfsops.c: XXX required extattr.h due to ufsmount.h
(This should not be the case, and will be fixed in a future commit)
Currently attributes are not supported in MFS. This will be fixed.
Reviewed by: adrian, bp, freebsd-fs, other unthanked souls
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/ext2fs/ext2_bmap.c | 1 | ||||
-rw-r--r-- | sys/gnu/ext2fs/ext2_mount.h | 2 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_bmap.c | 1 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_mount.h | 2 |
4 files changed, 6 insertions, 0 deletions
diff --git a/sys/gnu/ext2fs/ext2_bmap.c b/sys/gnu/ext2fs/ext2_bmap.c index d8c61b1..32ba53c 100644 --- a/sys/gnu/ext2fs/ext2_bmap.c +++ b/sys/gnu/ext2fs/ext2_bmap.c @@ -48,6 +48,7 @@ #include <sys/resourcevar.h> #include <sys/conf.h> +#include <ufs/ufs/extattr.h> #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/ufsmount.h> diff --git a/sys/gnu/ext2fs/ext2_mount.h b/sys/gnu/ext2fs/ext2_mount.h index 0652545..900c81e 100644 --- a/sys/gnu/ext2fs/ext2_mount.h +++ b/sys/gnu/ext2fs/ext2_mount.h @@ -69,6 +69,7 @@ struct ucred; struct uio; struct vnode; struct netexport; +struct ufs_extattr_per_mount; /* This structure describes the UFS specific mount structure data. */ struct ufsmount { @@ -86,6 +87,7 @@ struct ufsmount { struct vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */ struct ucred *um_cred[MAXQUOTAS]; /* quota file access cred */ + struct ufs_extattr_per_mount um_extattr; /* extended attrs */ u_long um_nindir; /* indirect ptrs per block */ u_long um_bptrtodb; /* indir ptr to disk block */ u_long um_seqinc; /* inc between seq blocks */ diff --git a/sys/gnu/fs/ext2fs/ext2_bmap.c b/sys/gnu/fs/ext2fs/ext2_bmap.c index d8c61b1..32ba53c 100644 --- a/sys/gnu/fs/ext2fs/ext2_bmap.c +++ b/sys/gnu/fs/ext2fs/ext2_bmap.c @@ -48,6 +48,7 @@ #include <sys/resourcevar.h> #include <sys/conf.h> +#include <ufs/ufs/extattr.h> #include <ufs/ufs/quota.h> #include <ufs/ufs/inode.h> #include <ufs/ufs/ufsmount.h> diff --git a/sys/gnu/fs/ext2fs/ext2_mount.h b/sys/gnu/fs/ext2fs/ext2_mount.h index 0652545..900c81e 100644 --- a/sys/gnu/fs/ext2fs/ext2_mount.h +++ b/sys/gnu/fs/ext2fs/ext2_mount.h @@ -69,6 +69,7 @@ struct ucred; struct uio; struct vnode; struct netexport; +struct ufs_extattr_per_mount; /* This structure describes the UFS specific mount structure data. */ struct ufsmount { @@ -86,6 +87,7 @@ struct ufsmount { struct vnode *um_quotas[MAXQUOTAS]; /* pointer to quota files */ struct ucred *um_cred[MAXQUOTAS]; /* quota file access cred */ + struct ufs_extattr_per_mount um_extattr; /* extended attrs */ u_long um_nindir; /* indirect ptrs per block */ u_long um_bptrtodb; /* indir ptr to disk block */ u_long um_seqinc; /* inc between seq blocks */ |