On 06/16/2015 11:31 AM, Tyler Hicks wrote: > When is_blacklisted() was internal to the parser, it would print an > error message when encountering some file names. If the path parameter > was non-null, the error message would include the file path instead of > the file name. > > Now that the function has been moved to libapparmor, callers are > expected to print the appropriate error message if _aa_is_blacklisted() > returns -1. Since the error message printing no longer occurs inside of > _aa_is_blacklisted(), the path parameter can be removed. > > Signed-off-by: Tyler Hicks <[email protected]>
Acked-by: John Johansen <[email protected]> > --- > libraries/libapparmor/include/sys/apparmor_private.h | 2 +- > libraries/libapparmor/src/policy_cache.c | 2 +- > libraries/libapparmor/src/private.c | 2 +- > libraries/libapparmor/swig/SWIG/libapparmor.i | 2 +- > parser/parser_misc.c | 2 +- > 5 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/libraries/libapparmor/include/sys/apparmor_private.h > b/libraries/libapparmor/include/sys/apparmor_private.h > index 32b15ba..6472de9 100644 > --- a/libraries/libapparmor/include/sys/apparmor_private.h > +++ b/libraries/libapparmor/include/sys/apparmor_private.h > @@ -22,7 +22,7 @@ > > __BEGIN_DECLS > > -int _aa_is_blacklisted(const char *name, const char *path); > +int _aa_is_blacklisted(const char *name); > > void _aa_autofree(void *p); > void _aa_autoclose(int *fd); > diff --git a/libraries/libapparmor/src/policy_cache.c > b/libraries/libapparmor/src/policy_cache.c > index 72c0176..56394f7 100644 > --- a/libraries/libapparmor/src/policy_cache.c > +++ b/libraries/libapparmor/src/policy_cache.c > @@ -100,7 +100,7 @@ static int replace_all_cb(int dirfd unused, const char > *name, struct stat *st, > { > int retval = 0; > > - if (!S_ISDIR(st->st_mode) && !_aa_is_blacklisted(name, NULL)) { > + if (!S_ISDIR(st->st_mode) && !_aa_is_blacklisted(name)) { > struct replace_all_cb_data *data; > > data = (struct replace_all_cb_data *) cb_data; > diff --git a/libraries/libapparmor/src/private.c > b/libraries/libapparmor/src/private.c > index 356f4f1..9378e22 100644 > --- a/libraries/libapparmor/src/private.c > +++ b/libraries/libapparmor/src/private.c > @@ -107,7 +107,7 @@ bool atomic_dec_and_test(unsigned int *v) > return __sync_sub_and_fetch(v, 1) == 0; > } > > -int _aa_is_blacklisted(const char *name, const char *path) > +int _aa_is_blacklisted(const char *name) > { > size_t name_len = strlen(name); > struct ignored_suffix_t *suffix; > diff --git a/libraries/libapparmor/swig/SWIG/libapparmor.i > b/libraries/libapparmor/swig/SWIG/libapparmor.i > index 2f260af..b06bdde 100644 > --- a/libraries/libapparmor/swig/SWIG/libapparmor.i > +++ b/libraries/libapparmor/swig/SWIG/libapparmor.i > @@ -58,6 +58,6 @@ extern int aa_query_link_path(const char *label, const char > *target, > > /* apparmor_private.h */ > > -extern int _aa_is_blacklisted(const char *name, const char *path); > +extern int _aa_is_blacklisted(const char *name); > > %exception; > diff --git a/parser/parser_misc.c b/parser/parser_misc.c > index 3b83679..e362f24 100644 > --- a/parser/parser_misc.c > +++ b/parser/parser_misc.c > @@ -53,7 +53,7 @@ > > int is_blacklisted(const char *name, const char *path) > { > - int retval = _aa_is_blacklisted(name, path); > + int retval = _aa_is_blacklisted(name); > > if (retval == -1) > PERROR("Ignoring: '%s'\n", path ? path : name); > -- AppArmor mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
