From 27e8fe5394184505e09318d3691761da59ecdff5 Mon Sep 17 00:00:00 2001 From: laforge Date: Tue, 8 Nov 2005 09:14:06 +0000 Subject: add -EPERM return in case of missing authentication git-svn-id: https://svn.gnumonks.org/trunk/librfid@1661 e0336214-984f-0b4b-a45f-81c69e1f0ede --- src/rfid_proto_mifare_classic.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/rfid_proto_mifare_classic.c b/src/rfid_proto_mifare_classic.c index 10de288..99386a1 100644 --- a/src/rfid_proto_mifare_classic.c +++ b/src/rfid_proto_mifare_classic.c @@ -64,6 +64,9 @@ mfcl_read(struct rfid_protocol_handle *ph, unsigned int page, if (ret < 0) return ret; + if (real_rx_len == 1 && *rx_buf == 0x04) + return -EPERM; + if (real_rx_len < *rx_len) *rx_len = real_rx_len; -- cgit v1.2.3