summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-11-08 09:14:06 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-11-08 09:14:06 +0000
commit27e8fe5394184505e09318d3691761da59ecdff5 (patch)
tree3735dd641f329d42a4f8a28b38972bf88656dca7
parent2ac9e1e23e62517a2dcbd3ae524f93e9810e6fd6 (diff)
add -EPERM return in case of missing authentication
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1661 e0336214-984f-0b4b-a45f-81c69e1f0ede
-rw-r--r--src/rfid_proto_mifare_classic.c3
1 files changed, 3 insertions, 0 deletions
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;
personal git repositories of Harald Welte. Your mileage may vary