Commit graph

836 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
a967883b9c In openpam_ttyconv(3), wait to print the prompt until after we're ready
to accept input.  Otherwise, there is a small but non-zero chance that
input provided after the prompt appears is discarded when we flush the
tty buffer.

Submitted by:	Brooks Davis <brooks@freebsd.org>


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@948 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2020-11-19 05:41:15 +00:00
Dag-Erling Smørgrav
e0e3406a78 Enable FALLBACK_TO_OTHER since we don't use (or need) a policy.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@946 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-22 12:38:53 +00:00
Dag-Erling Smørgrav
6bf8cb1753 Prepare to release Tabebuia on Sunday.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@945 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-22 09:52:46 +00:00
Dag-Erling Smørgrav
bb68996306 Bump copyright years.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@944 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-22 09:49:12 +00:00
Dag-Erling Smørgrav
9bdf428c5a Fix an off-by-one bug in pam_getenv() which was inadvertantly
introduced when pam_getenv() was (needlessly) rewritten as part of
r913.  Rewrite pam_getenv() again (but correctly, this time) to reduce
the number of times we iterate over the same string.  Add a few unit
tests for pam_{get,put,set}env(), including one which would have
caught the bug.

Credit goes to Tim Creech <tcreech@tcreech.com> for discovering and
reporting the bug.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@943 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-20 13:23:51 +00:00
Dag-Erling Smørgrav
1dce53245b r940 relied on Cryb's own autoconf macros, which obviously aren't available unless Cryb itself is available, which is precisely what we're trying to figure out. Use plain pkg-config instead, as intended.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@942 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-20 13:19:01 +00:00
Dag-Erling Smørgrav
251dac8e4a We haven't needed libcrypto since the OATH code was removed.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@941 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-20 13:15:54 +00:00
Dag-Erling Smørgrav
a501f2af85 Use pkg-config / pkgconf to locate libcryb-test.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@940 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-20 12:21:40 +00:00
Dag-Erling Smørgrav
9cd25f7e7d Switch from $Id$ to $OpenPAM$.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@938 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-30 21:34:42 +00:00
Dag-Erling Smørgrav
d061313188 Markip nit
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@937 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-30 21:25:34 +00:00
Dag-Erling Smørgrav
eefae6d5ef Rename release to Residacea.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@936 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-30 21:14:17 +00:00
Dag-Erling Smørgrav
919a1250d4 Bump copyright year.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@935 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 21:04:10 +00:00
Dag-Erling Smørgrav
ddb34ad671 Prepare to release OpenPAM Reboulia on Sunday.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@934 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 20:53:18 +00:00
Dag-Erling Smørgrav
4876ee459d Add PAM_BAD_FEATURE and PAM_BAD_CONSTANT.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@933 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 20:43:55 +00:00
Dag-Erling Smørgrav
105d392c57 Add two more error codes for situations where we used PAM_SYMBOL_ERR.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@932 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 20:41:59 +00:00
Dag-Erling Smørgrav
29c7f93598 Introduce an array of error strings and use it wherever applicable.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@931 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 19:23:50 +00:00
Dag-Erling Smørgrav
0f7f351a10 Remove the NONNULL annotation since we reintroduced the NULL check.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@930 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 19:22:57 +00:00
Dag-Erling Smørgrav
c87aee7c52 Add the new error codes and rewrite the error code handling to support
negated entries, e.g. in cases a() calls b() and b() can return code X
in certain situations, but a() ensures that this never happens.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@929 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 19:21:54 +00:00
Dag-Erling Smørgrav
07daaf4bb2 r927 should have said: introduce new error codes for situations where we
have long used the wrong ones because neither XSSO not Solaris defined
codes that fit the situation.  Also, the definition was missing.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@928 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 19:19:52 +00:00
Dag-Erling Smørgrav
3ebfd11150 Use the correct error code in some of the places where we have long used
the wrong one.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@927 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 19:15:30 +00:00
Dag-Erling Smørgrav
e7f32a97b0 Adapt to newer versions of the Cryb test framework.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@926 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-03-23 13:42:56 +00:00
Dag-Erling Smørgrav
812256e9d1 Add missing #include.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@925 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-23 08:03:22 +00:00
Dag-Erling Smørgrav
25bcbd2652 Prepare to release OpenPAM Radula.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@923 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-19 19:31:16 +00:00
Dag-Erling Smørgrav
a823b423ca Switch to using the cryb.to project's test framework.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@922 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-19 19:28:30 +00:00
Dag-Erling Smørgrav
890bea99e0 Update.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@921 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-19 18:10:30 +00:00
Dag-Erling Smørgrav
05afeb7a29 Document r918.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@920 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-19 18:06:43 +00:00
Dag-Erling Smørgrav
f5a12fb24e Update the release notes to reflect that code flows from OpenPAM to
FreeBSD rather than the reverse.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@919 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-19 18:06:08 +00:00
Dag-Erling Smørgrav
d9e44d146f Fix a bug that prevented the service name from being freed, thus
leaking a small amount of memory for every PAM session.

