1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-07 18:54:20 +01:00

718 Commits

Author SHA1 Message Date
Klas Lindfors
7419287506
Merge branch 'pr-164' 2018-05-23 10:56:21 +02:00
Karol Babioch
eb17d840a6 Fix minor typo 2018-05-22 17:24:24 +02:00
Klas Lindfors
b240534c46
Merge branch 'pr-163' 2018-05-18 12:26:50 +02:00
Karol Babioch
a68d3be1bc Make code C90 compliant
This moves variable declrations to the beginning of a block to be C90-compliant.
2018-05-18 12:22:07 +02:00
Klas Lindfors
13ce1b6f52
Merge branch 'pr-162' 2018-05-18 11:48:14 +02:00
Klas Lindfors
b72fa76113
Merge branch 'pr-156' 2018-05-18 11:47:18 +02:00
Karol Babioch
80e7484aea pam_yubico.c: Check for return codes of snprintf() 2018-05-17 16:31:36 +02:00
Karol Babioch
f77893a11c util.c: Check for return codes of snprintf() 2018-05-17 16:28:22 +02:00
Karol Babioch
2f172e3227 ykpamcfg.c: Check also for negative return code of snprintf() 2018-05-17 16:22:15 +02:00
Karol Babioch
f94095879a pam_yubico.c: Use snprintf() instead of sprintf() 2018-05-17 16:18:53 +02:00
Karol Babioch
0972986164 util.c: Check whether generate_random() was invoked successfully
This evaluates the return code from generate_random() within
write_chalresp_state() and returns immediately in case of an error.

This fixes #161.
2018-05-17 16:09:40 +02:00
Klas Lindfors
3339cd2864
add note about physical security. 2018-05-16 09:13:50 +02:00
Klas Lindfors
38e494cd74
Merge branch 'pr-160' 2018-05-07 08:42:58 +02:00
Karol Babioch
c32ddd9665 Limit action length when parsing arguments
This limits the allowable action length when arguments are parsed to
ACTION_MAX_LEN, since this might be exploited otherwise.
2018-05-04 17:06:59 +02:00
Karol Babioch
89c1622ba2 Use strncpy() instead of strcpy()
Not an issue, just the former is considered good practice.
2018-05-04 17:05:43 +02:00
Karol Babioch
66265a3343 ykpamcfg: Use snprintf() instead of strncpy()
strncpy() is _NOT_ a safe version of strcpy() and it should not be used
(ineffective and dangerous since a NUL termination might be missing).
Instead snprintf() the way to safely construct a string with a given
limit. This commit implements this for the action parsing in ykpamcfg.
2018-05-04 17:05:38 +02:00
Karol Babioch
a7c1d0adfd Check whether fullpath can be constructed correctly
This checks the return code of snprintf() and makes sure that fullpath
actually fits into a buffer of size PATH_MAX. Otherwise, it will output
an error and exit.
2018-05-04 17:05:29 +02:00
Karol Babioch
daad39345d Make use of PATH_MAX for fullpath
Instead of hardcoding the buffer size to 256, using PATH_MAX makes more
sense here, since this can be defined differently on different
platforms. This is not perfect, though, refer to [1] for some details.
In our case it should be good enough.

