[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OATH-Toolkit-help] One Time Password in SLiM
From: |
Simon Josefsson |
Subject: |
Re: [OATH-Toolkit-help] One Time Password in SLiM |
Date: |
Sun, 01 May 2011 23:01:45 +0200 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/23.2 (gnu/linux) |
Christian Hesse <address@hidden> writes:
> Hello everybody,
>
> some more comments on this.
>
> Simon Josefsson <address@hidden> on Sat, 30 Apr 2011
> 09:05:41 +0200:
>> -11 means OATH_NO_SUCH_FILE, i.e., the usersfile could not be
>> found/opened.
>
> Would be nice to get human readable output here. I spent a lot of time
> searching for the problem, a simple "Could not read usersfile." would be of
> great help.
The next release will make you happy. :-)
I added oath_strerror and oath_strerror_name functions, the PAM module
will now print lines like this instead:
[pam_oath.c:pam_sm_authenticate(305)] authenticate rc -6 (OATH_INVALID_OTP: The
OTP is not valid) last otp Sun May 1 22:57:21 2011
[pam_oath.c:pam_sm_authenticate(305)] authenticate rc -8 (OATH_BAD_PASSWORD:
The password does not match) last otp Thu Jan 1 01:34:13 1970
[pam_oath.c:pam_sm_authenticate(305)] authenticate rc 0 (OATH_OK: Successful
return) last otp Sun May 1 22:57:21 2011
See commits at:
http://git.savannah.gnu.org/cgit/oath-toolkit.git/commit/?id=fba5affe8873ed88b8d931594e9abbec742559b8
http://git.savannah.gnu.org/cgit/oath-toolkit.git/commit/?id=0971e08e9bcb226148da90c24e493473c1c89de0
You can run the self-test to print all error codes and descriptions if
you give it a parameter:
address@hidden:~/src/oath-toolkit master$ liboath/tests/tst_errors foo
Return code 3 name: (null) text: Liboath unknown error
Return code 2 name: (null) text: Liboath unknown error
Return code 1 name: (null) text: Liboath unknown error
Return code 0 name: OATH_OK text: Successful return
Return code -1 name: OATH_CRYPTO_ERROR text: Internal error in crypto
functions
Return code -2 name: OATH_INVALID_DIGITS text: Unsupported number of OTP
digits
Return code -3 name: OATH_PRINTF_ERROR text: Error from system printf
call
Return code -4 name: OATH_INVALID_HEX text: Hex string is invalid
Return code -5 name: OATH_TOO_SMALL_BUFFER text: The output buffer is too
small
Return code -6 name: OATH_INVALID_OTP text: The OTP is not valid
Return code -7 name: OATH_REPLAYED_OTP text: The OTP has been replayed
Return code -8 name: OATH_BAD_PASSWORD text: The password does not
match
Return code -9 name: OATH_INVALID_COUNTER text: The counter value is
corrupt
Return code -10 name: OATH_INVALID_TIMESTAMP text: The timestamp is corrupt
Return code -11 name: OATH_NO_SUCH_FILE text: The supplied filename
does not exist
Return code -12 name: OATH_UNKNOWN_USER text: Cannot find information
about user
Return code -13 name: OATH_FILE_SEEK_ERROR text: System error when seeking
in file
Return code -14 name: OATH_FILE_CREATE_ERROR text: System error when
creating file
Return code -15 name: OATH_FILE_LOCK_ERROR text: System error when locking
file
Return code -16 name: OATH_FILE_RENAME_ERROR text: System error when
renaming file
Return code -17 name: OATH_FILE_UNLINK_ERROR text: System error when
removing file
Return code -18 name: OATH_TIME_ERROR text: System error for time
manipulation
Return code -19 name: (null) text: Liboath unknown error
Return code -20 name: (null) text: Liboath unknown error
Return code -21 name: (null) text: Liboath unknown error
address@hidden:~/src/oath-toolkit master$
/Simon