Commit Graph

12 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 f8a727ec0c Always use openpam_straddch(3) to bootstrap the string, even if we
have nothing to add to it.  This simplifies the code and fixes a bug
introduced in r553 where the first character in the string would
always be set to '\0', instead of only when bootstrapping.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@636 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-03 23:27:35 +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 4c8082f73d Markup nits
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@588 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-08 11:52:25 +00:00
Dag-Erling Smørgrav 8c5bc6cb91 An escaped newline within a single-quoted string is a literal newline,
but within a double-quoted string, it is a line continuation.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@585 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-07 22:49:12 +00:00
Dag-Erling Smørgrav 3fdf34619c doc nit
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@579 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-06 01:06:17 +00:00
Dag-Erling Smørgrav eea3231ee1 A single space before the section title is OK.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@569 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-05 14:38:07 +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 3cba749dfe Fix backslashes within single-quoted strings (no escape function)
Fix line continuation (newline is stripped, not quoted)
Further improve the documentation


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@567 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-05 14:32:51 +00:00
Dag-Erling Smørgrav 3052dea7c0 Another bug uncovered by unit tests:
If the first character encountered is a quote, immediately allocate a
single byte.  This way, if the word we've started reading is actually
an empty quoted string ('' or ""), we correctly return an empty string
instead of NULL.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@553 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-01 21:04:44 +00:00
Dag-Erling Smørgrav 49a4c1509e Fix a bug detected by the unit tests: to ensure consistent handling of
trailing whitespace, openpam_readword() should *always* push back the
last character read (which is a no-op in the EOF case).


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@550 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2012-04-01 20:45:19 +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