timmerk / libfreefare

Automatically exported from code.google.com/p/libfreefare
Other
0 stars 0 forks source link

mifare_ultralightc_authenticate(): Set errno when authentication fails. #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, mifare_ultralightc_authenticate() returns -1 and does not touch 
errno when authentication fails. This is very strange and probably errorneous 
behavior and makes it difficult to do proper error handling.

I suggest to change libfreefare to set errno to EACCES (access denied) if 
authentication fails. Attached is a patch that implements this change.

Original issue reported on code.google.com by fuz...@gmail.com on 25 Feb 2014 at 12:33

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you.
This has been pushed but I leave the issue open as I will have probably to 
implement the same for the other cards.
I'll check once I can do some tests.

Original comment by yob...@gmail.com on 13 Mar 2014 at 1:21

GoogleCodeExporter commented 9 years ago

Original comment by yob...@gmail.com on 13 Mar 2014 at 1:21

GoogleCodeExporter commented 9 years ago
Fixed by commits 
184c5dcbdf50b5f5700ee5c7c2aa3fc70a5028b6 ULC
c72a55993b0c57f5a6e6b0544cefdc5463efca47 MFC
c4e657f8cdf8584996846e49ce108b392ac6c968 DF

Original comment by yob...@gmail.com on 14 Mar 2014 at 9:53