diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 23:27:36 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 23:27:36 -0400 |
| commit | cb60e3e65c1b96a4d6444a7a13dc7dd48bc15a2b (patch) | |
| tree | 4322be35db678f6299348a76ad60a2023954af7d /include/linux/security.h | |
| parent | 99262a3dafa3290866512ddfb32609198f8973e9 (diff) | |
| parent | ff2bb047c4bce9742e94911eeb44b4d6ff4734ab (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"New notable features:
- The seccomp work from Will Drewry
- PR_{GET,SET}_NO_NEW_PRIVS from Andy Lutomirski
- Longer security labels for Smack from Casey Schaufler
- Additional ptrace restriction modes for Yama by Kees Cook"
Fix up trivial context conflicts in arch/x86/Kconfig and include/linux/filter.h
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (65 commits)
apparmor: fix long path failure due to disconnected path
apparmor: fix profile lookup for unconfined
ima: fix filename hint to reflect script interpreter name
KEYS: Don't check for NULL key pointer in key_validate()
Smack: allow for significantly longer Smack labels v4
gfp flags for security_inode_alloc()?
Smack: recursive tramsmute
Yama: replace capable() with ns_capable()
TOMOYO: Accept manager programs which do not start with / .
KEYS: Add invalidation support
KEYS: Do LRU discard in full keyrings
KEYS: Permit in-place link replacement in keyring list
KEYS: Perform RCU synchronisation on keys prior to key destruction
KEYS: Announce key type (un)registration
KEYS: Reorganise keys Makefile
KEYS: Move the key config into security/keys/Kconfig
KEYS: Use the compat keyctl() syscall wrapper on Sparc64 for Sparc32 compat
Yama: remove an unused variable
samples/seccomp: fix dependencies on arch macros
Yama: add additional ptrace scopes
...
Diffstat (limited to 'include/linux/security.h')
| -rw-r--r-- | include/linux/security.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index 673afbb8238a..ab0e091ce5fa 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -144,6 +144,7 @@ struct request_sock; | |||
| 144 | #define LSM_UNSAFE_SHARE 1 | 144 | #define LSM_UNSAFE_SHARE 1 |
| 145 | #define LSM_UNSAFE_PTRACE 2 | 145 | #define LSM_UNSAFE_PTRACE 2 |
| 146 | #define LSM_UNSAFE_PTRACE_CAP 4 | 146 | #define LSM_UNSAFE_PTRACE_CAP 4 |
| 147 | #define LSM_UNSAFE_NO_NEW_PRIVS 8 | ||
| 147 | 148 | ||
| 148 | #ifdef CONFIG_MMU | 149 | #ifdef CONFIG_MMU |
| 149 | extern int mmap_min_addr_handler(struct ctl_table *table, int write, | 150 | extern int mmap_min_addr_handler(struct ctl_table *table, int write, |
| @@ -639,10 +640,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 639 | * to receive an open file descriptor via socket IPC. | 640 | * to receive an open file descriptor via socket IPC. |
| 640 | * @file contains the file structure being received. | 641 | * @file contains the file structure being received. |
| 641 | * Return 0 if permission is granted. | 642 | * Return 0 if permission is granted. |
| 642 | * | 643 | * @file_open |
| 643 | * Security hook for dentry | ||
| 644 | * | ||
| 645 | * @dentry_open | ||
| 646 | * Save open-time permission checking state for later use upon | 644 | * Save open-time permission checking state for later use upon |
| 647 | * file_permission, and recheck access if anything has changed | 645 | * file_permission, and recheck access if anything has changed |
| 648 | * since inode_permission. | 646 | * since inode_permission. |
| @@ -1497,7 +1495,7 @@ struct security_operations { | |||
| 1497 | int (*file_send_sigiotask) (struct task_struct *tsk, | 1495 | int (*file_send_sigiotask) (struct task_struct *tsk, |
| 1498 | struct fown_struct *fown, int sig); | 1496 | struct fown_struct *fown, int sig); |
| 1499 | int (*file_receive) (struct file *file); | 1497 | int (*file_receive) (struct file *file); |
| 1500 | int (*dentry_open) (struct file *file, const struct cred *cred); | 1498 | int (*file_open) (struct file *file, const struct cred *cred); |
| 1501 | 1499 | ||
| 1502 | int (*task_create) (unsigned long clone_flags); | 1500 | int (*task_create) (unsigned long clone_flags); |
| 1503 | void (*task_free) (struct task_struct *task); | 1501 | void (*task_free) (struct task_struct *task); |
| @@ -1756,7 +1754,7 @@ int security_file_set_fowner(struct file *file); | |||
| 1756 | int security_file_send_sigiotask(struct task_struct *tsk, | 1754 | int security_file_send_sigiotask(struct task_struct *tsk, |
| 1757 | struct fown_struct *fown, int sig); | 1755 | struct fown_struct *fown, int sig); |
| 1758 | int security_file_receive(struct file *file); | 1756 | int security_file_receive(struct file *file); |
| 1759 | int security_dentry_open(struct file *file, const struct cred *cred); | 1757 | int security_file_open(struct file *file, const struct cred *cred); |
| 1760 | int security_task_create(unsigned long clone_flags); | 1758 | int security_task_create(unsigned long clone_flags); |
| 1761 | void security_task_free(struct task_struct *task); | 1759 | void security_task_free(struct task_struct *task); |
| 1762 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); | 1760 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); |
| @@ -2227,8 +2225,8 @@ static inline int security_file_receive(struct file *file) | |||
| 2227 | return 0; | 2225 | return 0; |
| 2228 | } | 2226 | } |
| 2229 | 2227 | ||
| 2230 | static inline int security_dentry_open(struct file *file, | 2228 | static inline int security_file_open(struct file *file, |
| 2231 | const struct cred *cred) | 2229 | const struct cred *cred) |
| 2232 | { | 2230 | { |
| 2233 | return 0; | 2231 | return 0; |
| 2234 | } | 2232 | } |
