table of contents
|VOP_ACCESS(9)||Kernel Developer's Manual||VOP_ACCESS(9)|
NAME¶VOP_ACCESS, VOP_ACCESSX — check access permissions of a file or Unix domain socket
#include <sys/vnode.h> int
VOP_ACCESS(struct vnode *vp, accmode_t accmode, struct ucred *cred, struct thread *td); int
VOP_ACCESSX(struct vnode *vp, accmode_t accmode, struct ucred *cred, struct thread *td);
DESCRIPTION¶This entry point checks the access permissions of the file against the given credentials. Its arguments are:
- The vnode of the file to check.
- The type of access required.
- The user credentials to check.
- The thread which is checking.
VEXEC. For VOP_ACCESS(), the only flags that may be set in accmode are
VAPPEND. To check for other flags, one has to use VOP_ACCESSX() instead.
LOCKS¶The vnode will be locked on entry and should remain locked on return.
RETURN VALUES¶If the file is accessible in the specified way, then zero is returned, otherwise an appropriate error code is returned.
- An attempt was made to change an immutable file.
- The permission bits the file mode or the ACL do not permit the requested access.
SEE ALSO¶vaccess(9), vaccess_acl_nfs4(9), vaccess_acl_posix1e(9), vnode(9)
AUTHORS¶This manual page was written by Doug Rabson.
|September 18, 2009||Debian|