*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> vaccess (9)              
Title
Content
Arch
Section
 

VACCESS(9)

Contents


NAME    [Toc]    [Back]

     vaccess - check access permissions based on vnode parameters

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <sys/vnode.h>

     int
     vaccess(mode_t  file_mode,  uid_t  uid,  gid_t  gid,  mode_t
acc_mode,
             struct ucred *cred);

DESCRIPTION    [Toc]    [Back]

     The vaccess() function checks if the  credentials  described
in cred are
     sufficient  to  perform the operation described by acc_mode,
based on the
     file_mode, uid, and gid arguments.   These  arguments  would
typically be
     based on the vnode being accessed.

     file_mode is the current mode of the file that is having access checked.
     The uid and gid arguments are the user id and group id  representing the
     owner  of  the  file.   acc_mode describes the operation desired.  It should
     be one of VREAD, VWRITE, or VEXEC representing read,  write,
and execute,
     respectively.

RETURN VALUES    [Toc]    [Back]

     vaccess() will return 0 on success, or a non-zero error value on failure.

ERRORS    [Toc]    [Back]

     [EACCES]      Permission denied.  An attempt was made to access a file in
                   a  way  forbidden  by  its file access permissions.

SEE ALSO    [Toc]    [Back]

      
      
     vnode(9)

HISTORY    [Toc]    [Back]

     This man page was originally written by  Robert  Watson  for
FreeBSD.  It
     was  modified to represent the OpenBSD implementation by Peter Werner.

OpenBSD     3.6                        February     18,      2002
[ Back ]
 Similar pages
Name OS Title
access NetBSD check access permissions of a file or pathname
access OpenBSD check access permissions of a file or pathname
VOP_ACCESS FreeBSD check access permissions of a file or Unix domain socket
VOP_ACLCHECK FreeBSD check an access control list for a vnode
vaccess FreeBSD generate an access control decision using vnode parameters
vaccess_acl_posix1e FreeBSD generate a POSIX.1e ACL access control decision using vnode parameters
access Linux check user's permissions for a file
uucheck IRIX check the uucp directories and permissions file
uucheck HP-UX check the uucp directories and permissions file
fchmod Tru64 Change file access permissions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service