From 6ca91a055cc0b7ae8fca8dc8f4f4588898cd0eab Mon Sep 17 00:00:00 2001 From: rwatson Date: Sun, 10 Feb 2002 04:43:22 +0000 Subject: Part I: Update extended attribute API and ABI: o Modify the system call syntax for extattr_{get,set}_{fd,file}() so as not to use the scatter gather API (which appeared not to be used by any consumers, and be less portable), rather, accepts 'data' and 'nbytes' in the style of other simple read/write interfaces. This changes the API and ABI. o Modify system call semantics so that extattr_get_{fd,file}() return a size_t. When performing a read, the number of bytes read will be returned, unless the data pointer is NULL, in which case the number of bytes of data are returned. This changes the API only. o Modify the VOP_GETEXTATTR() vnode operation to accept a *size_t argument so as to return the size, if desirable. If set to NULL, the size will not be returned. o Update various filesystems (pseodofs, ufs) to DTRT. These changes should make extended attributes more useful and more portable. More commits to rebuild the system call files, as well as update userland utilities to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs --- sys/security/lomac/lomacfs_vnops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/security') diff --git a/sys/security/lomac/lomacfs_vnops.c b/sys/security/lomac/lomacfs_vnops.c index ca4a188..fb1c3f4 100644 --- a/sys/security/lomac/lomacfs_vnops.c +++ b/sys/security/lomac/lomacfs_vnops.c @@ -1053,6 +1053,7 @@ lomacfs_getextattr( int a_attrnamespace; const char *a_name; struct uio *a_uio; + size_t *a_size; struct ucred *a_cred; struct thread *a_td; } */ *ap @@ -1065,7 +1066,7 @@ lomacfs_getextattr( return (EPERM); else return (VOP_GETEXTATTR(VTOLVP(ap->a_vp), ap->a_attrnamespace, - ap->a_name, ap->a_uio, ap->a_cred, ap->a_td)); + ap->a_name, ap->a_uio, ap->a_size, ap->a_cred, ap->a_td)); } static int -- cgit v1.1