'\" t .\" Title: generic_permission .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: The Linux VFS .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "GENERIC_PERMISSION" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "The Linux VFS" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" generic_permission \- check for access rights on a Posix\-like filesystem .SH "SYNOPSIS" .HP \w'int\ generic_permission('u .BI "int generic_permission(struct\ inode\ *\ " "inode" ", int\ " "mask" ");" .SH "ARGUMENTS" .PP \fIinode\fR .RS 4 inode to check access rights for .RE .PP \fImask\fR .RS 4 right to check for (\fBMAY_READ\fR, \fBMAY_WRITE\fR, \fBMAY_EXEC\fR, \&.\&.\&.) .RE .SH "DESCRIPTION" .PP Used to check for read/write/execute permissions on a file\&. We use \(lqfsuid\(rq for this, letting us set arbitrary permissions for filesystem access without changing the \(lqnormal\(rq uids which are used for other things\&. .PP generic_permission is rcu\-walk aware\&. It returns \-ECHILD in case an rcu\-walk request cannot be satisfied (eg\&. requires blocking or too much complexity)\&. It would then be called again in ref\-walk mode\&. .SH "COPYRIGHT" .br