Commit Graph

28 Commits

Author SHA1 Message Date
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 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 ac54af0d69 Add configure options to build as much as possible using the system
libpam and / or liboath.  Doing so disables building the corresponding
library and its documentation, but still builts the corresponding tools
and modules and runs the unit tests.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@834 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-10-28 10:25:58 +00:00
Dag-Erling Smørgrav a9a5497d3f Reorganize:
- move libpam into lib/libpam
 - move the OATH code into lib/liboath
 - move oath.h into include/security
 - update all pointers


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@646 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-05 17:49:06 +00:00
Dag-Erling Smørgrav f70250359e Use AM_CPPFLAGS instead of INCLUDES.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@620 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-02-24 18:51:10 +00:00
Dag-Erling Smørgrav 2b555bb3d3 Move our strlcat() and strlcpy() implementations into .c files.
Add asprintf() and vasprintf() for systems that don't have it.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@616 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-08-07 15:18:16 +00:00
Dag-Erling Smørgrav 709f28793c Forgot to include openpam_cred.h in distribution.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@615 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-08-07 14:33:39 +00:00
Dag-Erling Smørgrav be8d8c6c7b Don't forget to distribute openpam_features.h.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@602 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-15 17:31:15 +00:00
Dag-Erling Smørgrav 312b5753a5 Add an experimental mechanism for enabling / disabling optional features.
Use it to control policy and module file checks.  The default settings
correspond to the current behavior: disallow path separators in policy
names, but allow them in module names; verify ownership and permissions
for both policy files and modules.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@594 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-14 14:18:41 +00:00
Dag-Erling Smørgrav 03ef7cd64d include openpam_ctype.h in distribution
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@570 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-05 15:32:53 +00:00
Dag-Erling Smørgrav 31950458f5 Add strlcat() for non-BSD systems.
strlcpy() needs to be static.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@554 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-02 09:46:48 +00:00
Dag-Erling Smørgrav 96357f3c52 Add an openpam_straddch() function that appends a character to a
string, reallocating the string if necessary.

Add an openpam_readword() function that reads a single word from a
file according to the usual shell quoting rules.

Add an openpam_readlinev() function that uses openpam_readword() to
read an entire line and return a list of the words it contained.

Rewrite openpam_parse_chain() using openpam_readlinev(), which greatly
simplifies the code and ensures correct parsing of module option.

Thanks to Maëlle Lesage for pointing out the issue and writing an
early version of what became the main loop in openpam_readword().


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@547 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-01 15:01:21 +00:00
Dag-Erling Smørgrav 42651f8d9b Add an internal function for appending a character to a dynamically
allocated string, expanding the string if necessary.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@528 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-02-26 03:34:46 +00:00
Dag-Erling Smørgrav 1a4edb80d7 Factor out and improve the module ownership / permission check, and add
a similar (but race-proof) check for the policy file.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@499 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-22 11:51:50 +00:00
Dag-Erling Smørgrav 6a92548403 Reorganize the headers and centralize the string tables.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@491 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-12 00:12:32 +00:00
Dag-Erling Smørgrav ff73a20a84 Add a strlcpy(3) implementation.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@490 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-11 03:04:46 +00:00
Dag-Erling Smørgrav 9b234e1f88 Provide strlcmp(3) internally on systems that don't already have it.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@475 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 15:29:24 +00:00
Dag-Erling Smørgrav 956ef0df60 If a module directory was specified on the configure command line, the
OPENPAM_MODULES_DIR macro was defined in config.h in addition to
CFLAGS.  Place OPENPAM_MODULES_DIR unconditionally in config.h and
remove it from CFLAGS.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@462 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 15:04:31 +00:00
Dag-Erling Smørgrav 81b5c45be2 Add a new API function, openpam_subst(3), which replaces substitution
codes in a string with the values of selected PAM items.  Use it for
prompts.

Furthermore, modify pam_get_user(3) and pam_get_authtok(3) to look for
module options named {user,authtok,oldauthtok}_prompt, as appropriate.
If found, these options take precedence over both the caller's prompt
and the PAM_{USER,AUTHTOK,OLDAUTHTOK}_PROMPT items.  The usefulness of
these options is somewhat limited by the fact that the policy file
parser does not support quoted strings; that's next on the todo list.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@455 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-29 18:31:11 +00:00
Dag-Erling Smørgrav 2a4b841f25 -lfoo goes in LIBADD, not LDFLAGS.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@429 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2010-03-09 17:51:29 +00:00
Dag-Erling Smørgrav 119471eac7 Fix some bugs in the build system, and make 'make dist' work as expected.
Also add some configure options for developer use.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@395 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2007-06-03 20:26:18 +00:00
Dag-Erling Smørgrav 57aa7fdfae Make sure automake knows about all the files we want to include in a dist.
Submitted by:	Daniel Richard G. <skunk@iskunk.org>


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@391 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2006-07-09 04:38:53 +00:00
Dag-Erling Smørgrav ce5921ba4c Convert $P4$ tags to $Id$.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@320 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2006-02-16 20:33:19 +00:00
Dag-Erling Smørgrav a6ea311d45 Make sure OPENPAM_MODULES_DIR has a trailing slash.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@311 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2005-06-10 18:51:37 +00:00
Dag-Erling Smørgrav 9787583d8d If the module path is relative, prepend the module installation
directory which was specified at configure time.

Inspired by:	NetBSD


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@308 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2005-06-09 21:32:00 +00:00
Dag-Erling Smørgrav cc2b3e94a9 Whitespace nits.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@294 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2005-01-31 15:32:02 +00:00
Dag-Erling Smørgrav 9d0dd0c39b Add openpam_free_envlist(). I'm tired of freeing them by hand.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@289 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2005-01-28 14:47:41 +00:00
Dag-Erling Smørgrav 5de0bf6bae Autoconfuse.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@251 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2003-06-09 01:29:37 +00:00