Commit graph

202 commits

Author SHA1 Message Date
Sergey Poznyakoff
d953e91e23 Version 1.9
* NEWS: Update version number.
* configure.ac: Likewise.
* doc/pam_ldaphome.8in: Reorder configuration statements.
* pamck/pamck.c: Update copyright years.
2014-05-21 23:01:50 +03:00
Sergey Poznyakoff
3e9c3f3c3b Fix docs.
* doc/Makefile.am (check-ldaphome-config): Take into account
gray_env_get_bool (see 7636fa3e).
* doc/pam-modules.texi: Update; final check.
* NEWS: Update.
2014-05-21 13:21:04 +03:00
Sergey Poznyakoff
66dcf254f5 Remove deprecated use of INCLUDES from Makefiles.
* Make.rules: Use AM_CPPFLAGS instead of INCLUDES.
* Makefile.am (SUBDIRS): Add examples.
(dist-hook): Remove.
* configure.ac: Build examples/Makefile.
* examples/Makefile.am: New file.
* pam_fshadow/Makefile.am: Include Make.rules on top.
Use += to set AM_CPPFLAGS
* pam_groupmember/Makefile.am: Likewise.
* pam_ldaphome/Makefile.am: Likewise.
* pam_log/Makefile.am: Likewise.
* pam_regex/Makefile.am: Likewise.
* pam_sql/Makefile.am: Likewise.
* pam_umotd/Makefile.am: Likewise.
2014-05-21 12:48:53 +03:00
Sergey Poznyakoff
4edfb36f05 Document the use of ldappubkey 2014-05-21 12:22:05 +03:00
Sergey Poznyakoff
f664b904fd pam_ldaphome: don't run initrc program if the home dir already exists.
* pam_ldaphome/pam_ldaphome.c (create_exists): New return code.
(create_home_dir): Return create_exists if the directory already
exists.
(ldaphome_main): Run initrc only after creating the home dir.
2014-05-20 14:38:37 +03:00
Sergey Poznyakoff
37e557be7b Version 1.8.93 2014-05-20 11:27:36 +03:00
Sergey Poznyakoff
7636fa3e7b New utility "ldappubkey".
* NEWS: Document new features.
* doc/pam-modules.texi: Document usergitconfig.
* doc/pam_ldaphome.8in: Update.
* examples/ldappubkey: New file.
* examples/usergitconfig: Refer to perldoc on error.
* lib/env.c (gray_env_get_bool): New function.
* lib/graypam.h (gray_env_get_bool): New proto.
* pam_ldaphome/pam_ldaphome.c (import_public_key): Do nothing if
"import-public-keys" is set to "no".
(pam_sm_authenticate): New function.
2014-05-19 14:01:21 +03:00
Sergey Poznyakoff
867eaccec7 Allow to modify environment of initrc-command
* pam_ldaphome/pam_ldaphome.c (find_env,locate_unset)
(env_concat,parsenv,env_setup): New statics.
(run_prog): Use execve and env_setup to set up the
environment.

* doc/pam-modules.texi: Document new statements.
* doc/pam_ldaphome.8in: Likewise.
2014-05-11 11:20:58 +03:00
Sergey Poznyakoff
e1aa833138 Minor fix
* examples/usergitconfig: Use bindpw attribute.
2014-05-11 09:07:34 +03:00
Sergey Poznyakoff
ebda1d26ab pam_ldaphome: optionally run external program after populating home directory.
This allows for dynamic modifications of the initial directory contents,
depending on the login name of the user.  The name of the external program
is given with the initrc-command configuration statement.  It is invoked
with the single argument, specifying the login name.  The standard input
is closed, standard output is diverted to standard error.  Standard error
can be diverted to a file using the initrc-log statement.

* Makefile.am (EXTRA_DIST): Add examples.
* examples/usergitconfig: New file.
* pam_ldaphome/pam_ldaphome.c (run_prog, run_initrc): New statics.
(pam_sm_authenticate): Call run_initrc prior to calling
import_public_key.
2014-05-10 22:58:46 +03:00
Sergey Poznyakoff
0c37dfded3 New module: pam_groupmember
* Makefile.am: Add pam_groupmember.
* configure.ac: Likewise.
* NEWS: Update.

