diff options
author | John Johansen <john.johansen@canonical.com> | 2012-02-16 09:20:33 -0500 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2012-03-14 09:15:25 -0400 |
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 c1e18ba5bdc0..7c69599a69e1 100644 --- a/security/apparmor/domain.c +++ b/security/apparmor/domain.c | |||
@@ -372,13 +372,12 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm) | |||
372 | state = profile->file.start; | 372 | state = profile->file.start; |
373 | 373 | ||
374 | /* buffer freed below, name is pointer into buffer */ | 374 | /* buffer freed below, name is pointer into buffer */ |
375 | error = aa_get_name(&bprm->file->f_path, profile->path_flags, &buffer, | 375 | error = aa_path_name(&bprm->file->f_path, profile->path_flags, &buffer, |
376 | &name); | 376 | &name, &info); |
377 | if (error) { | 377 | if (error) { |
378 | if (profile->flags & | 378 | if (profile->flags & |
379 | (PFLAG_IX_ON_NAME_ERROR | PFLAG_UNCONFINED)) | 379 | (PFLAG_IX_ON_NAME_ERROR | PFLAG_UNCONFINED)) |
380 | error = 0; | 380 | error = 0; |
381 | info = "Exec failed name resolution"; | ||
382 | name = bprm->filename; | 381 | name = bprm->filename; |
383 | goto audit; | 382 | goto audit; |
384 | } | 383 | } |