2012-04-03 15:14 skrev Simon Josefsson:
Did the code pass 'make check' when run as root?
Everything but test:
FAIL: tst_usersfile.sh
=============================================
1 of 8 tests failed
See tests/test-suite.log
Please report to [email protected]
=============================================
*** Error code 1
Stop in /usr/home/fredrik/oath-toolkit-1.12.0/liboath/tests.
*** Error code 1
Stop in /usr/home/fredrik/oath-toolkit-1.12.0/liboath/tests.
*** Error code 1
Stop in /usr/home/fredrik/oath-toolkit-1.12.0/liboath/tests.
*** Error code 1
Stop in /usr/home/fredrik/oath-toolkit-1.12.0/liboath.
*** Error code 1
Stop in /usr/home/fredrik/oath-toolkit-1.12.0.
*** Error code 1
Stop in /usr/home/fredrik/oath-toolkit-1.12.0.
Debugging this, "authenticate rc -3" means that
oath_authenticate_usersfile returned OATH_PRINTF_ERROR. That error
is
only returned in one of five places in the library.
Could you try to modify each place in liboath/usersfile.c where
OATH_PRINTF_ERROR is returned so it returns a unique error code, and
then retry and show me the output again? That is, make the following
changes:
224: if (r <= 0)
225: return OATH_PRINTF_ERROR;
modify line 225 into 'return 4711;'
240: if (r <= 0)
241: return OATH_PRINTF_ERROR;
modify line 241 into 'return 4712;'
274: if (lockfile == NULL || ((size_t) l) != strlen (usersfile) +
5)
275: return OATH_PRINTF_ERROR;
modify line 275 into 'return 4713;'
313: free (lockfile);
314: return OATH_PRINTF_ERROR;
modify line 314 into 'return 4714;'
Also modify liboath/hotp.c like this:
127: if (len <= 0 || ((unsigned) len) != digits)
128: return OATH_PRINTF_ERROR;
modify line 128 into 'return 4715;'
Then rebuild and install the library, re-run the 'su' and tell me
which
rc number you get.
[pam_oath.c:pam_sm_authenticate(301)] authenticate rc 4711 (UNKNOWN:
Liboath unknown error) last otp Mon Apr 2 10:23:06 2012