* pam_groupmember/Makefile.am: New file.
* pam_groupmember/pam_groupmember.c: New file,

* doc/Makefile.am: Add pam_groupmember.8
* doc/pam-modules.texi: Document pam_groupmember
* doc/pam_groupmember.8: New file.

* lib/graypam.h (gray_calloc, gray_strdup): New protos.
* lib/mem.c (gray_calloc, gray_strdup): New functions.
2014-05-06 17:24:58 +03:00
Sergey Poznyakoff
43427d5140 Escape dashes in pam_ldaphome.8in 2014-04-04 18:02:07 +03:00
Sergey Poznyakoff
3854602031 Add pam_ldaphome(8) manpage. 2014-04-04 17:34:38 +03:00
Sergey Poznyakoff
ced163f408 Fix pam-modules.texi 2014-04-02 11:59:48 +03:00
Sergey Poznyakoff
8a97e7a877 Add manpages; remove invariant sections from pam-modules.texi 2014-04-02 11:54:35 +03:00
Sergey Poznyakoff
55b38f5e11 Fix docs, raise version number to get in synch with the ftp. 2014-03-28 00:21:04 +02:00
Sergey Poznyakoff
742795c4b6 Bugfix.
* lib/transform.c (gray_free_transform_expr): Fix the loop.
2014-03-28 00:12:26 +02:00
Sergey Poznyakoff
db866c50c4 Update copyright years, set version 1.7.92 2014-02-11 15:06:09 +02:00
Sergey Poznyakoff
2e14f21631 pam_ldaphome: control where home directories can be created
* pam_ldaphome/pam_ldaphome.c (create_interdir): Fail if unable to chown,
(store_pubkeys): Log error if fchown or ftruncate fails.
(dir_in_path): New static function.
(create_home_dir): Return enum create_status.
If allow-home-dir statement is present, create directory only if
it is located in one of the directories listed in it, otherwise
return create_skip.
(pam_sm_authenticate): Import keys only if home dir exists.
* doc/pam-modules.texi: Document allow-home-dir.
2014-02-11 15:00:48 +02:00
Sergey Poznyakoff
99ed51a2da Bugfixes.
* configure.ac: Do not call PM_ENABLE within a conditional.
* pam_ldaphome/pam_ldaphome.c (import_public_key): Exit
gracefully if keys == NULL.
2013-04-16 22:04:40 +03:00
Sergey Poznyakoff
b8a5067f0c Make pam_fshadow reentrant.
* pam_fshadow/pam_fshadow.c (_pam_parse): Initialize global
variables, in case pam_fshadow is called twice in the same
stack. Do not register rexp in pam data, this hurts
reentrability.
(pam_sm_authenticate): Free rexp.
2012-12-08 16:59:13 +02:00
Sergey Poznyakoff
d211d9ec0c Improve pam_ldaphome
New keywords: bindpwfile and keyfile-mode.

