DragonFly On-Line Manual Pages

Search: Section:  


VOP_ACCESS(9)         DragonFly Kernel Developer's Manual        VOP_ACCESS(9)

NAME

VOP_ACCESS -- check access permissions of a file or Unix domain socket

SYNOPSIS

#include <sys/param.h> #include <sys/vnode.h> int VOP_ACCESS(struct vnode *vp, int mode, struct ucred *cred);

DESCRIPTION

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 mode the type of access required cred the user credentials to check The mode is a mask which can contain VREAD, VWRITE or VEXEC.

RETURN VALUES

If the file is accessible in the specified way, then zero is returned, otherwise an appropriate error code is returned.

ERRORS

[EPERM] An attempt was made to change an immutable file [EACCES] Permission denied

SEE ALSO

vnode(9)

AUTHORS

This man page was written by Doug Rabson. DragonFly 3.9 October 8, 2014 DragonFly 3.9

Search: Section: