[apparmor] [PATCH 8/8] Convert codomain to a class

Tyler Hicks tyhicks at canonical.com
Fri Sep 27 21:38:09 UTC 2013


On 2013-09-13 10:29:19, Steve Beattie wrote:
> On Wed, Sep 11, 2013 at 01:47:47AM -0700, Tyler Hicks wrote:
> > From: John Johansen <john.johansen at canonical.com>
> > 
> > Convert the codomain to a class, and the policy lists that store
> > codomains to stl containers instead of glibc twalk.
> > 
> > Signed-off-by: John Johansen <john.johansen at canonical.com>
> > [tyhicks: Merge with dbus changes and process_file_entries() cleanup]
> > Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
> 
> I'm still reviewing this, but at a minimum, along with the missing
> unit_test.h, the following two patches should be included. The first,
> fixes the following build warning:
> 
>   profile.h:179:3: warning: label ‘std’ defined but not used [-Wunused-label]
>        std:fill(exec_table, exec_table + AA_EXEC_COUNT, (char *)NULL);
> 
> and the second gets more of the header dependencies correct in the
> Makefile.

Both look good to me. I'll roll them in. Thanks!

Tyler

> 
> ---
>  parser/profile.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: b/parser/profile.h
> ===================================================================
> --- a/parser/profile.h
> +++ b/parser/profile.h
> @@ -176,7 +176,7 @@ public:
>  		flags = { 0, 0, 0, 0};
>  		rlimits = { 0 };
>  
> -		std:fill(exec_table, exec_table + AA_EXEC_COUNT, (char *)NULL);
> +		std::fill(exec_table, exec_table + AA_EXEC_COUNT, (char *)NULL);
>  
>  		entries = NULL;
>  		mnt_ents = NULL;
> 
> 
> ---
>  parser/Makefile |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> Index: b/parser/Makefile
> ===================================================================
> --- a/parser/Makefile
> +++ b/parser/Makefile
> @@ -156,16 +156,16 @@ apparmor_parser: $(OBJECTS) $(AAREOBJECT
>  	$(CXX) $(LDFLAGS) $(EXTRA_CFLAGS) -o $@ $(OBJECTS) $(LIBS) \
>  	      ${LEXLIB}  $(AAREOBJECTS) $(AARE_LDFLAGS)
>  
> -parser_yacc.c parser_yacc.h: parser_yacc.y parser.h
> +parser_yacc.c parser_yacc.h: parser_yacc.y parser.h profile.h
>  	$(YACC) $(YFLAGS) -o parser_yacc.c parser_yacc.y
>  
> -parser_lex.c: parser_lex.l parser_yacc.h parser.h
> +parser_lex.c: parser_lex.l parser_yacc.h parser.h profile.h
>  	$(LEX) ${LEXFLAGS} -o$@ $<
>  
>  parser_lex.o: parser_lex.c parser.h parser_yacc.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
> -parser_misc.o: parser_misc.c parser.h parser_yacc.h af_names.h cap_names.h
> +parser_misc.o: parser_misc.c parser.h parser_yacc.h profile.h af_names.h cap_names.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
>  parser_yacc.o: parser_yacc.c parser_yacc.h
> @@ -174,28 +174,28 @@ parser_yacc.o: parser_yacc.c parser_yacc
>  parser_main.o: parser_main.c parser.h parser_version.h libapparmor_re/apparmor_re.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
> -parser_interface.o: parser_interface.c parser.h libapparmor_re/apparmor_re.h
> +parser_interface.o: parser_interface.c parser.h profile.h libapparmor_re/apparmor_re.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
>  parser_include.o: parser_include.c parser.h parser_include.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
> -parser_merge.o: parser_merge.c parser.h
> +parser_merge.o: parser_merge.c parser.h profile.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
> -parser_regex.o: parser_regex.c parser.h libapparmor_re/apparmor_re.h
> +parser_regex.o: parser_regex.c parser.h profile.h libapparmor_re/apparmor_re.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
>  parser_symtab.o: parser_symtab.c parser.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
> -parser_variable.o: parser_variable.c parser.h
> +parser_variable.o: parser_variable.c parser.h profile.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
> -parser_policy.o: parser_policy.c parser.h parser_yacc.h
> +parser_policy.o: parser_policy.c parser.h parser_yacc.h profile.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
> -parser_alias.o: parser_alias.c parser.h
> +parser_alias.o: parser_alias.c parser.h profile.h
>  	$(CXX) $(EXTRA_CFLAGS) -c -o $@ $<
>  
>  parser_common.o: parser_common.c parser.h
> 
> -- 
> Steve Beattie
> <sbeattie at ubuntu.com>
> http://NxNW.org/~steve/



> -- 
> 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: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130927/cd7e7fc6/attachment.pgp>


More information about the AppArmor mailing list