WSL2-Linux-Kernel/security
Jan Kara 30e053248d security: Fix security_old_inode_init_security() when CONFIG_SECURITY is not set
Commit 1e39f384bb ("evm: fix build problems") makes the stub version
of security_old_inode_init_security() return 0 when CONFIG_SECURITY is
not set.

But that makes callers such as reiserfs_security_init() assume that
security_old_inode_init_security() has set name, value, and len
arguments properly - but security_old_inode_init_security() left them
uninitialized which then results in interesting failures.

Revert security_old_inode_init_security() to the old behavior of
returning EOPNOTSUPP since both callers (reiserfs and ocfs2) handle this
just fine.

[ Also fixed the S_PRIVATE(inode) case of the actual non-stub
  security_old_inode_init_security() function to return EOPNOTSUPP
  for the same reason, as pointed out by Mimi Zohar.

  It got incorrectly changed to match the new function in commit
  fb88c2b6cbb1: "evm: fix security/security_old_init_security return
  code".   - Linus ]

Reported-by: Jorge Bastos <mysql.jorge@decimal.pt>
Acked-by: James Morris <jmorris@namei.org>
Acked-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-03 16:12:19 -08:00
..
apparmor fix apparmor dereferencing potentially freed dentry, sanitize __d_path() API 2011-12-06 23:57:18 -05:00
integrity evm: prevent racing during tfm allocation 2011-12-20 17:50:08 +02:00
keys encrypted-keys: module build fixes 2011-11-16 14:23:14 -05:00
selinux SELinux: Fix RCU deref check warning in sel_netport_insert() 2011-12-21 11:28:56 +11:00
smack Smack: smackfs cipso seq read repair 2011-11-11 11:07:21 -08:00
tomoyo TOMOYO: Fix pathname handling of disconnected paths. 2011-12-08 13:18:12 -08:00
Kconfig encrypted-keys: remove trusted-keys dependency 2011-09-14 15:23:49 -04:00
Makefile integrity: move ima inode integrity data management 2011-07-18 12:29:38 -04:00
capability.c ->permission() sanitizing: don't pass flags to ->inode_permission() 2011-07-20 01:43:26 -04:00
commoncap.c capabilities: initialize has_cap 2011-08-16 09:20:45 +10:00
device_cgroup.c security,rcu: Convert call_rcu(whitelist_item_free) to kfree_rcu() 2011-07-20 11:05:30 -07:00
inode.c convert get_sb_single() users 2010-10-29 04:16:28 -04:00
lsm_audit.c LSM: separate LSM_AUDIT_DATA_DENTRY from LSM_AUDIT_DATA_PATH 2011-04-25 18:14:07 -04:00
min_addr.c
security.c security: Fix security_old_inode_init_security() when CONFIG_SECURITY is not set 2012-01-03 16:12:19 -08:00