diff options
-rw-r--r-- | security/smack/smackfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 29b760d6b746..d31e6d957c21 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c | |||
@@ -518,6 +518,9 @@ static void smk_rule_show(struct seq_file *s, struct smack_rule *srp, int max) | |||
518 | if (strlen(srp->smk_subject) >= max || strlen(srp->smk_object) >= max) | 518 | if (strlen(srp->smk_subject) >= max || strlen(srp->smk_object) >= max) |
519 | return; | 519 | return; |
520 | 520 | ||
521 | if (srp->smk_access == 0) | ||
522 | return; | ||
523 | |||
521 | seq_printf(s, "%s %s", srp->smk_subject, srp->smk_object); | 524 | seq_printf(s, "%s %s", srp->smk_subject, srp->smk_object); |
522 | 525 | ||
523 | seq_putc(s, ' '); | 526 | seq_putc(s, ' '); |
@@ -532,8 +535,6 @@ static void smk_rule_show(struct seq_file *s, struct smack_rule *srp, int max) | |||
532 | seq_putc(s, 'a'); | 535 | seq_putc(s, 'a'); |
533 | if (srp->smk_access & MAY_TRANSMUTE) | 536 | if (srp->smk_access & MAY_TRANSMUTE) |
534 | seq_putc(s, 't'); | 537 | seq_putc(s, 't'); |
535 | if (srp->smk_access == 0) | ||
536 | seq_putc(s, '-'); | ||
537 | 538 | ||
538 | seq_putc(s, '\n'); | 539 | seq_putc(s, '\n'); |
539 | } | 540 | } |