aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/extattr.h
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2001-03-31 16:20:05 +0000
committerRobert Watson <rwatson@FreeBSD.org>2001-03-31 16:20:05 +0000
commitfec605c88271613eca929c38ba52f8ebb0919523 (patch)
tree8ac73529b99e5c63b31e4b35312f86189a870fe9 /sys/sys/extattr.h
parent333ec30d712d580538b9b79d25cc9ec223057b9c (diff)
downloadsrc-fec605c88271613eca929c38ba52f8ebb0919523.tar.gz
src-fec605c88271613eca929c38ba52f8ebb0919523.zip
o Introduce extattr_{delete,get,set}_fd() to allow extended attribute
operations on file descriptors, which complement the existing set of calls, extattr_{delete,get,set}_file() which act on paths. In doing so, restructure the system call implementation such that the two sets of functions share most of the relevant code, rather than duplicating it. This pushes the vnode locking into the shared code, but keeps the copying in of some arguments in the system call code. Allowing access via file descriptors reduces the opportunity for race conditions when managing extended attributes. Obtained from: TrustedBSD Project
Notes
Notes: svn path=/head/; revision=75038
Diffstat (limited to 'sys/sys/extattr.h')
-rw-r--r--sys/sys/extattr.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h
index dbde54082539..d53ab0302f81 100644
--- a/sys/sys/extattr.h
+++ b/sys/sys/extattr.h
@@ -57,14 +57,19 @@
struct iovec;
__BEGIN_DECLS
-int extattrctl(const char *path, int cmd, const char *filename,
- int attrnamespace, const char *attrname);
-int extattr_delete_file(const char *path, int attrnamespace,
- const char *attrname);
-int extattr_get_file(const char *path, int attrnamespace,
- const char *attrname, struct iovec *iovp, unsigned iovcnt);
-int extattr_set_file(const char *path, int attrnamespace,
- const char *attrname, struct iovec *iovp, unsigned iovcnt);
+int extattrctl(const char *_path, int _cmd, const char *_filename,
+ int _attrnamespace, const char *_attrname);
+int extattr_delete_fd(int _fd, int _attrnamespace, const char *_attrname);
+int extattr_delete_file(const char *_path, int _attrnamespace,
+ const char *_attrname);
+int extattr_get_fd(int _fd, int _attrnamespace, const char *_attrname,
+ struct iovec *_iovp, unsigned _iovcnt);
+int extattr_get_file(const char *_path, int _attrnamespace,
+ const char *_attrname, struct iovec *_iovp, unsigned _iovcnt);
+int extattr_set_fd(int _fd, int _attrnamespace, const char *_attrname,
+ struct iovec *_iovp, unsigned _iovcnt);
+int extattr_set_file(const char *_path, int _attrnamespace,
+ const char *_attrname, struct iovec *_iovp, unsigned _iovcnt);
__END_DECLS
#endif /* !_KERNEL */