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
697697 return call_int_hook(inode_killpriv, 0, dentry);
698698 }
699699
700−int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc)
700+int security_inode_getsecurity(struct inode *inode, const char *name, void **buffer, bool alloc)
701701 {
702702 if (unlikely(IS_PRIVATE(inode)))
703703 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
31083108 *
31093109 * Permission check is handled by selinux_inode_getxattr hook.
31103110 */
3111−static int selinux_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc)
3111+static int selinux_inode_getsecurity(struct inode *inode, const char *name, void **buffer, bool alloc)
31123112 {
31133113 u32 size;
31143114 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
14651465 *
14661466 * Returns the size of the attribute or an error code
14671467 */
1468−static int smack_inode_getsecurity(const struct inode *inode,
1468+static int smack_inode_getsecurity(struct inode *inode,
14691469 const char *name, void **buffer,
14701470 bool alloc)
14711471 {

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