[apparmor] [patch] fix build with GCC 5
Christian Boltz
apparmor at cboltz.de
Tue Feb 24 13:46:55 UTC 2015
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.
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]
More information about the AppArmor
mailing list