1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-01-20 10:52:16 +01:00

672 Commits

Author SHA1 Message Date
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
Karol Babioch
1aacb11538 Fix several format string specifiers
This fixes several specifiers to better represent the data type, which fixes
multiple compiler warnings.
2018-04-09 17:18:36 +02:00
Klas Lindfors
6fe39d60d1
Merge branch 'pr-141' 2018-04-09 09:10:19 +02:00
Klas Lindfors
d63c2f2890
Merge branch 'pr-139' 2018-04-09 09:08:34 +02:00
Karol Babioch
a92a59c761 util_test: Use mkdtemp() instead of tempnam()
The latter function is considered insecure and deprecated on some platforms.
This will create the directory with 0700 implicitely, where it was 0755
beforehand. Since this is a more secure default and the test suite runs fine,
we don't bother to chmod the directory.
2018-04-06 16:59:31 +02:00
Karol Babioch
8c740c13df Require sudo in .travis.yml
Since the install script currently requires sudo, we should state so
explicetely in the .travis.yml file to make sure we get a sudo-enabled
environment and not a container-based one, as there is no sudo available
in the latter one. The default was changed in August 2017, so when
forking this repository, the Travis CI won't work out-of-the box without
this modification. This is described in some details here [1].

[1]: https://docs.travis-ci.com/user/reference/overview/
2018-04-06 13:28:26 +02:00
Klas Lindfors
0f6ceabab0
util: make sure to close the authfile before returning success
fixes #136
2018-04-03 09:19:53 +02:00
Klas Lindfors
af53411f7d
bump ykpers version for mac build 2018-03-27 13:09:26 +02:00
Klas Lindfors
25f2503b34
bump version to 2.26 2018-03-27 12:44:23 +02:00
Klas Lindfors
432d7c60a1
NEWS for 2.25 2.25 2018-03-27 12:37:33 +02:00
Klas Lindfors
5687ff95a9
Merge branch 'pr-133' 2018-03-20 14:09:06 +01:00
Karol Babioch
8db623de5d Document nullok parameter in manpage
The nullok parameter was documented in the README, but not in the manpage. This
adds the section from the README file.
2018-03-20 13:55:23 +01:00
Karol Babioch
b791091502 Print out nullok parameter in debug mode
This prints out the nullok parameter in debug mode, which was introduced
previously.
2018-03-20 13:53:09 +01:00
Klas Lindfors
49ad48b3ef
Merge branch 'pr-130' 2017-12-15 08:08:55 +01:00
Robert Giles
504c838b5a Update ldap_bind_user to wrap in brackets, in the likely case the actually bind DN will reside in an OU with spaces in the name. 2017-12-14 11:51:20 -06:00
Robert Giles
c1995a70b7 Typo in asciidoc syntax. 2017-12-14 10:06:19 -06:00
Robert Giles
c0d1646853 Clarify documentation; this example configuration is also useful for just regular pam_yubico configuration elsewhere against AD, too. 2017-12-14 10:04:48 -06:00
Klas Lindfors
db0d7a548b
Merge branch 'pr-129' 2017-11-20 10:16:40 +01:00
Andy Neff
5003f3974d
Update Yubikey_and_SELinux_on_Fedora_18_and_up.adoc
Added a quick explanation for what to do when you are using your own server that uses a custom port
2017-11-15 15:46:46 -05:00
Klas Lindfors
9a674273e4
drop more text with unnecessary old version deps 2017-10-10 09:37:50 +02:00
Klas Lindfors
1bc784a4f0
drop outdated version recommendations 2017-10-06 10:12:50 +02:00
Klas Lindfors
dbaf857ef0
improved debug messages when getpwnam_r() doesn't return a user 2017-08-30 08:32:54 +02:00
Klas Lindfors
3d0d9f52e5
doc: fixup which proxy schemes are supported, add http and https
fixes #127
2017-08-07 12:39:58 +02:00
Klas Lindfors
39cfa7d939
Merge branch 'pr-121' 2017-06-26 10:07:09 +02:00
Larhard
42e8a06bfe add check_user_challenge_file tests 2017-06-24 08:31:55 +00:00
Larhard
d3f50c43ac clear check_user_challenge_file 2017-06-23 20:10:53 +00:00
Alessio Di Mauro
f3061d627e
Add message about project rewrite to README 2017-06-16 11:20:04 +02:00
Larhard
ff87bf0ac4 code cleanup 2017-04-09 17:13:19 +02:00
Larhard
1d62bec277 add nullok support to challenge-response mode 2017-04-09 03:36:40 +02:00
Klas Lindfors
2d312da9d5
add tests for use_first_pass 2017-03-06 10:10:56 +01:00
Klas Lindfors
3c201edd83
Merge branch 'mickael9-fix-issue-117' 2017-03-06 09:37:55 +01:00
Mickaël Thomas
d048a4a6e2 Add test for LDAP entries with empty token list 2017-02-27 00:21:15 +01:00
Mickaël Thomas
fc3b1e0076 Compare OTP IDs against yubi_attr only
Currently we trust the LDAP server to only return the `yubi_attr`
attribute, yet we loop over all possible attributes when there should
only be one.

