Klas Lindfors
70f27b98a2
include pwd.h in util.h
2015-09-09 08:24:57 +02:00
Klas Lindfors
237ed18b9f
use pam_modutil_getpwnam() if it's available
...
also refactor to pass in a passwd struct to the util functions
2015-09-08 09:15:07 +02:00
Alex Feinberg
362ca9cb92
Support comments in authfile
...
Adds support for comments (indicated by lines starting with '#') in
authfiles.
2015-08-10 14:37:02 -07:00
Klas Lindfors
fe8eb203d9
change int to size_t
2015-03-30 15:25:16 +02:00
Klas Lindfors
c2a6b9c948
fixup warnings with sign
2015-03-30 15:25:15 +02:00
Klas Lindfors
9c913fd97e
fixup warnings related to constness of filename
2015-03-30 15:25:15 +02:00
Klas Lindfors
58382bf7fc
make sure filter is null terminated and return length including null
2015-03-04 11:12:53 +01:00
Klas Lindfors
26cc397ba5
no need for a temp pointer when writing output of filter_result_len()
2015-03-04 09:51:55 +01:00
Klas Lindfors
6cd0f0c1b3
simplify filter_result_len()
...
and fixup warnings
2015-02-16 14:29:21 +01:00
Klas Lindfors
f579f256c0
Merge commit 'aa87979eb84adb3adef170dac6ff2285ba43cd26' into features/ldap
...
Conflicts:
README
2015-02-16 09:03:45 +01:00
Klas Lindfors
7075afcae9
fix format specifiers
2015-01-29 12:54:43 +01:00
Klas Lindfors
1b3a41250e
change strtok usage to strtok_r
2014-11-27 15:43:16 +01:00
Meno Abels
37553c41ce
enable that openvpn can now run without any local user
2014-11-20 23:22:59 +01:00
Meno Abels
dae9380ac7
added a better ldap handling, and to allow query active directory
2014-11-20 23:15:39 +01:00
Klas Lindfors
d9780eacd9
move check_user_token() to util
...
for testability..
2014-08-27 10:45:42 +02:00
Klas Lindfors
6dbcb903a5
move includes around in an attempt to include less
2014-08-27 09:44:49 +02:00
Simon Josefsson
43cd3b4621
Update copyright years.
2014-04-30 13:16:09 +02:00
Klas Lindfors
9e00b0cadc
free() filename before throwing the pointer away
...
avoids a memory-leak pointed out by @crosser
2013-11-21 14:38:32 +01:00
Christian Hesse
c41995c5f3
use correct size to hex decode salt
...
This fixes "stack smashing detected" (Issue #26 )
2013-09-19 14:39:44 +02:00
Klas Lindfors
eb1ba8a52a
update copyright years
2013-09-19 08:35:15 +02:00
Klas Lindfors
2f69fb99e5
move around to avoid warning
2013-09-18 15:37:24 +02:00
Klas Lindfors
16a4dc768b
always set iterations and rewind before second fscanf()
2013-09-18 15:34:45 +02:00
Klas Lindfors
d2cda4b115
use malloc() instead of alloca() and free after use
2013-09-18 14:33:54 +02:00
Eugene Crosser
2aaf0fdc23
Stop leaks of memory and of privileges
...
Fix several memory leaks and mishandling of the privilege status
where a function returned failure indication, and previously
allocated memory was not freed (and the referece was lost), or
previously droped privileges where not restored.
2013-09-18 14:22:41 +02:00
Klas Lindfors
fb6b0911fd
use pbkdf2 to process the exepected response
...
this bumps the version on the state file to 2
old files can still be read but new files will use the new format
2013-09-18 14:10:35 +02:00
Klas Lindfors
eb78d4882b
refactor to use chalresp function from ykpers
...
so challenge_response() now calls yk_challenge_response() to
do the yubikey internal stuff.
2013-09-18 14:10:35 +02:00
William West
96c1666248
bug in version check, now works with early model NEO
2013-02-14 01:48:34 -05:00
Fredrik Thulin
da246e240c
load_chalresp_state: Debug message was always shown.
2012-02-13 14:24:31 +01:00
Fredrik Thulin
e9c6c97d88
Avoid warnings for fscanf() by passing pointer to first element of array.
2012-02-10 14:14:58 +01:00
Clemens Lang
d2c14efdd4
Add missing headers
...
fcntl.h in pam_yubico.c is needed on OS X with clang for the build to
succeed, while unistd.h in util.c is required so clang doesn't complain
about implicit declarations of ftruncate and fsync.
2012-01-28 00:30:34 +01:00
Clemens Lang
126146d0e3
Fix memset() with wrong size as reported by clang
2012-01-28 00:19:24 +01:00
Simon Josefsson
3828953374
Bump version. Use silent rules. Bump copyright years.
2012-01-23 20:25:06 +01:00
Fredrik Thulin
c795e84bef
challenge_response: reject bad slot
2011-12-06 14:37:57 +01:00
Fredrik Thulin
4ce59833ba
Further pointer signedness fixes.
2011-12-06 13:46:30 +01:00
Fredrik Thulin
b27599957c
Fix implicit yubikey_* declarations.
2011-12-06 13:31:25 +01:00
Fredrik Thulin
bba72bfead
Avoid asprintf.
...
To improve portability, we do malloc() + snprintf() instead.
2011-12-06 11:58:36 +01:00
Fredrik Thulin
fa8a9ff074
Fix pointer signedness warnings.
2011-12-06 11:56:52 +01:00
Fredrik Thulin
f03314e59c
generate_random: Remove unused variable 'i'.
2011-12-06 11:54:09 +01:00
Simon Josefsson
e469b630d5
Make dependency on libykpers optional.
...
Use --without-cr to force it. Reported by Jussi Sallinen <jussi@jus.si>.
2011-06-07 00:35:22 +02:00
Fredrik Thulin
1d62f8d48b
whitespace
2011-04-11 14:49:02 +02:00
Fredrik Thulin
b20c0ed678
Make get_user_challenge_file() also include YubiKey serial number,
...
and move it to util.c.
2011-03-18 22:57:22 +01:00
Fredrik Thulin
568e8abf68
Version-tag challenge-response state file contents.
...
Helps in case we ever want to change the file format.
2011-03-18 22:57:00 +01:00
Fredrik Thulin
69ec1bf8a0
Further cleanups to challenge response code, and move more code to util.c.
2011-03-18 22:56:41 +01:00
Fredrik Thulin
721866df0b
Move more challenge-response code to util.c.
2011-03-18 21:52:07 +01:00
Fredrik Thulin
c557249503
Move soon-to-be commonly used code to util.c
2011-03-18 21:49:23 +01:00