Path: blob/master/security/apparmor/include/resource.h
10817 views
/*1* AppArmor security module2*3* This file contains AppArmor resource limits function definitions.4*5* Copyright (C) 1998-2008 Novell/SUSE6* Copyright 2009-2010 Canonical Ltd.7*8* This program is free software; you can redistribute it and/or9* modify it under the terms of the GNU General Public License as10* published by the Free Software Foundation, version 2 of the11* License.12*/1314#ifndef __AA_RESOURCE_H15#define __AA_RESOURCE_H1617#include <linux/resource.h>18#include <linux/sched.h>1920struct aa_profile;2122/* struct aa_rlimit - rlimit settings for the profile23* @mask: which hard limits to set24* @limits: rlimit values that override task limits25*26* AppArmor rlimits are used to set confined task rlimits. Only the27* limits specified in @mask will be controlled by apparmor.28*/29struct aa_rlimit {30unsigned int mask;31struct rlimit limits[RLIM_NLIMITS];32};3334int aa_map_resource(int resource);35int aa_task_setrlimit(struct aa_profile *profile, struct task_struct *,36unsigned int resource, struct rlimit *new_rlim);3738void __aa_transition_rlimits(struct aa_profile *old, struct aa_profile *new);3940static inline void aa_free_rlimit_rules(struct aa_rlimit *rlims)41{42/* NOP */43}4445#endif /* __AA_RESOURCE_H */464748