Dag-Erling Smørgrav
d9f7580763
nit
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@494 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-20 02:58:34 +00:00
Dag-Erling Smørgrav
d98f755c25
Refuse to load a module if it is owned by anyone else than root or the
...
arbitrator or it is writable by group or other.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@493 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-20 02:28:15 +00:00
Dag-Erling Smørgrav
b011e58526
dst can't be const, you idiot.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@492 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-20 02:04:17 +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
e8522c7fcc
Always create optv, even if there are no options.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@488 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-05 20:50:15 +00:00
Dag-Erling Smørgrav
c86a681052
The count was never used, so ditch it and return plain PAM error codes
...
instead.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@487 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-05 20:00:46 +00:00
Dag-Erling Smørgrav
2603985187
Document quoted option values.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@486 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 16:58:05 +00:00
Dag-Erling Smørgrav
8b3eca4161
Document quoted option values.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@485 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 16:57:37 +00:00
Dag-Erling Smørgrav
ba7de9c9c6
Remove debugging code.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@484 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 16:47:26 +00:00
Dag-Erling Smørgrav
493804d19b
Fix a couple of bugs in the option string reassembly code.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@483 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 16:46:20 +00:00
Dag-Erling Smørgrav
6835696a2a
Revert large parts of r478. I had forgotten that the module arguments
...
are actually passed to each service function in the classic (argc,
argv) form. The only place where the compiler could have caught this
used a type cast, and it did not show up in testing either because all
of the modules I tested use openpam_get_option(3) instead of
manipulating argv directly.
The cleaned-up policy parsing code remains in place, but options are
once more stored as strings, pretty much the way they appear in the
policy file, except that quotes are stripped.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@482 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 16:33:02 +00:00
Dag-Erling Smørgrav
c16faba34e
The include directive expects a service name, not a filename.
...
While there, remember to check for trailing garbage.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@481 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 16:09:22 +00:00
Dag-Erling Smørgrav
28c2e4049f
past tense
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@480 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 15:55:56 +00:00
Dag-Erling Smørgrav
b373991f87
namespace violation mumble mumble
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@479 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 15:40:15 +00:00
Dag-Erling Smørgrav
55f6a50684
Major overhaul of the policy parser to support quoted option values. As a
...
bonus, it should now be much easier to read and understand.
This also changes the way options are stored: they are now stored as a list
of { key, value } pairs rather than "key=value" strings.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@478 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 15:39:18 +00:00
Dag-Erling Smørgrav
11b10d0991
Minor simplification.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@477 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 15:30:34 +00:00
Dag-Erling Smørgrav
d40a8fb860
"facility" is more appropriate than "function class"
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@476 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 15:30:03 +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
f229d69d05
Fix the case where match_word() matches the last word on the line. It
...
would previously return 0 because it expected the next character after
the matched word to be a space.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@474 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 10:56:10 +00:00
Dag-Erling Smørgrav
ebccc4d687
- Deduplicate the trailing-whitespace code.
...
- Don't treat "\\\n" as whitespace. It's not what most people would
expect, and the documentation doesn't mention it.
- Improve the documentation a bit now that gendoc.pl supports bullet
lists.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@473 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 10:48:25 +00:00
Dag-Erling Smørgrav
c20b753856
Remove commented-out code
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@472 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 09:46:52 +00:00
Dag-Erling Smørgrav
94ca0f4d08
Expand $Id$
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@471 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-03 09:44:40 +00:00
Dag-Erling Smørgrav
f0280932cb
Rewrap
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@470 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 23:44:05 +00:00
Dag-Erling Smørgrav
a3fc39b15b
Mention pamtest(1).
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@469 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 23:43:54 +00:00
Dag-Erling Smørgrav
e6545c355d
Build pamtest.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@468 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 23:42:51 +00:00
Dag-Erling Smørgrav
e53b12a47e
Add a tool for testing modules and policies.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@467 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 23:42:21 +00:00
Dag-Erling Smørgrav
dd2c21f7b6
Mention that the service function is called twice.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@466 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 23:33:43 +00:00
Dag-Erling Smørgrav
eed493316e
Add support for bullet lists.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@465 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 20:34:26 +00:00
Dag-Erling Smørgrav
85ca38e143
ignore openpam_subst.3
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@464 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 20:00:31 +00:00
Dag-Erling Smørgrav
fa542b0736
Add a trailing slash if the user forgot it.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@463 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 16:17:40 +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
a1be39bf2d
Fix namespace violations in local variables used to prevent double
...
evaluation in macros.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@461 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 14:00:38 +00:00
Dag-Erling Smørgrav
0eae3f21c1
Fix namespace violations in some symbols which have external linkage but
...
are not part of the API.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@460 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 13:56:03 +00:00
Dag-Erling Smørgrav
8799ff11b9
Eliminate a potential double evaluation in one of the tracing macros.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@459 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 13:50:56 +00:00
Dag-Erling Smørgrav
2d1f74e6da
Add a man page, tweak the usage string, remove useless -h option.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@458 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-11-02 13:10:25 +00:00
Dag-Erling Smørgrav
c8b7ea4e00
Alphabetical order *is* a particular order. At least if the list is
...
actually alphabetized.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@457 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-29 19:36:47 +00:00
Dag-Erling Smørgrav
49380d6d5e
Credit Nick Hibma for suggesting and testing openpam_subst(3).
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@456 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-29 18:34:04 +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
8b88ff5959
Finally retire _OPENPAM.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@454 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-29 18:31:02 +00:00
Dag-Erling Smørgrav
da5d5b1268
past tense, for real
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@453 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-29 18:14:28 +00:00
Dag-Erling Smørgrav
bb74f213ce
past tense
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@452 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-29 18:13:13 +00:00
Dag-Erling Smørgrav
a4a1255043
Tentatively set a name and approximate date for the next release.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@451 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-29 18:11:53 +00:00
Dag-Erling Smørgrav
7bc7f1a720
Recreate my long-lost release-naming script.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@450 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-29 18:10:48 +00:00
Dag-Erling Smørgrav
a381eb16c8
Revert accidental commit of experimental code.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@449 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-22 04:25:55 +00:00
Dag-Erling Smørgrav
059a8e0d08
No more .c symlinks!
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@448 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-22 02:49:20 +00:00
Dag-Erling Smørgrav
b66176bb02
This was written long after the DARPA contract ended.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@447 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-22 02:47:36 +00:00
Dag-Erling Smørgrav
54374d2c36
Use VPATH to eliminate the need for symlinks.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@446 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-22 02:46:24 +00:00
Dag-Erling Smørgrav
ebd4f02f4b
Modernize, and add support for other authors than ThinkSec.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@445 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-22 02:45:26 +00:00
Dag-Erling Smørgrav
874f75e8f4
Document that the item argument (for pam_get_item(3)) and the data
...
argument (for pam_get_data(3)) are untouched if the function fails.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@444 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2011-10-22 01:03:23 +00:00