Skip to content

Commit

Permalink
ubifs: Don't encrypt special files on creation
Browse files Browse the repository at this point in the history
When a new inode is created, we check if the containing folder has a encryption
policy set and inherit that. This should however only be done for regular
files, links and subdirectories. Not for sockes fifos etc.

Fixes: d475a50 ("ubifs: Add skeleton for fscrypto")
Cc: [email protected]
Signed-off-by: David Gstir <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
iokill authored and richardweinberger committed Jul 14, 2017
1 parent bb50c63 commit f34e87f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ubifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, struct inode *dir,
case S_IFBLK:
case S_IFCHR:
inode->i_op = &ubifs_file_inode_operations;
encrypted = false;
break;
default:
BUG();
Expand Down

0 comments on commit f34e87f

Please sign in to comment.