[apparmor] [PATCH v2] parser: Return non-zero when the given path is invalid
Christian Boltz
apparmor at cboltz.de
Fri May 12 16:42:53 UTC 2017
Hello,
Am Freitag, 12. Mai 2017, 00:58:32 CEST schrieb Tyler Hicks:
...
> diff --git a/parser/parser_main.c b/parser/parser_main.c
> index 80c243d..8f1af4f 100644
> --- a/parser/parser_main.c
> +++ b/parser/parser_main.c
> @@ -1159,6 +1159,7 @@ int main(int argc, char *argv[])
> continue;
>
> if (profilename && stat(profilename, &stat_file) == -1) {
> + last_error = errno;
> PERROR("File %s not found, skipping...\n", profilename);
IIRC I've seen this message also for
apparmor_parser /no/such/directory/
so maybe you should change or simply remove the word "File" ;-)
(yes, that's unrelated to this patch, so feel free to commit this patch
as is)
I didn't test v2, but the changes since v1 look like an improvement to
me ;-)
Regards,
Christian Boltz
PS: non-random sig - translated:
Unix: Everything is a file. If something isn't a file, it kindly
has to cover itsself as such
--
Unix: Alles ist ein File, und was kein File ist, hat sich gefaelligst
als ein solches zu tarnen. [Wolfgang Weisselberg in linux-liste]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20170512/2acb2dc4/attachment.pgp>
More information about the AppArmor
mailing list