'\" t .\" Title: inode_permission .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: The Linux VFS .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "INODE_PERMISSION" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "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" inode_permission \- Check for access rights to a given inode .SH "SYNOPSIS" .HP \w'int\ inode_permission('u .BI "int inode_permission(struct\ inode\ *\ " "inode" ", int\ " "mask" ");" .SH "ARGUMENTS" .PP \fIstruct inode * inode\fR .RS 4 Inode to check permission on .RE .PP \fIint mask\fR .RS 4 Right to check for (\fBMAY_READ\fR, \fBMAY_WRITE\fR, \fBMAY_EXEC\fR) .RE .SH "DESCRIPTION" .PP Check for read/write/execute permissions on an inode\&. We use fs[ug]id for this, letting us set arbitrary permissions for filesystem access without changing the \(lqnormal\(rq UIDs which are used for other things\&. .PP When checking for MAY_APPEND, MAY_WRITE must also be set in \fImask\fR\&. .SH "COPYRIGHT" .br