linux/security/apparmor
John Johansen 04ccd53f09 AppArmor: Fix splitting an fqname into separate namespace and profile names
As per Dan Carpenter <error27@gmail.com>
  If we have a ns name without a following profile then in the original
  code it did "*ns_name = &name[1];".  "name" is NULL so "*ns_name" is
  0x1.  That isn't useful and could cause an oops when this function is
  called from aa_remove_profiles().

Beyond this the assignment of the namespace name was wrong in the case
where the profile name was provided as it was being set to &name[1]
after name  = skip_spaces(split + 1);

Move the ns_name assignment before updating name for the split and
also add skip_spaces, making the interface more robust.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <jmorris@namei.org>
2010-09-08 09:19:31 +10:00
..
include AppArmor: Fix security_task_setrlimit logic for 2.6.36 changes 2010-09-08 09:19:29 +10:00
.gitignore AppArmor: Enable configuring and building of the AppArmor security module 2010-08-02 15:38:39 +10:00
Kconfig apparmor: depends on NET 2010-08-05 07:36:51 -04:00
Makefile AppArmor: Enable configuring and building of the AppArmor security module 2010-08-02 15:38:39 +10:00
apparmorfs.c AppArmor: userspace interfaces 2010-08-02 15:35:13 +10:00
audit.c AppArmor: basic auditing infrastructure. 2010-08-02 15:35:11 +10:00
capability.c AppArmor: mediation of non file objects 2010-08-02 15:38:35 +10:00
context.c AppArmor: contexts used in attaching policy to system objects 2010-08-02 15:35:12 +10:00
domain.c AppArmor: fix build warnings for non-const use of get_task_cred 2010-08-02 15:49:00 +10:00
file.c AppArmor: file enforcement routines 2010-08-02 15:35:14 +10:00
ipc.c AppArmor: fix build warnings for non-const use of get_task_cred 2010-08-02 15:49:00 +10:00
lib.c AppArmor: Fix splitting an fqname into separate namespace and profile names 2010-09-08 09:19:31 +10:00
lsm.c AppArmor: Fix security_task_setrlimit logic for 2.6.36 changes 2010-09-08 09:19:29 +10:00
match.c AppArmor: dfa match engine 2010-08-02 15:35:13 +10:00
path.c AppArmor: Drop hack to remove appended " (deleted)" string 2010-09-08 09:19:24 +10:00
policy.c AppArmor: core policy routines 2010-08-02 15:38:37 +10:00
policy_unpack.c AppArmor: policy routines for loading and unpacking policy 2010-08-02 15:38:36 +10:00
procattr.c AppArmor: userspace interfaces 2010-08-02 15:35:13 +10:00
resource.c AppArmor: Fix security_task_setrlimit logic for 2.6.36 changes 2010-09-08 09:19:29 +10:00
sid.c AppArmor: core policy routines 2010-08-02 15:38:37 +10:00