[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more than one user in use
From: |
Simon Josefsson |
Subject: |
Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more than one user in users.oath |
Date: |
Wed, 04 Apr 2012 10:03:15 +0200 |
User-agent: |
Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (gnu/linux) |
Fredrik Lindgren <address@hidden> writes:
> [pam_oath.c:pam_sm_authenticate(301)] authenticate rc 4711 (UNKNOWN:
> Liboath unknown error) last otp Mon Apr 2 10:23:06 2012
Thank you. So the culprit is this code:
r = fputs (origline, outfh);
if (r <= 0)
return OATH_PRINTF_ERROR;
The POSIX standard says fputs should return a "non-negative number", or
EOF. Admittedly, 0 can be considered a non-negative number, and if it
returns 0 on success the code above would fail with OATH_PRINTF_ERROR
anyway. So the code may be buggy. Can you make the code look like
this:
r = fputs (origline, outfh);
printf ("fputs rc %d\n", r);
if (r <= 0)
return OATH_PRINTF_ERROR;
and try again and show me what it prints?
For consistency, maybe the code should use fprintf instead of fputs
here...
Thanks,
/Simon
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more than one user in users.oath, Simon Josefsson, 2012/04/01
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more tha n one user in users.oath, Fredrik Lindgren, 2012/04/02
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more than one user in users.oath, Simon Josefsson, 2012/04/02
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more tha n one user in users.oath, Fredrik Lindgren, 2012/04/02
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more than one user in users.oath, Simon Josefsson, 2012/04/03
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more tha n one user in users.oath, Fredrik Lindgren, 2012/04/04
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more than one user in users.oath,
Simon Josefsson <=
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more tha n one user in users.oath, Fredrik Lindgren, 2012/04/04
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more than one user in users.oath, Simon Josefsson, 2012/04/04
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more tha n one user in users.oath, Fredrik Lindgren, 2012/04/04
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more than one user in users.oath, Simon Josefsson, 2012/04/04
- Re: [OATH-Toolkit-help] OATH_PRINTF_ERROR with more tha n one user in users.oath, Fredrik Lindgren, 2012/04/04