[apparmor] [PATCH 3/4] libapparmor: Add README files to the file blacklist

Seth Arnold seth.arnold at canonical.com
Tue Jun 16 00:58:01 UTC 2015


On Mon, Jun 15, 2015 at 07:33:15PM -0500, Tyler Hicks wrote:
> Ignore README files when performing an operation on a list of files.
> 
> This matches the behavior of the is_skipped_file() function in aa.py.
> The hope is that is_skippable_file() can reuse _aa_is_blacklisted().
> 
> Signed-off-by: Tyler Hicks <tyhicks at canonical.com>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  libraries/libapparmor/src/private.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libraries/libapparmor/src/private.c b/libraries/libapparmor/src/private.c
> index abe4017..356f4f1 100644
> --- a/libraries/libapparmor/src/private.c
> +++ b/libraries/libapparmor/src/private.c
> @@ -113,7 +113,7 @@ int _aa_is_blacklisted(const char *name, const char *path)
>  	struct ignored_suffix_t *suffix;
>  
>  	/* skip dot files and files with no name */
> -	if (!name_len || *name == '.')
> +	if (!name_len || *name == '.' || !strcmp(name, "README"))
>  		return 1;
>  
>  	/* skip blacklisted suffixes */
> -- 
> 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: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150615/a77d8d7b/attachment.pgp>


More information about the AppArmor mailing list