/* Check whether the required access is compatible with an inode's permission. SMB doesn't recognize superuser privileges, so we need our own check for this.  */
static int smb_file_permission(struct inode *inode, int mask)
/* Check whether the required access is compatible with an inode's permission. SMB doesn't recognize superuser privileges, so we need our own check for this.  */
static int smb_file_permission(struct inode *inode, int mask)
{
	int mode = inode->i_mode;
	int error = 0;
	VERBOSE("mode=%x, mask=%x\n", mode, mask);
	mode >>= 6;
	if (mask & ~mode & (MAY_READ | MAY_WRITE | MAY_EXEC))
		error = -EACCES;
	return error;
}