MirOS Manual: vaccess(9)

VACCESS(9)                    BSD Kernel Manual                     VACCESS(9)


     vaccess - check access permissions based on vnode parameters


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

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


     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,


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


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




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

MirOS BSD #10-current         February 18, 2002                              1

Generated on 2017-04-03 16:26:17 by $MirOS: src/scripts/roff2htm,v 1.88 2017/01/29 00:51:06 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002–2017 The MirOS Project, Germany.
This product includes material provided by mirabilos.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.