security.c (9d8f13ba3f4833219e50767b022b82cd0da930eb) security.c (f381c272224f5f158f5cff64f8f3481fa0eee8b3)
1/*
2 * Security plug functions
3 *
4 * Copyright (C) 2001 WireX Communications, Inc <chris@wirex.com>
5 * Copyright (C) 2001-2002 Greg Kroah-Hartman <greg@kroah.com>
6 * Copyright (C) 2001 Networks Associates Technology, Inc <ssmalley@nai.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14#include <linux/capability.h>
15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/kernel.h>
18#include <linux/security.h>
1/*
2 * Security plug functions
3 *
4 * Copyright (C) 2001 WireX Communications, Inc <chris@wirex.com>
5 * Copyright (C) 2001-2002 Greg Kroah-Hartman <greg@kroah.com>
6 * Copyright (C) 2001 Networks Associates Technology, Inc <ssmalley@nai.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14#include <linux/capability.h>
15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/kernel.h>
18#include <linux/security.h>
19#include <linux/integrity.h>
19#include <linux/ima.h>
20
21#define MAX_LSM_XATTR 1
22
23/* Boot-time LSM user choice */
24static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1] =
25 CONFIG_DEFAULT_SECURITY;
26

--- 304 unchanged lines hidden (view full) ---

331int security_inode_alloc(struct inode *inode)
332{
333 inode->i_security = NULL;
334 return security_ops->inode_alloc_security(inode);
335}
336
337void security_inode_free(struct inode *inode)
338{
20#include <linux/ima.h>
21
22#define MAX_LSM_XATTR 1
23
24/* Boot-time LSM user choice */
25static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1] =
26 CONFIG_DEFAULT_SECURITY;
27

--- 304 unchanged lines hidden (view full) ---

332int security_inode_alloc(struct inode *inode)
333{
334 inode->i_security = NULL;
335 return security_ops->inode_alloc_security(inode);
336}
337
338void security_inode_free(struct inode *inode)
339{
339 ima_inode_free(inode);
340 integrity_inode_free(inode);
340 security_ops->inode_free_security(inode);
341}
342
343int security_inode_init_security(struct inode *inode, struct inode *dir,
344 const struct qstr *qstr,
345 const initxattrs initxattrs, void *fs_data)
346{
347 struct xattr new_xattrs[MAX_LSM_XATTR + 1];

--- 999 unchanged lines hidden ---
341 security_ops->inode_free_security(inode);
342}
343
344int security_inode_init_security(struct inode *inode, struct inode *dir,
345 const struct qstr *qstr,
346 const initxattrs initxattrs, void *fs_data)
347{
348 struct xattr new_xattrs[MAX_LSM_XATTR + 1];

--- 999 unchanged lines hidden ---