aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h43
1 files changed, 23 insertions, 20 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index d0a28fd1747a..3ebcdd00b17d 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -53,8 +53,9 @@ extern void cap_capset_set(struct task_struct *target, kernel_cap_t *effective,
53extern int cap_bprm_set_security(struct linux_binprm *bprm); 53extern int cap_bprm_set_security(struct linux_binprm *bprm);
54extern void cap_bprm_apply_creds(struct linux_binprm *bprm, int unsafe); 54extern void cap_bprm_apply_creds(struct linux_binprm *bprm, int unsafe);
55extern int cap_bprm_secureexec(struct linux_binprm *bprm); 55extern int cap_bprm_secureexec(struct linux_binprm *bprm);
56extern int cap_inode_setxattr(struct dentry *dentry, char *name, void *value, size_t size, int flags); 56extern int cap_inode_setxattr(struct dentry *dentry, const char *name,
57extern int cap_inode_removexattr(struct dentry *dentry, char *name); 57 const void *value, size_t size, int flags);
58extern int cap_inode_removexattr(struct dentry *dentry, const char *name);
58extern int cap_inode_need_killpriv(struct dentry *dentry); 59extern int cap_inode_need_killpriv(struct dentry *dentry);
59extern int cap_inode_killpriv(struct dentry *dentry); 60extern int cap_inode_killpriv(struct dentry *dentry);
60extern int cap_task_post_setuid(uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags); 61extern int cap_task_post_setuid(uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags);
@@ -1362,13 +1363,13 @@ struct security_operations {
1362 int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); 1363 int (*inode_setattr) (struct dentry *dentry, struct iattr *attr);
1363 int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); 1364 int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry);
1364 void (*inode_delete) (struct inode *inode); 1365 void (*inode_delete) (struct inode *inode);
1365 int (*inode_setxattr) (struct dentry *dentry, char *name, void *value, 1366 int (*inode_setxattr) (struct dentry *dentry, const char *name,
1366 size_t size, int flags); 1367 const void *value, size_t size, int flags);
1367 void (*inode_post_setxattr) (struct dentry *dentry, char *name, void *value, 1368 void (*inode_post_setxattr) (struct dentry *dentry, const char *name,
1368 size_t size, int flags); 1369 const void *value, size_t size, int flags);
1369 int (*inode_getxattr) (struct dentry *dentry, char *name); 1370 int (*inode_getxattr) (struct dentry *dentry, const char *name);
1370 int (*inode_listxattr) (struct dentry *dentry); 1371 int (*inode_listxattr) (struct dentry *dentry);
1371 int (*inode_removexattr) (struct dentry *dentry, char *name); 1372 int (*inode_removexattr) (struct dentry *dentry, const char *name);
1372 int (*inode_need_killpriv) (struct dentry *dentry); 1373 int (*inode_need_killpriv) (struct dentry *dentry);
1373 int (*inode_killpriv) (struct dentry *dentry); 1374 int (*inode_killpriv) (struct dentry *dentry);
1374 int (*inode_getsecurity) (const struct inode *inode, const char *name, void **buffer, bool alloc); 1375 int (*inode_getsecurity) (const struct inode *inode, const char *name, void **buffer, bool alloc);
@@ -1633,13 +1634,13 @@ int security_inode_permission(struct inode *inode, int mask, struct nameidata *n
1633int security_inode_setattr(struct dentry *dentry, struct iattr *attr); 1634int security_inode_setattr(struct dentry *dentry, struct iattr *attr);
1634int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); 1635int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry);
1635void security_inode_delete(struct inode *inode); 1636void security_inode_delete(struct inode *inode);
1636int security_inode_setxattr(struct dentry *dentry, char *name, 1637int security_inode_setxattr(struct dentry *dentry, const char *name,
1637 void *value, size_t size, int flags); 1638 const void *value, size_t size, int flags);
1638void security_inode_post_setxattr(struct dentry *dentry, char *name, 1639void security_inode_post_setxattr(struct dentry *dentry, const char *name,
1639 void *value, size_t size, int flags); 1640 const void *value, size_t size, int flags);
1640int security_inode_getxattr(struct dentry *dentry, char *name); 1641int security_inode_getxattr(struct dentry *dentry, const char *name);
1641int security_inode_listxattr(struct dentry *dentry); 1642int security_inode_listxattr(struct dentry *dentry);
1642int security_inode_removexattr(struct dentry *dentry, char *name); 1643int security_inode_removexattr(struct dentry *dentry, const char *name);
1643int security_inode_need_killpriv(struct dentry *dentry); 1644int security_inode_need_killpriv(struct dentry *dentry);
1644int security_inode_killpriv(struct dentry *dentry); 1645int security_inode_killpriv(struct dentry *dentry);
1645int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc); 1646int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc);
@@ -2041,17 +2042,18 @@ static inline int security_inode_getattr(struct vfsmount *mnt,
2041static inline void security_inode_delete(struct inode *inode) 2042static inline void security_inode_delete(struct inode *inode)
2042{ } 2043{ }
2043 2044
2044static inline int security_inode_setxattr(struct dentry *dentry, char *name, 2045static inline int security_inode_setxattr(struct dentry *dentry,
2045 void *value, size_t size, int flags) 2046 const char *name, const void *value, size_t size, int flags)
2046{ 2047{
2047 return cap_inode_setxattr(dentry, name, value, size, flags); 2048 return cap_inode_setxattr(dentry, name, value, size, flags);
2048} 2049}
2049 2050
2050static inline void security_inode_post_setxattr(struct dentry *dentry, char *name, 2051static inline void security_inode_post_setxattr(struct dentry *dentry,
2051 void *value, size_t size, int flags) 2052 const char *name, const void *value, size_t size, int flags)
2052{ } 2053{ }
2053 2054
2054static inline int security_inode_getxattr(struct dentry *dentry, char *name) 2055static inline int security_inode_getxattr(struct dentry *dentry,
2056 const char *name)
2055{ 2057{
2056 return 0; 2058 return 0;
2057} 2059}
@@ -2061,7 +2063,8 @@ static inline int security_inode_listxattr(struct dentry *dentry)
2061 return 0; 2063 return 0;
2062} 2064}
2063 2065
2064static inline int security_inode_removexattr(struct dentry *dentry, char *name) 2066static inline int security_inode_removexattr(struct dentry *dentry,
2067 const char *name)
2065{ 2068{
2066 return cap_inode_removexattr(dentry, name); 2069 return cap_inode_removexattr(dentry, name);
2067} 2070}