summaryrefslogtreecommitdiffstats
path: root/security/apparmor/domain.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2012-02-16 06:20:33 -0800
committerJohn Johansen <john.johansen@canonical.com>2012-03-14 06:15:25 -0700
commit57fa1e18091e66b7e1002816523cb218196a882e (patch)
tree29b4b3484fb17d60d7c6e24d107a74180ec815be /security/apparmor/domain.c
parent0fe1212d0539eb6c1e27d388711172d786e299cc (diff)
downloadop-kernel-dev-57fa1e18091e66b7e1002816523cb218196a882e.zip
op-kernel-dev-57fa1e18091e66b7e1002816523cb218196a882e.tar.gz
AppArmor: Move path failure information into aa_get_name and rename
Move the path name lookup failure messages into the main path name lookup routine, as the information is useful in more than just aa_path_perm. Also rename aa_get_name to aa_path_name as it is not getting a reference counted object with a corresponding put fn. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Kees Cook <kees@ubuntu.com>
Diffstat (limited to 'security/apparmor/domain.c')
-rw-r--r--security/apparmor/domain.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index c1e18ba..7c69599 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -372,13 +372,12 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm)
state = profile->file.start;
/* buffer freed below, name is pointer into buffer */
- error = aa_get_name(&bprm->file->f_path, profile->path_flags, &buffer,
- &name);
+ error = aa_path_name(&bprm->file->f_path, profile->path_flags, &buffer,
+ &name, &info);
if (error) {
if (profile->flags &
(PFLAG_IX_ON_NAME_ERROR | PFLAG_UNCONFINED))
error = 0;
- info = "Exec failed name resolution";
name = bprm->filename;
goto audit;
}
OpenPOWER on IntegriCloud