Commit Graph

9 Commits

Author SHA1 Message Date
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 54d9167cea If ch == '\0', do not grow the string or advance the length counter,
but do allocate a string if there is none to begin with.  This makes
it possible to use openpam_straddch(3) to preallocate the string (if
necessary) instead of manually calling malloc(3) or calloc(3) and
initializing size and len.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@634 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-03 23:23:10 +00:00
Dag-Erling Smørgrav e15ecfaa9c I seem to have inadvertantly used a non-standard variation of the BSD
license on code I wrote after the DARPA / NAI contract ended.  Change
all occurrences to the standard license.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@619 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-02-24 14:01:42 +00:00
Dag-Erling Smørgrav 89e4f8a9e7 Fix authorship
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@568 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-05 14:35:53 +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 74c787f664 Avoid underflow if *size == 0.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@536 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-03-31 15:34:19 +00:00
Dag-Erling Smørgrav 8e881dbdd7 Fix some embarassing typos introduced in the openpam_straddch() cleanup.
Move prototype from "opempam_impl.h" to <security/openpam.h>.
Generate openpam_straddch(3) man page.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@535 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-03-31 14:55:19 +00:00
Dag-Erling Smørgrav be3bfed604 Clean up and document
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@533 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-03-31 14:25:43 +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