mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: security: fix up documentation for security_module_enable Security: Introduce security= boot parameter Audit: Final renamings and cleanup SELinux: use new audit hooks, remove redundant exports Audit: internally use the new LSM audit hooks LSM/Audit: Introduce generic Audit LSM hooks SELinux: remove redundant exports Netlink: Use generic LSM hook Audit: use new LSM hooks instead of SELinux exports SELinux: setup new inode/ipc getsecid hooks LSM: Introduce inode_getsecid and ipc_getsecid hooks
This commit is contained in:
commit
3925e6fc1f
18 changed files with 503 additions and 335 deletions
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <linux/capability.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/security.h>
|
||||
#include <net/netlabel.h>
|
||||
|
||||
/*
|
||||
|
|
@ -187,6 +188,7 @@ extern struct smack_known smack_known_star;
|
|||
extern struct smack_known smack_known_unset;
|
||||
|
||||
extern struct smk_list_entry *smack_list;
|
||||
extern struct security_operations smack_ops;
|
||||
|
||||
/*
|
||||
* Stricly for CIPSO level manipulation.
|
||||
|
|
|
|||
|
|
@ -2424,7 +2424,9 @@ static void smack_release_secctx(char *secdata, u32 seclen)
|
|||
{
|
||||
}
|
||||
|
||||
static struct security_operations smack_ops = {
|
||||
struct security_operations smack_ops = {
|
||||
.name = "smack",
|
||||
|
||||
.ptrace = smack_ptrace,
|
||||
.capget = cap_capget,
|
||||
.capset_check = cap_capset_check,
|
||||
|
|
@ -2557,6 +2559,9 @@ static struct security_operations smack_ops = {
|
|||
*/
|
||||
static __init int smack_init(void)
|
||||
{
|
||||
if (!security_module_enable(&smack_ops))
|
||||
return 0;
|
||||
|
||||
printk(KERN_INFO "Smack: Initializing.\n");
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -965,12 +965,21 @@ static struct vfsmount *smackfs_mount;
|
|||
*
|
||||
* register the smackfs
|
||||
*
|
||||
* Returns 0 unless the registration fails.
|
||||
* Do not register smackfs if Smack wasn't enabled
|
||||
* on boot. We can not put this method normally under the
|
||||
* smack_init() code path since the security subsystem get
|
||||
* initialized before the vfs caches.
|
||||
*
|
||||
* Returns true if we were not chosen on boot or if
|
||||
* we were chosen and filesystem registration succeeded.
|
||||
*/
|
||||
static int __init init_smk_fs(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (!security_module_enable(&smack_ops))
|
||||
return 0;
|
||||
|
||||
err = register_filesystem(&smk_fs_type);
|
||||
if (!err) {
|
||||
smackfs_mount = kern_mount(&smk_fs_type);
|
||||
|
|
|
|||
Loading…
Reference in a new issue