[apparmor] [PATCH 01/11] Fix/cleanup the dfa dump routines output to provide state label

John Johansen john.johansen at canonical.com
Wed Mar 7 14:17:20 UTC 2012


Fix the transitions states output so that they output the state label
instead of the state address.  That is
  {1} -> 0x10831a0:  /
now becomes
  {1} -> {2}:  /

Signed-off-by: John Johansen <john.johansen at canonical.com>
---
 parser/libapparmor_re/hfa.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/parser/libapparmor_re/hfa.cc b/parser/libapparmor_re/hfa.cc
index eafe3c2..b18be08 100644
--- a/parser/libapparmor_re/hfa.cc
+++ b/parser/libapparmor_re/hfa.cc
@@ -647,10 +647,10 @@ void DFA::dump(ostream & os)
 
 	for (Partition::iterator i = states.begin(); i != states.end(); i++) {
 		if ((*i)->otherwise != nonmatching)
-			os << **i << " -> " << (*i)->otherwise << "\n";
+			os << **i << " -> " << *(*i)->otherwise << "\n";
 		for (StateTrans::iterator j = (*i)->trans.begin();
 		     j != (*i)->trans.end(); j++) {
-			os << **i << " -> " << j->second << ":  "
+			os << **i << " -> " << *(j)->second << ":  "
 			   << j->first << "\n";
 		}
 	}
-- 
1.7.9




More information about the AppArmor mailing list