Scroll to navigation

INODE_PERMISSION(9) The Linux VFS INODE_PERMISSION(9)

NAME

inode_permission - Check for access rights to a given inode

SYNOPSIS

int inode_permission(struct inode * inode, int mask);

ARGUMENTS

struct inode * inode

Inode to check permission on

int mask

Right to check for (MAY_READ, MAY_WRITE, MAY_EXEC)

DESCRIPTION

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 “normal” UIDs which are used for other things.

When checking for MAY_APPEND, MAY_WRITE must also be set in mask.

COPYRIGHT

July 2017 Kernel Hackers Manual 4.12