/* * AppArmor security module * * This file contains AppArmor policy attachment and domain transitions * * Copyright (C) 2002-2008 Novell/SUSE * Copyright 2009-2010 Canonical Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, version 2 of the * License. */#include<linux/errno.h>#include<linux/fdtable.h>#include<linux/file.h>#include<linux/mount.h>#include<linux/syscalls.h>#include<linux/tracehook.h>#include<linux/personality.h>#include<linux/xattr.h>#include"include/audit.h"#include"include/apparmorfs.h"#include"include/cred.h"#include"include/domain.h"#include"include/file.h"#include"include/ipc.h"#include"include/match.h"#include"include/path.h"#include"include/policy.h"#include"include/policy_ns.h"/** * aa_free_domain_entries - free entries in a domain table * @domain: the domain table to free (MAYBE NULL) */voidaa_free_domain_entries(structaa_domain*domain){inti;if(domain){if(!domain->table)return;for(i=0;i<domain->size;i++)kzfree(domain->table[i]);kzfree(domain->table);domain->table=NULL;}}/** * may_change_ptraced_domain - check if can change profile on ptraced task * @to_label: profile to change to (NOT NULL) * @info: message if there is an error * * C