Since the bundled test LDAP server ignores the requested attributes list,
we must make sure to only match against the `yubi_attr` attibute as
opposed to "all of them".

This also fixes an issue where AUTH_NOT_FOUND was returned instead
of AUTH_NO_TOKENS when there were no values returned for `yubi_attr`
but another attribute's value was considered as a candidate token.
2017-02-27 00:21:15 +01:00
Mickaël Thomas
7b6aad719a Return early if the user has no authorized tokens
Currently, if a user has no associated tokens, we still prompt for an
OTP challenge and attempt to verify it.

This adds a check earlier to avoid the useless prompt in that case.

The `nullok` option is also added. It changes the return value from
PAM_USER_UNKNOWN to PAM_IGNORE. (fixes #97)

Finally, some constants have been turned to symbolic form for clarity
and debugging output is improved.
2017-02-27 00:21:07 +01:00
Mickaël Thomas
0ce0e63d26 Perform OTP validation only if token is authorized
When using `try_first_pass` or `use_first_pass`, the password we inherit
from PAM might not actually be an OTP challenge.

Currently, we happily leak it to the validation server without first
checking if it matches an authorized token ID.

This postpones sending the actual request until we know the token ID is
authorized.
2017-02-26 21:32:24 +01:00
Klas Lindfors
f3fc6e4c1a
Merge branch 'thomaspatzke-patch-1' 2017-02-23 12:18:33 +01:00
Thomas Patzke
0d61b263ca Security: Storage of challenges in path with restricted permissions
The previous instructions create a global word-writeable path for challenge files. This is a security issue because all users and unprivileged processes can create challenge files for arbitrary users. This enables an attacker to bypass the second factor for authentication.
2017-02-23 09:01:27 +01:00
Klas Lindfors
80b7bff40a
doc: fix typo 2017-01-03 09:06:45 +01:00
Klas Lindfors
b12ce0d1b2
more stuff to make a2x work properly on mac for tests 2016-11-25 13:02:41 +01:00
Klas Lindfors
1290aa3b62
install docbook-xsl on mac for tests
will hopefully make the tests run smoother
2016-11-25 11:08:49 +01:00
Klas Lindfors
8ffbec5360
bump versions 2016-11-25 10:18:57 +01:00
Klas Lindfors
2e0ca8acf1
NEWS for 2.24 2.24 2016-11-25 10:15:20 +01:00
Klas Lindfors
afb575a092
drop reference to dead google groups
fixes #106
2016-09-08 10:38:24 +02:00
Simon Josefsson
02e520c906
Fix typo. 2016-08-09 09:34:47 +02:00
Klas Lindfors
174b09e298 let debug_accept stdout. also check that file exists and is regular 2016-06-22 10:19:53 +02:00
Klas Lindfors
8850659b5f Merge branch 'debug_refactor' 2016-06-16 13:17:10 +02:00
Klas Lindfors
ebe6633425 Merge branch 'master' of github.com:Yubico/yubico-pam 2016-06-16 13:16:15 +02:00