From c72a55993b0c57f5a6e6b0544cefdc5463efca47 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 14 Mar 2014 22:31:48 +0100 Subject: [PATCH] Return EACCES when authentication to a MIFARE Classic tag fails --- libfreefare/mifare_classic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libfreefare/mifare_classic.c b/libfreefare/mifare_classic.c index 71f8c75..5a60273 100644 --- a/libfreefare/mifare_classic.c +++ b/libfreefare/mifare_classic.c @@ -94,6 +94,8 @@ if (disconnect) { \ tag->active = false; \ } \ + if (_res == NFC_EMFCAUTHFAIL) \ + return errno = EACCES, -1; \ return errno = EIO, -1; \ } \ __##res##_n = _res; \