In the EXT2 file.c
the open file operation (.open)
is being pointed to dquot_file_open
which furthur points to generic_file_open
which is present in fs/open.c
.
The generic_file_open
looks like it just has the below code
int generic_file_open(struct inode * inode, struct file * filp)
{
if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS)
return -EOVERFLOW;
return 0;
}
Where are the ACL permissions being checked when a file is about to be opened?
When is I googled and went through the code using LXR I found the below path.
do_sys_open -> do_filp_open -> path_openat -> do_last -> may_open -> inode_permission -> do_inode_permission -> generic_permission -> acl_permission_check -> check_acl -> posix_acl_permission
but I could not understand how the .open of EXT2 is linked to do_sys_open.
Any help in letting me know the path to checking the acl permissions during a file open would be greatly appreciated.
You're looking at it from the wrong end: names like do_sys_open
are system call entry points, and will ultimately go through the VFS layer to find the ext2 open
routine after validating permissions.