Commit graph

829 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
a84262fbf9 libpam, not libfetch
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@29 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-04 16:36:07 +00:00
Dag-Erling Smørgrav
15339e69e4 The dangers of cut'n'paste...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@28 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-04 16:35:32 +00:00
Dag-Erling Smørgrav
6bb82f9ffb Man page stubs.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@27 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-04 16:22:10 +00:00
Dag-Erling Smørgrav
5455407b97 Perl script I used to generate man page stubs.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@26 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-04 16:21:36 +00:00
Dag-Erling Smørgrav
2e2a611647 Store options, and pass them to modules.
Replace the "dispatching" flag with a pam_chain_t pointer.  It is set
to point at the currently executing module right before calling the
module, and cleared right after the module returns.  Note that this
isn't intended to prevent reentrancy in multi-threaded applications,
but simply to prevent modules from using the application interface.

When recursion is detected, return PAM_ABORT rather than
PAM_SYSTEM_ERR, since this is a programmatical error rather than
a runtime one.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@25 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-04 15:00:16 +00:00
Dag-Erling Smørgrav
073edc1836 Circumvent constness issues. OpenPAM is now WARNS4-clean.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@24 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-04 14:53:46 +00:00
Dag-Erling Smørgrav
560591adc6 Remove trailing commas from enum lists.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@23 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-04 14:01:26 +00:00
Dag-Erling Smørgrav
93f3359d7a Add the file I forgot in #6131.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@22 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-02 18:38:02 +00:00
Dag-Erling Smørgrav
292bd9156a Move linker-related code out into a separate file so it'll be easier
to restructure it later on.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@21 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-02 18:37:08 +00:00
Dag-Erling Smørgrav
46638aa621 Add a flag to struct pam_handle that openpam_dispatch() uses to
detect and prevent indirect recursion.
Fail immediately if the requested chain is empty.
If a module couldn't be loaded, or doesn't provide the requested
service, treat it as a normal failure instead of terminating the
chain.  (Solaris actually ignores this condition!)

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@20 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-02 18:22:20 +00:00
Dag-Erling Smørgrav
99d01aea5e Use 'sizeof(foo)' instead of 'sizeof foo' even where it's not
required.  Although style(9) doesn't say anything about it, this
seems to be the preferred form.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@19 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-02 18:04:31 +00:00
Dag-Erling Smørgrav
a980e1d3da Clear module data.
Clear environment.
Use pam_set_item() rather than free() to clear items so they get
properly clobbered.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@18 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-02 17:58:58 +00:00
Dag-Erling Smørgrav
298b19ac93 Clobber items before freeing them.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@17 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-02 17:47:36 +00:00
Dag-Erling Smørgrav
2a23af0e82 Whitespace cleanup + keyword expansion sweep.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@16 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 22:20:07 +00:00
Dag-Erling Smørgrav
4c413f4604 Add a sample application.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@15 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 22:09:36 +00:00
Dag-Erling Smørgrav
e106ecde0b Add two sample modules.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@14 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 21:52:02 +00:00
Dag-Erling Smørgrav
236a7d8507 Rename openpam_log() to _openpam_log(), add an argument for the
function name, and wrap it in a macro called openpam_log().

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@13 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 21:35:31 +00:00
Dag-Erling Smørgrav
8c50f570da It turns out dlerror() already includes the module's full path
in the error message.  Avoid logging it twice.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@12 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 21:33:58 +00:00
Dag-Erling Smørgrav
ed8e188f27 Belatedly add openpam_findenv.c to the Makefile, and add a missing
#include that I hadn't spotted since it wasn't getting compiled.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@11 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 21:19:32 +00:00
Dag-Erling Smørgrav
d57c2aa6ec Rename openpam.h to openpam_impl.h to avoid confusion with
<security/openpam.h>.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@10 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 20:49:12 +00:00
Dag-Erling Smørgrav
fbb6651eb0 Add openpam_ttyconv(), a simple tty-based conversation function.
Prototype it in the new <security/openpam.h> header.  Move the
prototype for openpam_log() there too (as well as the log level
constants) so modules and applications can use it if they want to.
Have lib/openpam.h include <security/openpam.h>.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@9 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 20:41:47 +00:00
Dag-Erling Smørgrav
42b796c71c Add non-standard extensions: pam_error(3), pam_get_authtok(3),
pam_info(3), pam_prompt(3).

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@8 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 20:36:30 +00:00
Dag-Erling Smørgrav
51805b83a7 Add two more errata.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@7 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 20:24:14 +00:00
Dag-Erling Smørgrav
6896492a66 Change "invalid" to "unexpected", since we don't actually croak from
this error.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@6 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 20:18:49 +00:00
Dag-Erling Smørgrav
192f4cbfc4 Implement pam_get_user(3).
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@5 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 20:15:51 +00:00
Dag-Erling Smørgrav
e31097d63e On second thought, make that PAM_AUTHTOK_PROMPT.
Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@4 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 20:05:20 +00:00
Dag-Erling Smørgrav
c6c0a2864f Add non-standard PAM_PASSWD_PROMPT constant to mirror
PAM_USER_PROMPT.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@3 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 19:43:56 +00:00
Dag-Erling Smørgrav
9b64962713 Convert preprocessor constants to anonymous enums.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@2 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 18:26:05 +00:00
Dag-Erling Smørgrav
5d027b0909 Import OpenPAM.
The basics (pam_start(), pam_end(), pam_strerror(), item-,
data- and environment-related functions and the six PAM
primitives) are implemented.  A stub is provided for
pam_get_user(), which is not yet implemented.  Stubs are also
provided for XSSO mapping and secondary authentication, though
they are not built and will probably not be implemented for
quite some time.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@1 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2002-02-01 17:16:12 +00:00