diff options
| author | James Morris <james.l.morris@oracle.com> | 2012-05-21 21:21:06 -0400 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2012-05-21 21:21:06 -0400 |
| commit | ff2bb047c4bce9742e94911eeb44b4d6ff4734ab (patch) | |
| tree | 9d9b1cfa3fc17f0cc13f34ca697306cb1f46b05f /include/linux | |
| parent | cffee16e8b997ab947de661e8820e486b0830c94 (diff) | |
| parent | c737f8284cac91428f8fcc8281e69117fa16e887 (diff) | |
Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into next
Per pull request, for 3.5.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/lsm_audit.h | 6 | ||||
| -rw-r--r-- | include/linux/security.h | 13 |
2 files changed, 5 insertions, 14 deletions
diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h index fad48aab893b..1cc89e9df480 100644 --- a/include/linux/lsm_audit.h +++ b/include/linux/lsm_audit.h | |||
| @@ -53,7 +53,6 @@ struct common_audit_data { | |||
| 53 | #define LSM_AUDIT_DATA_KMOD 8 | 53 | #define LSM_AUDIT_DATA_KMOD 8 |
| 54 | #define LSM_AUDIT_DATA_INODE 9 | 54 | #define LSM_AUDIT_DATA_INODE 9 |
| 55 | #define LSM_AUDIT_DATA_DENTRY 10 | 55 | #define LSM_AUDIT_DATA_DENTRY 10 |
| 56 | struct task_struct *tsk; | ||
| 57 | union { | 56 | union { |
| 58 | struct path path; | 57 | struct path path; |
| 59 | struct dentry *dentry; | 58 | struct dentry *dentry; |
| @@ -93,11 +92,6 @@ int ipv4_skb_to_auditdata(struct sk_buff *skb, | |||
| 93 | int ipv6_skb_to_auditdata(struct sk_buff *skb, | 92 | int ipv6_skb_to_auditdata(struct sk_buff *skb, |
| 94 | struct common_audit_data *ad, u8 *proto); | 93 | struct common_audit_data *ad, u8 *proto); |
| 95 | 94 | ||
| 96 | /* Initialize an LSM audit data structure. */ | ||
| 97 | #define COMMON_AUDIT_DATA_INIT(_d, _t) \ | ||
| 98 | { memset((_d), 0, sizeof(struct common_audit_data)); \ | ||
| 99 | (_d)->type = LSM_AUDIT_DATA_##_t; } | ||
| 100 | |||
| 101 | void common_lsm_audit(struct common_audit_data *a, | 95 | void common_lsm_audit(struct common_audit_data *a, |
| 102 | void (*pre_audit)(struct audit_buffer *, void *), | 96 | void (*pre_audit)(struct audit_buffer *, void *), |
| 103 | void (*post_audit)(struct audit_buffer *, void *)); | 97 | void (*post_audit)(struct audit_buffer *, void *)); |
diff --git a/include/linux/security.h b/include/linux/security.h index 6e1dea93907a..ab0e091ce5fa 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -640,10 +640,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 640 | * to receive an open file descriptor via socket IPC. | 640 | * to receive an open file descriptor via socket IPC. |
| 641 | * @file contains the file structure being received. | 641 | * @file contains the file structure being received. |
| 642 | * Return 0 if permission is granted. | 642 | * Return 0 if permission is granted. |
| 643 | * | 643 | * @file_open |
| 644 | * Security hook for dentry | ||
| 645 | * | ||
| 646 | * @dentry_open | ||
| 647 | * Save open-time permission checking state for later use upon | 644 | * Save open-time permission checking state for later use upon |
| 648 | * file_permission, and recheck access if anything has changed | 645 | * file_permission, and recheck access if anything has changed |
| 649 | * since inode_permission. | 646 | * since inode_permission. |
| @@ -1498,7 +1495,7 @@ struct security_operations { | |||
| 1498 | int (*file_send_sigiotask) (struct task_struct *tsk, | 1495 | int (*file_send_sigiotask) (struct task_struct *tsk, |
| 1499 | struct fown_struct *fown, int sig); | 1496 | struct fown_struct *fown, int sig); |
| 1500 | int (*file_receive) (struct file *file); | 1497 | int (*file_receive) (struct file *file); |
| 1501 | int (*dentry_open) (struct file *file, const struct cred *cred); | 1498 | int (*file_open) (struct file *file, const struct cred *cred); |
| 1502 | 1499 | ||
| 1503 | int (*task_create) (unsigned long clone_flags); | 1500 | int (*task_create) (unsigned long clone_flags); |
| 1504 | void (*task_free) (struct task_struct *task); | 1501 | void (*task_free) (struct task_struct *task); |
| @@ -1757,7 +1754,7 @@ int security_file_set_fowner(struct file *file); | |||
| 1757 | int security_file_send_sigiotask(struct task_struct *tsk, | 1754 | int security_file_send_sigiotask(struct task_struct *tsk, |
| 1758 | struct fown_struct *fown, int sig); | 1755 | struct fown_struct *fown, int sig); |
| 1759 | int security_file_receive(struct file *file); | 1756 | int security_file_receive(struct file *file); |
| 1760 | int security_dentry_open(struct file *file, const struct cred *cred); | 1757 | int security_file_open(struct file *file, const struct cred *cred); |
| 1761 | int security_task_create(unsigned long clone_flags); | 1758 | int security_task_create(unsigned long clone_flags); |
| 1762 | void security_task_free(struct task_struct *task); | 1759 | void security_task_free(struct task_struct *task); |
| 1763 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); | 1760 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); |
| @@ -2228,8 +2225,8 @@ static inline int security_file_receive(struct file *file) | |||
| 2228 | return 0; | 2225 | return 0; |
| 2229 | } | 2226 | } |
| 2230 | 2227 | ||
| 2231 | static inline int security_dentry_open(struct file *file, | 2228 | static inline int security_file_open(struct file *file, |
| 2232 | const struct cred *cred) | 2229 | const struct cred *cred) |
| 2233 | { | 2230 | { |
| 2234 | return 0; | 2231 | return 0; |
| 2235 | } | 2232 | } |
