History

security: Make inode argument of inode_getsecurity non-const

Make the inode argument of the inode_getsecurity hook non-const so that we can use it to revalidate invalid security labels.

Andreas Gruenbacher committed 10 years ago

Commit ea861df1 parent a44ca525 files · +6 −6Browse files

Showing the changes to security (3 of 5 files). Show all

Unified · Split

3 files
  1. security/security.c +1 −1
  2. security/selinux/hooks.c +1 −1
  3. security/smack/smack_lsm.c +1 −1
security/security.c+1−1
@@ -697,7 +697,7 @@ int security_inode_killpriv(struct dentry *dentry) · 696 unmodified lines
697 return call_int_hook(inode_killpriv, 0, dentry);697 return call_int_hook(inode_killpriv, 0, dentry);
698}698}
699 699
700int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc)700int security_inode_getsecurity(struct inode *inode, const char *name, void **buffer, bool alloc)
701{701{
702 if (unlikely(IS_PRIVATE(inode)))702 if (unlikely(IS_PRIVATE(inode)))
703 return -EOPNOTSUPP;703 return -EOPNOTSUPP;
security/selinux/hooks.c+1−1
@@ -3108,7 +3108,7 @@ static int selinux_inode_removexattr(struct dentry *dentry, const char *name) · 3107 unmodified lines
3108 *3108 *
3109 * Permission check is handled by selinux_inode_getxattr hook.3109 * Permission check is handled by selinux_inode_getxattr hook.
3110 */3110 */
3111static int selinux_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc)3111static int selinux_inode_getsecurity(struct inode *inode, const char *name, void **buffer, bool alloc)
3112{3112{
3113 u32 size;3113 u32 size;
3114 int error;3114 int error;
security/smack/smack_lsm.c+1−1
@@ -1465,7 +1465,7 @@ static int smack_inode_removexattr(struct dentry *dentry, const char *name) · 1464 unmodified lines
1465 *1465 *
1466 * Returns the size of the attribute or an error code1466 * Returns the size of the attribute or an error code
1467 */1467 */
1468static int smack_inode_getsecurity(const struct inode *inode,1468static int smack_inode_getsecurity(struct inode *inode,
1469 const char *name, void **buffer,1469 const char *name, void **buffer,
1470 bool alloc)1470 bool alloc)
1471{1471{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t