]> err.no Git - yubikey-personalization.old/commitdiff
Don't set yk_errno if nothing went wrong
authorClemens Lang <neverpanic@gmail.com>
Sat, 18 Feb 2012 23:37:13 +0000 (00:37 +0100)
committerClemens Lang <neverpanic@gmail.com>
Sat, 18 Feb 2012 23:37:13 +0000 (00:37 +0100)
This fixes a superfluous warning when using challenge-response
authentication with yubico-pam on OS X:
debug: pam_yubico.c:649 (do_challenge_response): USB error: USB error
This warning appeared although no error actually occured.

ykcore/ykcore_osx.c

index 58e3bd2934476aa5d5392a51865aa8513d4b8ecb..7d343a046a606b70368f56f5c69c42fe82965bb8 100644 (file)
@@ -121,7 +121,8 @@ void *_ykusb_open_device(int vendor_id, int product_id)
                        yk_release();
                        return 0;
                }
-               
+
+               yk_errno = 0;
                return yk;
        }