Skip to content

Commit

Permalink
smack: Fix missing calls to netlbl_skbuff_err()
Browse files Browse the repository at this point in the history
Smack needs to call netlbl_skbuff_err() to let NetLabel do the necessary
protocol specific error handling.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
  • Loading branch information
Paul Moore committed Oct 10, 2008
1 parent dfaebe9 commit a813429
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion security/smack/smack_lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,10 @@ static int smack_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
* This is the simplist possible security model
* for networking.
*/
return smk_access(smack, ssp->smk_in, MAY_WRITE);
rc = smk_access(smack, ssp->smk_in, MAY_WRITE);
if (rc != 0)
netlbl_skbuff_err(skb, rc, 0);
return rc;
}

/**
Expand Down

0 comments on commit a813429

Please sign in to comment.