[1]: https://eklitzke.org/path-max-is-tricky
2018-05-04 17:05:15 +02:00
Karol Babioch
b9aaee97ab Remove double space after periods 2018-05-04 10:45:52 +02:00
Klas Lindfors
fa3833b0a0
Merge branch 'pr-154' 2018-05-03 11:56:54 +02:00
Karol Babioch
320f487265 Spell YubiKey consistently
This makes sure that YubiKey is spelled consistently throughout the project,
since it was spelled in many different ways beforehand.
2018-05-03 10:59:44 +02:00
Klas Lindfors
e0ef089300
Merge branch 'pr-155' 2018-05-03 09:45:39 +02:00
Klas Lindfors
0089f810c7
Merge branch 'pr-153' 2018-05-03 09:45:34 +02:00
Karol Babioch
4427abb932 README: Add Travis build status
This adds a Travis build status badge to the README file, so the current
status can be seen on the GitHub page instantly.
2018-05-02 15:39:02 +02:00
Klas Lindfors
95c6d854a7
travis: add check-doc-dist to test script 2018-05-02 15:28:08 +02:00
Karol Babioch
41e6554c66 Spell system-wide consistently throughout the project 2018-05-02 14:53:14 +02:00
Klas Lindfors
067d451a1e
Merge branch 'pr-152' 2018-05-02 14:38:20 +02:00
Karol Babioch
3ecd8ce267 Revise pam_yubico.8.txt man page
This makes the style of the man page more consistent with terms used
through the project in terms of spelling, etc.
2018-05-02 14:33:57 +02:00
Karol Babioch
67a40dbd2d Revise ykpamcfg.1.txt man page 2018-05-02 14:33:41 +02:00
Klas Lindfors
b86e9a2b42
Merge branch 'pr-151' 2018-05-02 14:04:32 +02:00
Klas Lindfors
0c616bc065
Merge branch 'pr-150' 2018-05-02 14:04:27 +02:00
Karol Babioch
5ad10385df README: Add missing descriptions for undocumented options 2018-05-02 14:01:17 +02:00
Karol Babioch
35407b5d4c Add documentation for cainfo option
This adds documentation about the cainfo parameter to both the README as
well as the man page.
2018-05-02 13:48:32 +02:00
Klas Lindfors
41ff09cda8
Merge branch 'pr-149' 2018-05-02 13:41:47 +02:00
Karol Babioch
44e315cdd8 README: Add a section about chalresp_path
This adds a short section about the chalresp_path option, which was missing
previously from the overview of available options in the README file.
2018-05-02 13:36:18 +02:00
Klas Lindfors
cb62c8c188
Merge branch 'pr-148' 2018-04-26 12:24:49 +02:00
Karol Babioch
bb3e2030eb Fix a couple of typos and spell phrases more consistently
Certain phrases (Challenge-response) were not spelled consistently
throughout the project. This commit adjusts for that and fixes a
couple of typos along the way and uses the base form of verbs in
case of error messages.
2018-04-25 15:22:30 +02:00
Klas Lindfors
03099cdef2
debug: drop extra \n at end of debug output 2018-04-24 08:43:33 +02:00
Klas Lindfors
3ad6fe72e7
debug: add ykpers library version to debug output where applicable 2018-04-24 08:41:03 +02:00
Klas Lindfors
9524cebc07
bump versions after release 2018-04-20 13:28:41 +02:00
Klas Lindfors
b32ad2fefa
NEWS for 2.26 2.26 2018-04-20 12:57:50 +02:00
Klas Lindfors
f567af6e41
Drop the blurb about rewriting of this project 2018-04-18 09:05:23 +02:00
Klas Lindfors
6199b071db
Merge branch 'pr-145' 2018-04-13 15:03:11 +02:00
Karol Babioch
e5bd2ef844 Open file handlers manually using open() and fdopen() instead of using fopen()
A previous commit (d51124e) added the `e` flag to the `fopen()` calls. However
this flag is not supported on all platforms (MacOS) and will be silently
dropped (see #145). This patch works around those issues by manually opening
the file descriptor using `open()` with the `O_CLOEXEC` flag, and invoking
`fd_open()` on the resulting file descriptor to open an appropriate `FILE`
stream.

This makes sure that all files used by pam_yubico will be opened with the
`O_CLOEXEC` flag on all supported platforms to mitigate issues with missing
`fclose()` invocation (see #136).
2018-04-11 14:15:53 +02:00
Karol Babioch
0b595ee1cd Use mkotemp() instead of mkstemp()
This uses mkostemp() instead of mkstemp(), passing along the `O_CLOEXEC` flag,
which makes sure that the file descriptor is closed and won't be leaked into
any child process, which was previously an issue due to a missing fclose()
(#136).
2018-04-10 11:28:06 +02:00
Karol Babioch
d51124e884 Add "e" flag to fopen() calls
This adds the `e` flag to fopen() calls, making sure the `O_CLOEXEC` flag is
used. This makes sure that the file descriptor is being closed and not leaked
into child processes. This was an issues previously due to a missing fclose()
(#136).
2018-04-10 11:28:03 +02:00
Karol Babioch
079b975469 Open file descriptors with O_CLOEXEC
This opens any file descriptors with the O_CLOEXEC flag, which will make sure
that file descriptors won't be leaked into any child process. This was
previously an issue due to a forgotten fclose() (#136).
2018-04-10 11:27:56 +02:00
Klas Lindfors
c773044edc
Merge branch 'pr-144' 2018-04-10 10:46:08 +02:00
Klas Lindfors
c845c63aec
Merge branch 'pr-143' 2018-04-10 10:29:51 +02:00
Karol Babioch
998ee88aa5 tests: Fix compiler warnings due to wrong pointer casts
This fixes a couple of compiler warnings due to wrong pointer casts in regards
to the pamh structure, which is a bit of a hackery way to access the test data.
2018-04-09 17:21:09 +02:00