Skip to content
Commit a7cf4145 authored by Eric Paris's avatar Eric Paris Committed by Al Viro
Browse files

anon_inode: set S_IFREG on the anon_inode



anon_inode_mkinode() sets inode->i_mode = S_IRUSR | S_IWUSR;  This means
that (inode->i_mode & S_IFMT) == 0.  This trips up some SELinux code that
needs to determine if a given inode is a regular file, a directory, etc.
The easiest solution is to just make sure that the anon_inode also sets
S_IFREG.

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent b7bb0a12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment