GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
VOP_ACCESS(9) FreeBSD Kernel Developer's Manual VOP_ACCESS(9)

VOP_ACCESS, VOP_ACCESSX
check access permissions of a file or Unix domain socket

#include <sys/param.h>
#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);

This entry point checks the access permissions of the file against the given credentials.

Its arguments are:

vp
The vnode of the file to check.
accmode
The type of access required.
cred
The user credentials to check.
td
The thread which is checking.

The accmode is a mask which can contain flags described in <sys/vnode.h>, e.g. VREAD, VWRITE or VEXEC. For VOP_ACCESS(), the only flags that may be set in accmode are VEXEC, VWRITE, VREAD, VADMIN and VAPPEND. To check for other flags, one has to use VOP_ACCESSX() instead.

The vnode will be locked on entry and should remain locked on return.

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.

vaccess(9), vaccess_acl_nfs4(9), vaccess_acl_posix1e(9), vnode(9)

This manual page was written by Doug Rabson.
September 18, 2009 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 9 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.