diff options
author | John Johansen <john.johansen@canonical.com> | 2012-02-16 06:20:33 -0800 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2012-03-14 06:15:25 -0700 |
commit | 57fa1e18091e66b7e1002816523cb218196a882e (patch) | |
tree | 29b4b3484fb17d60d7c6e24d107a74180ec815be /security/apparmor/domain.c | |
parent | 0fe1212d0539eb6c1e27d388711172d786e299cc (diff) |
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.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c index c1e18ba5bdc..7c69599a69e 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; } |