While there, eliminate an unnecessary variable.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@918 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-19 17:46:22 +00:00
Dag-Erling Smørgrav
2f340d61b5 Add a pair of scripts to facilitate running Bullseye Coverage and Coverity
Scan on the codebase.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@917 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-18 14:45:27 +00:00
Dag-Erling Smørgrav
82935b7d7a Downgrade the "unexpected EOF" message from ERROR to DEBUG.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@916 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-07 12:25:58 +00:00
Dag-Erling Smørgrav
1e09705bd7 Fix FREEV() when v is NULL.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@915 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-07 12:03:19 +00:00
Dag-Erling Smørgrav
c5a320988e In pam_*env(3), set errno as the corresponding POSIX functions would.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@914 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-21 15:15:29 +00:00
Dag-Erling Smørgrav
e936857588 Newer versions of clang take __nonnull__ annotations into account not only
when compiling code that calls the function, but also when compiling the
function itself.  This means that NULL checks in the function trigger
condition-always-false warnings.  We have a choice between disabling these
warnings, removing the __nonnull__ annotations, or removing the NULL checks.
We prefer to keep the annotations and warnings and remove the checks.  In
all cases, passing NULL to the function in question will result in a
segmentation fault, which is often easier to debug than an error return,
especially when most of these checks were for the PAM handle, which can only
be NULL if the caller ignored an error return from pam_start().


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@913 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-21 15:11:12 +00:00
Dag-Erling Smørgrav
a18c87672e Postpone Radula until next Saturday.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@912 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-21 14:48:30 +00:00
Dag-Erling Smørgrav
23cdf95099 Correct markup for email addresses.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@910 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-21 12:22:08 +00:00
Dag-Erling Smørgrav
3112c53799 Remove experimental code that was accidentally committed in r908
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@909 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-20 08:13:20 +00:00
Dag-Erling Smørgrav
adb7175c42 Prepare for releasing Radula on Saturday.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@908 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-18 10:11:57 +00:00
Dag-Erling Smørgrav
c75883564d Move OATH development to a branch. OATH will soon disappear entirely
from this repository as Cryb takes over.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@907 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-18 09:39:01 +00:00
Dag-Erling Smørgrav
3699596d18 Correctly compare the return value from pam_get_item() to PAM_SUCCESS
instead of assuming (incorrectly) that it returns non-zero on success.
Bump dates as needed.

Reported by:	Patrick Bihan-Faou <patrick-fbsd@mindstep.com>


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@902 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-17 14:57:09 +00:00
Dag-Erling Smørgrav
da26321ba8 Spell the GCC pragmas correctly.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@891 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-09-19 10:04:25 +00:00
Dag-Erling Smørgrav
26fbccde77 Bump dates if required on files modified in 2014 or later.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@890 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-11 16:22:09 +00:00
Dag-Erling Smørgrav
b6605f9267 Add University of Oslo copyright and bump dates.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@889 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-11 16:21:28 +00:00
Dag-Erling Smørgrav
aa6768d765 Fix props
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@888 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-11 16:19:57 +00:00
Dag-Erling Smørgrav
c371da364c Note that the secret should also be percent-encoded.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@887 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-11 14:09:30 +00:00
Dag-Erling Smørgrav
4a77e993a9 Fix parsing of percent-encoded URIs.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@886 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-11 14:07:54 +00:00
Dag-Erling Smørgrav
d040ae3d29 Add a man page for pam_oath(8) which I've had lying around for years.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@885 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-11 13:45:17 +00:00
Dag-Erling Smørgrav
b1895baa2d Don't forget to generate the Makefile for pam_return(8).
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@884 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-11 13:44:33 +00:00
Dag-Erling Smørgrav
ddfa63ca38 Disable coverage analysis of tests and test infrastructure.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@883 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-09 18:42:28 +00:00
Dag-Erling Smørgrav
41a50e0c57 Set an upper limit to the number of codes generated by the calc command.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@882 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-09 18:41:46 +00:00
Dag-Erling Smørgrav
9ff1a454ce Fix off-by-one bug: we forgot to account for the terminating NUL when
checking the length of the label.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@881 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-09 18:29:32 +00:00