add -EPERM return in case of missing authentication

git-svn-id: https://svn.gnumonks.org/trunk/librfid@1661 e0336214-984f-0b4b-a45f-81c69e1f0ede
This commit is contained in:
laforge 2005-11-08 09:14:06 +00:00
parent 2ac9e1e23e
commit 27e8fe5394
1 changed files with 3 additions and 0 deletions

View File

@ -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;