diff options
| author | James Morris <jmorris@namei.org> | 2011-03-15 18:41:17 -0400 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2011-03-15 18:41:17 -0400 |
| commit | a002951c97ff8da49938c982a4c236bf2fafdc9f (patch) | |
| tree | d43e7885ea7376df0a47a0fc8ceca66dc5bfa357 /include | |
| parent | 521cb40b0c44418a4fd36dc633f575813d59a43d (diff) | |
| parent | c151694b2c48d956ac8c8c59c6927f89cc29ef70 (diff) | |
Merge branch 'next' into for-linus
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/ext3_fs.h | 3 | ||||
| -rw-r--r-- | include/linux/fs.h | 23 | ||||
| -rw-r--r-- | include/linux/ima.h | 6 | ||||
| -rw-r--r-- | include/linux/key-type.h | 14 | ||||
| -rw-r--r-- | include/linux/key.h | 5 | ||||
| -rw-r--r-- | include/linux/keyctl.h | 2 | ||||
| -rw-r--r-- | include/linux/reiserfs_xattr.h | 2 | ||||
| -rw-r--r-- | include/linux/security.h | 35 | ||||
| -rw-r--r-- | include/linux/xattr.h | 2 |
9 files changed, 67 insertions, 25 deletions
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 65990ef612f..6043c64c207 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
| @@ -884,7 +884,8 @@ extern int ext3fs_dirhash(const char *name, int len, struct | |||
| 884 | dx_hash_info *hinfo); | 884 | dx_hash_info *hinfo); |
| 885 | 885 | ||
| 886 | /* ialloc.c */ | 886 | /* ialloc.c */ |
| 887 | extern struct inode * ext3_new_inode (handle_t *, struct inode *, int); | 887 | extern struct inode * ext3_new_inode (handle_t *, struct inode *, |
| 888 | const struct qstr *, int); | ||
| 888 | extern void ext3_free_inode (handle_t *, struct inode *); | 889 | extern void ext3_free_inode (handle_t *, struct inode *); |
| 889 | extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); | 890 | extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); |
| 890 | extern unsigned long ext3_count_free_inodes (struct super_block *); | 891 | extern unsigned long ext3_count_free_inodes (struct super_block *); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index e38b50a4b9d..af5bd7a629e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -798,8 +798,7 @@ struct inode { | |||
| 798 | #endif | 798 | #endif |
| 799 | 799 | ||
| 800 | #ifdef CONFIG_IMA | 800 | #ifdef CONFIG_IMA |
| 801 | /* protected by i_lock */ | 801 | atomic_t i_readcount; /* struct files open RO */ |
| 802 | unsigned int i_readcount; /* struct files open RO */ | ||
| 803 | #endif | 802 | #endif |
| 804 | atomic_t i_writecount; | 803 | atomic_t i_writecount; |
| 805 | #ifdef CONFIG_SECURITY | 804 | #ifdef CONFIG_SECURITY |
| @@ -2200,6 +2199,26 @@ static inline void allow_write_access(struct file *file) | |||
| 2200 | if (file) | 2199 | if (file) |
| 2201 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); | 2200 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); |
| 2202 | } | 2201 | } |
| 2202 | #ifdef CONFIG_IMA | ||
| 2203 | static inline void i_readcount_dec(struct inode *inode) | ||
| 2204 | { | ||
| 2205 | BUG_ON(!atomic_read(&inode->i_readcount)); | ||
| 2206 | atomic_dec(&inode->i_readcount); | ||
| 2207 | } | ||
| 2208 | static inline void i_readcount_inc(struct inode *inode) | ||
| 2209 | { | ||
| 2210 | atomic_inc(&inode->i_readcount); | ||
| 2211 | } | ||
| 2212 | #else | ||
| 2213 | static inline void i_readcount_dec(struct inode *inode) | ||
| 2214 | { | ||
| 2215 | return; | ||
| 2216 | } | ||
| 2217 | static inline void i_readcount_inc(struct inode *inode) | ||
| 2218 | { | ||
| 2219 | return; | ||
| 2220 | } | ||
| 2221 | #endif | ||
| 2203 | extern int do_pipe_flags(int *, int); | 2222 | extern int do_pipe_flags(int *, int); |
| 2204 | extern struct file *create_read_pipe(struct file *f, int flags); | 2223 | extern struct file *create_read_pipe(struct file *f, int flags); |
| 2205 | extern struct file *create_write_pipe(int flags); | 2224 | extern struct file *create_write_pipe(int flags); |
diff --git a/include/linux/ima.h b/include/linux/ima.h index 975837e7d6c..09e6e62f995 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h | |||
| @@ -20,7 +20,6 @@ extern void ima_inode_free(struct inode *inode); | |||
| 20 | extern int ima_file_check(struct file *file, int mask); | 20 | extern int ima_file_check(struct file *file, int mask); |
| 21 | extern void ima_file_free(struct file *file); | 21 | extern void ima_file_free(struct file *file); |
| 22 | extern int ima_file_mmap(struct file *file, unsigned long prot); | 22 | extern int ima_file_mmap(struct file *file, unsigned long prot); |
| 23 | extern void ima_counts_get(struct file *file); | ||
| 24 | 23 | ||
| 25 | #else | 24 | #else |
| 26 | static inline int ima_bprm_check(struct linux_binprm *bprm) | 25 | static inline int ima_bprm_check(struct linux_binprm *bprm) |
| @@ -53,10 +52,5 @@ static inline int ima_file_mmap(struct file *file, unsigned long prot) | |||
| 53 | return 0; | 52 | return 0; |
| 54 | } | 53 | } |
| 55 | 54 | ||
| 56 | static inline void ima_counts_get(struct file *file) | ||
| 57 | { | ||
| 58 | return; | ||
| 59 | } | ||
| 60 | |||
| 61 | #endif /* CONFIG_IMA_H */ | 55 | #endif /* CONFIG_IMA_H */ |
| 62 | #endif /* _LINUX_IMA_H */ | 56 | #endif /* _LINUX_IMA_H */ |
diff --git a/include/linux/key-type.h b/include/linux/key-type.h index 65833d4d599..9efd081bb31 100644 --- a/include/linux/key-type.h +++ b/include/linux/key-type.h | |||
| @@ -41,6 +41,9 @@ struct key_type { | |||
| 41 | */ | 41 | */ |
| 42 | size_t def_datalen; | 42 | size_t def_datalen; |
| 43 | 43 | ||
| 44 | /* vet a description */ | ||
| 45 | int (*vet_description)(const char *description); | ||
| 46 | |||
| 44 | /* instantiate a key of this type | 47 | /* instantiate a key of this type |
| 45 | * - this method should call key_payload_reserve() to determine if the | 48 | * - this method should call key_payload_reserve() to determine if the |
| 46 | * user's quota will hold the payload | 49 | * user's quota will hold the payload |
| @@ -102,11 +105,20 @@ extern int key_instantiate_and_link(struct key *key, | |||
| 102 | size_t datalen, | 105 | size_t datalen, |
| 103 | struct key *keyring, | 106 | struct key *keyring, |
| 104 | struct key *instkey); | 107 | struct key *instkey); |
| 105 | extern int key_negate_and_link(struct key *key, | 108 | extern int key_reject_and_link(struct key *key, |
| 106 | unsigned timeout, | 109 | unsigned timeout, |
| 110 | unsigned error, | ||
| 107 | struct key *keyring, | 111 | struct key *keyring, |
| 108 | struct key *instkey); | 112 | struct key *instkey); |
| 109 | extern void complete_request_key(struct key_construction *cons, int error); | 113 | extern void complete_request_key(struct key_construction *cons, int error); |
| 110 | 114 | ||
| 115 | static inline int key_negate_and_link(struct key *key, | ||
| 116 | unsigned timeout, | ||
| 117 | struct key *keyring, | ||
| 118 | struct key *instkey) | ||
| 119 | { | ||
| 120 | return key_reject_and_link(key, timeout, ENOKEY, keyring, instkey); | ||
| 121 | } | ||
| 122 | |||
| 111 | #endif /* CONFIG_KEYS */ | 123 | #endif /* CONFIG_KEYS */ |
| 112 | #endif /* _LINUX_KEY_TYPE_H */ | 124 | #endif /* _LINUX_KEY_TYPE_H */ |
diff --git a/include/linux/key.h b/include/linux/key.h index 3db0adce1fd..b2bb0171956 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
| @@ -170,6 +170,7 @@ struct key { | |||
| 170 | struct list_head link; | 170 | struct list_head link; |
| 171 | unsigned long x[2]; | 171 | unsigned long x[2]; |
| 172 | void *p[2]; | 172 | void *p[2]; |
| 173 | int reject_error; | ||
| 173 | } type_data; | 174 | } type_data; |
| 174 | 175 | ||
| 175 | /* key data | 176 | /* key data |
| @@ -275,6 +276,10 @@ static inline key_serial_t key_serial(struct key *key) | |||
| 275 | return key ? key->serial : 0; | 276 | return key ? key->serial : 0; |
| 276 | } | 277 | } |
| 277 | 278 | ||
| 279 | #define rcu_dereference_key(KEY) \ | ||
| 280 | (rcu_dereference_protected((KEY)->payload.rcudata, \ | ||
| 281 | rwsem_is_locked(&((struct key *)(KEY))->sem))) | ||
| 282 | |||
| 278 | #ifdef CONFIG_SYSCTL | 283 | #ifdef CONFIG_SYSCTL |
| 279 | extern ctl_table key_sysctls[]; | 284 | extern ctl_table key_sysctls[]; |
| 280 | #endif | 285 | #endif |
diff --git a/include/linux/keyctl.h b/include/linux/keyctl.h index bd383f1944f..9b0b865ce62 100644 --- a/include/linux/keyctl.h +++ b/include/linux/keyctl.h | |||
| @@ -53,5 +53,7 @@ | |||
| 53 | #define KEYCTL_ASSUME_AUTHORITY 16 /* assume request_key() authorisation */ | 53 | #define KEYCTL_ASSUME_AUTHORITY 16 /* assume request_key() authorisation */ |
| 54 | #define KEYCTL_GET_SECURITY 17 /* get key security label */ | 54 | #define KEYCTL_GET_SECURITY 17 /* get key security label */ |
| 55 | #define KEYCTL_SESSION_TO_PARENT 18 /* apply session keyring to parent process */ | 55 | #define KEYCTL_SESSION_TO_PARENT 18 /* apply session keyring to parent process */ |
| 56 | #define KEYCTL_REJECT 19 /* reject a partially constructed key */ | ||
| 57 | #define KEYCTL_INSTANTIATE_IOV 20 /* instantiate a partially constructed key */ | ||
| 56 | 58 | ||
| 57 | #endif /* _LINUX_KEYCTL_H */ | 59 | #endif /* _LINUX_KEYCTL_H */ |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 3b94c91f20a..6deef5dc95f 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
| @@ -63,6 +63,7 @@ extern const struct xattr_handler reiserfs_xattr_trusted_handler; | |||
| 63 | extern const struct xattr_handler reiserfs_xattr_security_handler; | 63 | extern const struct xattr_handler reiserfs_xattr_security_handler; |
| 64 | #ifdef CONFIG_REISERFS_FS_SECURITY | 64 | #ifdef CONFIG_REISERFS_FS_SECURITY |
| 65 | int reiserfs_security_init(struct inode *dir, struct inode *inode, | 65 | int reiserfs_security_init(struct inode *dir, struct inode *inode, |
| 66 | const struct qstr *qstr, | ||
| 66 | struct reiserfs_security_handle *sec); | 67 | struct reiserfs_security_handle *sec); |
| 67 | int reiserfs_security_write(struct reiserfs_transaction_handle *th, | 68 | int reiserfs_security_write(struct reiserfs_transaction_handle *th, |
| 68 | struct inode *inode, | 69 | struct inode *inode, |
| @@ -130,6 +131,7 @@ static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | |||
| 130 | #ifndef CONFIG_REISERFS_FS_SECURITY | 131 | #ifndef CONFIG_REISERFS_FS_SECURITY |
| 131 | static inline int reiserfs_security_init(struct inode *dir, | 132 | static inline int reiserfs_security_init(struct inode *dir, |
| 132 | struct inode *inode, | 133 | struct inode *inode, |
| 134 | const struct qstr *qstr, | ||
| 133 | struct reiserfs_security_handle *sec) | 135 | struct reiserfs_security_handle *sec) |
| 134 | { | 136 | { |
| 135 | return 0; | 137 | return 0; |
diff --git a/include/linux/security.h b/include/linux/security.h index b2b7f9749f5..84a202ac3de 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
| 26 | #include <linux/fsnotify.h> | 26 | #include <linux/fsnotify.h> |
| 27 | #include <linux/binfmts.h> | 27 | #include <linux/binfmts.h> |
| 28 | #include <linux/dcache.h> | ||
| 28 | #include <linux/signal.h> | 29 | #include <linux/signal.h> |
| 29 | #include <linux/resource.h> | 30 | #include <linux/resource.h> |
| 30 | #include <linux/sem.h> | 31 | #include <linux/sem.h> |
| @@ -267,6 +268,12 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 267 | * @orig the original mount data copied from userspace. | 268 | * @orig the original mount data copied from userspace. |
| 268 | * @copy copied data which will be passed to the security module. | 269 | * @copy copied data which will be passed to the security module. |
| 269 | * Returns 0 if the copy was successful. | 270 | * Returns 0 if the copy was successful. |
| 271 | * @sb_remount: | ||
| 272 | * Extracts security system specifc mount options and verifys no changes | ||
| 273 | * are being made to those options. | ||
| 274 | * @sb superblock being remounted | ||
| 275 | * @data contains the filesystem-specific data. | ||
| 276 | * Return 0 if permission is granted. | ||
| 270 | * @sb_umount: | 277 | * @sb_umount: |
| 271 | * Check permission before the @mnt file system is unmounted. | 278 | * Check permission before the @mnt file system is unmounted. |
| 272 | * @mnt contains the mounted file system. | 279 | * @mnt contains the mounted file system. |
| @@ -315,6 +322,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 315 | * then it should return -EOPNOTSUPP to skip this processing. | 322 | * then it should return -EOPNOTSUPP to skip this processing. |
| 316 | * @inode contains the inode structure of the newly created inode. | 323 | * @inode contains the inode structure of the newly created inode. |
| 317 | * @dir contains the inode structure of the parent directory. | 324 | * @dir contains the inode structure of the parent directory. |
| 325 | * @qstr contains the last path component of the new object | ||
| 318 | * @name will be set to the allocated name suffix (e.g. selinux). | 326 | * @name will be set to the allocated name suffix (e.g. selinux). |
| 319 | * @value will be set to the allocated attribute value. | 327 | * @value will be set to the allocated attribute value. |
| 320 | * @len will be set to the length of the value. | 328 | * @len will be set to the length of the value. |
| @@ -1257,12 +1265,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1257 | * @cap contains the capability <include/linux/capability.h>. | 1265 | * @cap contains the capability <include/linux/capability.h>. |
| 1258 | * @audit: Whether to write an audit message or not | 1266 | * @audit: Whether to write an audit message or not |
| 1259 | * Return 0 if the capability is granted for @tsk. | 1267 | * Return 0 if the capability is granted for @tsk. |
| 1260 | * @sysctl: | ||
| 1261 | * Check permission before accessing the @table sysctl variable in the | ||
| 1262 | * manner specified by @op. | ||
| 1263 | * @table contains the ctl_table structure for the sysctl variable. | ||
| 1264 | * @op contains the operation (001 = search, 002 = write, 004 = read). | ||
| 1265 | * Return 0 if permission is granted. | ||
| 1266 | * @syslog: | 1268 | * @syslog: |
| 1267 | * Check permission before accessing the kernel message ring or changing | 1269 | * Check permission before accessing the kernel message ring or changing |
| 1268 | * logging to the console. | 1270 | * logging to the console. |
| @@ -1383,7 +1385,6 @@ struct security_operations { | |||
| 1383 | const kernel_cap_t *permitted); | 1385 | const kernel_cap_t *permitted); |
| 1384 | int (*capable) (struct task_struct *tsk, const struct cred *cred, | 1386 | int (*capable) (struct task_struct *tsk, const struct cred *cred, |
| 1385 | int cap, int audit); | 1387 | int cap, int audit); |
| 1386 | int (*sysctl) (struct ctl_table *table, int op); | ||
| 1387 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1388 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
| 1388 | int (*quota_on) (struct dentry *dentry); | 1389 | int (*quota_on) (struct dentry *dentry); |
| 1389 | int (*syslog) (int type); | 1390 | int (*syslog) (int type); |
| @@ -1399,6 +1400,7 @@ struct security_operations { | |||
| 1399 | int (*sb_alloc_security) (struct super_block *sb); | 1400 | int (*sb_alloc_security) (struct super_block *sb); |
| 1400 | void (*sb_free_security) (struct super_block *sb); | 1401 | void (*sb_free_security) (struct super_block *sb); |
| 1401 | int (*sb_copy_data) (char *orig, char *copy); | 1402 | int (*sb_copy_data) (char *orig, char *copy); |
| 1403 | int (*sb_remount) (struct super_block *sb, void *data); | ||
| 1402 | int (*sb_kern_mount) (struct super_block *sb, int flags, void *data); | 1404 | int (*sb_kern_mount) (struct super_block *sb, int flags, void *data); |
| 1403 | int (*sb_show_options) (struct seq_file *m, struct super_block *sb); | 1405 | int (*sb_show_options) (struct seq_file *m, struct super_block *sb); |
| 1404 | int (*sb_statfs) (struct dentry *dentry); | 1406 | int (*sb_statfs) (struct dentry *dentry); |
| @@ -1435,7 +1437,8 @@ struct security_operations { | |||
| 1435 | int (*inode_alloc_security) (struct inode *inode); | 1437 | int (*inode_alloc_security) (struct inode *inode); |
| 1436 | void (*inode_free_security) (struct inode *inode); | 1438 | void (*inode_free_security) (struct inode *inode); |
| 1437 | int (*inode_init_security) (struct inode *inode, struct inode *dir, | 1439 | int (*inode_init_security) (struct inode *inode, struct inode *dir, |
| 1438 | char **name, void **value, size_t *len); | 1440 | const struct qstr *qstr, char **name, |
| 1441 | void **value, size_t *len); | ||
| 1439 | int (*inode_create) (struct inode *dir, | 1442 | int (*inode_create) (struct inode *dir, |
| 1440 | struct dentry *dentry, int mode); | 1443 | struct dentry *dentry, int mode); |
| 1441 | int (*inode_link) (struct dentry *old_dentry, | 1444 | int (*inode_link) (struct dentry *old_dentry, |
| @@ -1665,7 +1668,6 @@ int security_capset(struct cred *new, const struct cred *old, | |||
| 1665 | int security_capable(const struct cred *cred, int cap); | 1668 | int security_capable(const struct cred *cred, int cap); |
| 1666 | int security_real_capable(struct task_struct *tsk, int cap); | 1669 | int security_real_capable(struct task_struct *tsk, int cap); |
| 1667 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); | 1670 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); |
| 1668 | int security_sysctl(struct ctl_table *table, int op); | ||
| 1669 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1671 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
| 1670 | int security_quota_on(struct dentry *dentry); | 1672 | int security_quota_on(struct dentry *dentry); |
| 1671 | int security_syslog(int type); | 1673 | int security_syslog(int type); |
| @@ -1681,6 +1683,7 @@ int security_bprm_secureexec(struct linux_binprm *bprm); | |||
| 1681 | int security_sb_alloc(struct super_block *sb); | 1683 | int security_sb_alloc(struct super_block *sb); |
| 1682 | void security_sb_free(struct super_block *sb); | 1684 | void security_sb_free(struct super_block *sb); |
| 1683 | int security_sb_copy_data(char *orig, char *copy); | 1685 | int security_sb_copy_data(char *orig, char *copy); |
| 1686 | int security_sb_remount(struct super_block *sb, void *data); | ||
| 1684 | int security_sb_kern_mount(struct super_block *sb, int flags, void *data); | 1687 | int security_sb_kern_mount(struct super_block *sb, int flags, void *data); |
| 1685 | int security_sb_show_options(struct seq_file *m, struct super_block *sb); | 1688 | int security_sb_show_options(struct seq_file *m, struct super_block *sb); |
| 1686 | int security_sb_statfs(struct dentry *dentry); | 1689 | int security_sb_statfs(struct dentry *dentry); |
| @@ -1696,7 +1699,8 @@ int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts); | |||
| 1696 | int security_inode_alloc(struct inode *inode); | 1699 | int security_inode_alloc(struct inode *inode); |
| 1697 | void security_inode_free(struct inode *inode); | 1700 | void security_inode_free(struct inode *inode); |
| 1698 | int security_inode_init_security(struct inode *inode, struct inode *dir, | 1701 | int security_inode_init_security(struct inode *inode, struct inode *dir, |
| 1699 | char **name, void **value, size_t *len); | 1702 | const struct qstr *qstr, char **name, |
| 1703 | void **value, size_t *len); | ||
| 1700 | int security_inode_create(struct inode *dir, struct dentry *dentry, int mode); | 1704 | int security_inode_create(struct inode *dir, struct dentry *dentry, int mode); |
| 1701 | int security_inode_link(struct dentry *old_dentry, struct inode *dir, | 1705 | int security_inode_link(struct dentry *old_dentry, struct inode *dir, |
| 1702 | struct dentry *new_dentry); | 1706 | struct dentry *new_dentry); |
| @@ -1883,11 +1887,6 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap) | |||
| 1883 | return ret; | 1887 | return ret; |
| 1884 | } | 1888 | } |
| 1885 | 1889 | ||
| 1886 | static inline int security_sysctl(struct ctl_table *table, int op) | ||
| 1887 | { | ||
| 1888 | return 0; | ||
| 1889 | } | ||
| 1890 | |||
| 1891 | static inline int security_quotactl(int cmds, int type, int id, | 1890 | static inline int security_quotactl(int cmds, int type, int id, |
| 1892 | struct super_block *sb) | 1891 | struct super_block *sb) |
| 1893 | { | 1892 | { |
| @@ -1964,6 +1963,11 @@ static inline int security_sb_copy_data(char *orig, char *copy) | |||
| 1964 | return 0; | 1963 | return 0; |
| 1965 | } | 1964 | } |
| 1966 | 1965 | ||
| 1966 | static inline int security_sb_remount(struct super_block *sb, void *data) | ||
| 1967 | { | ||
| 1968 | return 0; | ||
| 1969 | } | ||
| 1970 | |||
| 1967 | static inline int security_sb_kern_mount(struct super_block *sb, int flags, void *data) | 1971 | static inline int security_sb_kern_mount(struct super_block *sb, int flags, void *data) |
| 1968 | { | 1972 | { |
| 1969 | return 0; | 1973 | return 0; |
| @@ -2023,6 +2027,7 @@ static inline void security_inode_free(struct inode *inode) | |||
| 2023 | 2027 | ||
| 2024 | static inline int security_inode_init_security(struct inode *inode, | 2028 | static inline int security_inode_init_security(struct inode *inode, |
| 2025 | struct inode *dir, | 2029 | struct inode *dir, |
| 2030 | const struct qstr *qstr, | ||
| 2026 | char **name, | 2031 | char **name, |
| 2027 | void **value, | 2032 | void **value, |
| 2028 | size_t *len) | 2033 | size_t *len) |
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index e6131ef98d8..6050783005b 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
| @@ -42,11 +42,13 @@ | |||
| 42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" | 42 | #define XATTR_SMACK_IPOUT "SMACK64IPOUT" |
| 43 | #define XATTR_SMACK_EXEC "SMACK64EXEC" | 43 | #define XATTR_SMACK_EXEC "SMACK64EXEC" |
| 44 | #define XATTR_SMACK_TRANSMUTE "SMACK64TRANSMUTE" | 44 | #define XATTR_SMACK_TRANSMUTE "SMACK64TRANSMUTE" |
| 45 | #define XATTR_SMACK_MMAP "SMACK64MMAP" | ||
| 45 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX | 46 | #define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX |
| 46 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN | 47 | #define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN |
| 47 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT | 48 | #define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT |
| 48 | #define XATTR_NAME_SMACKEXEC XATTR_SECURITY_PREFIX XATTR_SMACK_EXEC | 49 | #define XATTR_NAME_SMACKEXEC XATTR_SECURITY_PREFIX XATTR_SMACK_EXEC |
| 49 | #define XATTR_NAME_SMACKTRANSMUTE XATTR_SECURITY_PREFIX XATTR_SMACK_TRANSMUTE | 50 | #define XATTR_NAME_SMACKTRANSMUTE XATTR_SECURITY_PREFIX XATTR_SMACK_TRANSMUTE |
| 51 | #define XATTR_NAME_SMACKMMAP XATTR_SECURITY_PREFIX XATTR_SMACK_MMAP | ||
| 50 | 52 | ||
| 51 | #define XATTR_CAPS_SUFFIX "capability" | 53 | #define XATTR_CAPS_SUFFIX "capability" |
| 52 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX | 54 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX |
