[apparmor] [patch] fix build with GCC 5

Tyler Hicks tyhicks at canonical.com
Thu Feb 26 18:05:10 UTC 2015


On 2015-02-24 14:46:55, Christian Boltz wrote:
> Hello,
> 
> I received the following patch to fix the build with GCC 5.
> (The patch is for 2.9.1 and should be applied to trunk and 2.9.)
> 
> Note: It seems the dbus.cc change was already done in trunk in exactly 
> the same way as in the patch, but not in the 2.9 branch.

Steve proposed nearly the same fix to af_rule.cc here:

  https://lists.ubuntu.com/archives/apparmor/2015-February/007205.html

It received a half-ack from John and an ack from Seth. It sounds like
Steve is free to commit the patch now.

Tyler

> 
> Can someone who knows the parser code please review this patch?
> 
> ----- Weitergeleitete Nachricht -----
> Von:     Richard Biener <rguenther at suse.com>
> Betreff: Request 287520 created by rguenther (submit 
> security:apparmor/apparmor)
> Datum:   Dienstag, 24. Februar 2015
> 
> Visit https://build.opensuse.org/request/show/287520
> 
> Description:
> - add apparmor-fix-stl-ostream.diff which fixes odd uses of
>   std::ostream which are not valid.  Fixes build with GCC 5
> 
> [...]
> 
> ++++++ apparmor-fix-stl-ostream.diff (new)
> --- apparmor-fix-stl-ostream.diff
> +++ apparmor-fix-stl-ostream.diff
> @@ -0,0 +1,35 @@
> +Index: parser/dbus.cc
> +===================================================================
> +--- parser/dbus.cc.orig	2014-10-08 22:20:20.000000000 +0200
> ++++ parser/dbus.cc	2015-02-24 14:10:15.656288643 +0100
> +@@ -149,7 +149,7 @@ ostream &dbus_rule::dump(ostream &os)
> + 	if (interface)
> + 		os << " interface=\"" << interface << "\"";
> + 	if (member)
> +-		os << " member=\"" << member << os << "\"";
> ++		os << " member=\"" << member << "\"";
> + 
> + 	if (!(mode & AA_DBUS_BIND) && (peer_label || name)) {
> + 		os << " peer=( ";
> +Index: parser/af_rule.cc
> +===================================================================
> +--- parser/af_rule.cc.orig	2014-09-03 22:34:10.000000000 +0200
> ++++ parser/af_rule.cc	2015-02-24 14:14:31.851251654 +0100
> +@@ -148,11 +148,14 @@ ostream &af_rule::dump_peer(ostream &os)
> + 
> + ostream &af_rule::dump(ostream &os)
> + {
> +-	os << dump_prefix(os);
> ++	dump_prefix(os);
> + 	os << af_name;
> +-	os << dump_local(os);
> ++	dump_local(os);
> + 	if (has_peer_conds())
> +-		os << " peer=(" << dump_peer(os) << ")";
> ++	  {
> ++	    os << " peer=(";
> ++	    dump_peer(os) << ")";
> ++	  }
> + 	os << ",\n";
> + 
> + 	return os;
> 
> 
> [...]
> -------------------------------------
> 
> 
> Regards,
> 
> Christian Boltz
> -- 
> It's too bad that the universities don't have the ability to
> teach common sense. :-)  [Ken Schneider in opensuse-factory]
> 
> 
> -- 
> 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/20150226/bdf9a195/attachment.pgp>


More information about the AppArmor mailing list