[apparmor] [PATCH 01/11] Fix/cleanup the dfa dump routines output to provide state label
Steve Beattie
steve at nxnw.org
Wed Mar 7 18:07:35 UTC 2012
On Wed, Mar 07, 2012 at 06:17:20AM -0800, John Johansen wrote:
> 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>
Acked-By: Steve Beattie <sbeattie at ubuntu.com>
Thanks.
> ---
> 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";
> }
> }
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- 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/20120307/0647debf/attachment.pgp>
More information about the AppArmor
mailing list