* doc/pam-modules.texi: Document bindpwfile and keyfile-mode.
* pam_ldaphome/pam_ldaphome.c (ldap_bind): Read password from
file, if bindpwfile is given.
(store_pubkeys): Optionally enforce file mode, given by the
keyfile-mode configuration statement.
* pamck/pamck.c (main): Fix a typo.
2012-08-01 21:14:22 +03:00
Sergey Poznyakoff
f6cde78d98 Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/pam-modules 2012-07-30 16:46:53 +03:00
Sergey Poznyakoff
6b775d2404 Upgrade imprimatur. 2012-07-15 17:15:19 +03:00
Sergey Poznyakoff
fdc752a6e3 Version 1.7.91 2012-07-05 11:30:38 +03:00
Sergey Poznyakoff
b1206d5485 Document pam_umotd. 2012-07-05 11:29:37 +03:00
Sergey Poznyakoff
9378a8cc63 pam_umotd: control the LA value.
* pam_umotd/pam_umotd.c: New option max-la.
(pam_sm_open_session): Return PAM_IGNORE if the 5 minute LA
is greater than the max-la value.
2012-07-05 10:49:20 +03:00
Sergey Poznyakoff
cdeaa45ab3 Fix the congfigure script.
* acinclude.m4 (PM_ENABLE): Revamp. Change meaning of the second argument.
* configure.ac: Reflect the above change.
* pam_umotd/pam_umotd.c: Remove unused includes.
2012-07-04 23:20:58 +03:00
Sergey Poznyakoff
3da6891d13 Bugfixes.
* acinclude.m4 (PM_ENABLE): Don't test $build_$1 variable
before its initialization.
* pam_umotd/pam_umotd.c: Remove unnecessary includes.
(exec_file): Argv is not const.
(pam_sm_open_session): PAM does not guarantee that
argv[] is null-terminated. Create a null-terminated copy
for use by exec_file.
2012-07-04 19:06:13 +03:00
Sergey Poznyakoff
3ef9904a22 Bugfixes.
* pam_umotd/pam_umotd.c (logfile_name): Static.
(max_output_size): New variable.
(pam_opt): New option max-size.
(read_fd): Limit output size.
(exec_file): Likewise.
2012-07-04 16:10:10 +03:00
Sergey Poznyakoff
dc43cd8ee7 Update copyright years. 2012-07-04 13:10:06 +03:00
Sergey Poznyakoff
cc64dd9eaf Add pam_umotd module.
* Makefile.am [PAM_COND_UMOTD] (UMOTD_DIR): New variable.
(SUBDIRS): Add $(UMOTD_DIR).
* configure.ac: Check for security/pam_ext.h.
Add pam_umotd module.
* lib/graypam.h (pam_opt_type)<pam_opt_rest>: New type.
* lib/parseopt.c (gray_parseopt): Upon encoutnering pam_opt_rest parameter,
stop further processing and return the index of the next argument.
* pam_umotd/Makefile.am: New file.
* pam_umotd/pam_umotd.c: New file.
2012-07-04 13:01:18 +03:00
Sergey Poznyakoff
affd4768a7 Bugfixes.
* configure.ac: Version 1.7.90.
* NEWS: Update.
* doc/Makefile.am (EXTRA_DIST): Remove leftover files.
* pam_ldaphome/pam_ldaphome.c (ldap_connect): Set LDAP version
before enforcing TLS.
2012-05-23 16:10:11 +03:00
Sergey Poznyakoff
29916f8fc7 Enable fine-grained control over TLS.
* doc/pam-modules.texi: Document new tls values.
* pam_ldaphome/pam_ldaphome.c (ldap_connect): The tls
keyword is tri-state.  Allowed values are: "yes", "no"
and "only".
2012-05-18 18:22:52 +03:00
Sergey Poznyakoff
8c3fca619b Improve the docs.
* doc/Makefile.am (check-all-options): Check ldaphome options.
(check-ldaphome-config): New rule.
(check-options): Add check-ldaphome-config.
* doc/pam-modules.texi: Add missing documentation.
2012-05-18 17:48:21 +03:00
Sergey Poznyakoff
b47a46aefd Improve configuration for pam_ldaphome.
* doc/pam-modules.texi: Document new configuration keywords.
* pam_ldaphome/pam_ldaphome.c (get_intval): Take additional
"base" argument. Return 1 if the requested keyword is not
present in the database, -1 on error and 0 on success.
(ldap_connect): Consult the "ldap-version" configuration
variable for the LDAP version to use.
(create_home_dir): Read mode for the home directory from
the configuration variable "home-dir-mode".
2012-05-18 17:26:38 +03:00
Sergey Poznyakoff
a9f0d4e5bd Document pam-modules.texi 2012-05-17 09:22:58 +03:00
Sergey Poznyakoff
58d86b04e6 Minor improvements.
* pam_ldaphome/pam_ldaphome.c (get_ldap_attrs): restore pubkey
debug output.
(pam_sm_authenticate): New keyword "authorized_keys"
2012-05-16 00:14:56 +03:00
Sergey Poznyakoff
e9aabc7e71 Improve handling of multiple keys.
* pam_ldaphome/pam_ldaphome.c (get_ldap_attrs): return array of values.
(store_pubkeys): Fix key comparison.
2012-05-15 23:00:51 +03:00
Sergey Poznyakoff
8a9a1ee295 Allow for multiple authorized keys.
* pam_ldaphome/pam_ldaphome.c (argcvz_free,trimnl): New functions.
(get_ldap_attr): Trim trailing newlines from the return value.
(ldap_search): Rename to get_pubkeys. Return null-terminated array
of sorted lexicographically keys.
(store_pubkey): Rename to store_pubkeys, take char ** as its
first argument. Store all keys unless the file already contains
exactly that set of keys.
(import_public_key): Call store_pubkeys. Use argcvz_free to
free the keys.
2012-05-15 18:22:08 +03:00
Sergey Poznyakoff
381fbf3365 Bugfixes.
* pam_ldaphome/pam_ldaphome.c (argcv_free): Fix multiple free
(argcv_concat): Fix overly conservative size calculation and
concatenation loop.
(parse_ldap_uri): Fix URI reconstruction.
(dir_copy_loop): Remove unused variable.
(store_pubkey): Return meaningful error code.
(import_public_key): Propagate return code from store_pubkey.
(create_home_dir): Return meaningful error code.
(pam_sm_authenticate): Propagate return code from create_home_dir
and import_public_key to the caller.
* pam_log/Makefile.am: Remove BUILD_PAM_LOG substitution
(complements 1a80b647).
2012-05-15 17:23:31 +03:00
Sergey Poznyakoff
996f020583 pam_ldaphome: implement populate_homedir. 2012-05-15 08:51:53 +03:00
Sergey Poznyakoff
930096120d Initialize submodules in autogen.sh 2012-05-14 20:35:29 +03:00
Sergey Poznyakoff
6a9ed003b2 Add a placeholder for pam_ldaphome documentation. 2012-05-13 15:44:25 +03:00
Sergey Poznyakoff
00c1786bc2 Use imprimatur to maintain docs. 2012-05-13 15:31:31 +03:00
Sergey Poznyakoff
803b69beb3 Generate ChangeLog automatically from git log. 2012-05-13 14:24:12 +03:00
Sergey Poznyakoff
a86cd3c5dd Migrate to git. 2012-05-13 14:00:44 +03:00
Sergey Poznyakoff
38413200f2 Fix a typo
git-svn-id: file:///svnroot/pam-modules/trunk@119 56984be4-0537-0410-a56c-fcb268c96130
2012-05-13 09:51:21 +00:00
Sergey Poznyakoff
1a80b647d6 Revamp build system. Add pam_ldaphome module.
* configure.ac: Test for ldap.
(AC_OUTPUT): Create pam_ldaphome/Makefile.
* acinclude.m4 (PM_ENABLE): Declare PAM_COND_<item>
conditional in addition to BUILD_PAM_<item> substitution
variable.
* Makefile.am (SUBDIRS): Include most modules via
conditionally defined Makefile variables.

* lib/graypam.h (gray_env): New struct.
(gray_env_get,gray_env_free,gray_env_read)
(gray_boolean_true_p): New protos.
* lib/env.c: New file.
* lib/Makefile.am (libgraypam_la_SOURCES): Add env.c

* pam_fshadow/Makefile.am: Remove BUILD_PAM_FSHADOW
substitution.
* pam_regex/Makefile.am: Remove BUILD_PAM_REGEX
substitution.
* pam_sql/pam_sql.c (free_config, boolean_true_p)
(read_config): Remove. Use gray_env_* functions
instead. All uses updated.
* pam_regex/pam_regex.c: Fix typo.

* pam_ldaphome/Makefile.am: New file.


git-svn-id: file:///svnroot/pam-modules/trunk@118 56984be4-0537-0410-a56c-fcb268c96130
2012-05-13 09:48:57 +00:00
Sergey Poznyakoff
993eff1366 Allow installers to link modules with alternative crypt(3) implementations.
* configure.ac: New option --with-crypt-lib.
* README: Document new configuration option.



git-svn-id: file:///svnroot/pam-modules/trunk@117 56984be4-0537-0410-a56c-fcb268c96130
2011-09-29 00:31:48 +00:00