[apparmor] [PATCH v2 03/42] fix cache write to not happen when skip-bad-cache is specified
Tyler Hicks
tyhicks at canonical.com
Mon Mar 23 22:47:52 UTC 2015
On 2015-03-06 15:48:19, Tyler Hicks wrote:
> From: John Johansen <john.johansen at canonical.com>
>
> Signed-off-by: John Johansen <john.johansen at canonical.com>
Acked-by: Tyler Hicks <tyhicks at canonical.com>
> ---
> parser/parser_main.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/parser/parser_main.c b/parser/parser_main.c
> index 750bb09..ba98a10 100644
> --- a/parser/parser_main.c
> +++ b/parser/parser_main.c
> @@ -966,8 +966,14 @@ int process_profile(int option, const char *profilename)
> stat_bin.st_size > 0) {
> if (valid_cached_file_version(cachename))
> set_mru_tstamp(stat_bin.st_ctim);
> - } else if (debug_cache)
> - pwarn("%s: Invalid or missing cache file '%s'\n", progname, cachename);
> + else if (!cond_clear_cache)
> + write_cache = 0;
> + } else {
> + if (!cond_clear_cache)
> + write_cache = 0;
> + if (debug_cache)
> + pwarn("%s: Invalid or missing cache file '%s' (%s)\n", progname, cachename, strerror(errno));
> + }
> }
> }
>
> --
> 2.1.4
>
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150323/f474d53c/attachment.pgp>
More information about the AppArmor
mailing list