Commit graph

202 commits

Author SHA1 Message Date
Sergey Poznyakoff
3573fa1222 Update FSF address in copyleft headers 2024-09-04 12:31:05 +03:00
Sergey Poznyakoff
48dff4f38c Switch to newer autotools 2023-06-02 20:27:38 +03:00
Sergey Poznyakoff
a52fff3061 Avoild name clash in on ldap_connect 2023-03-11 10:53:52 +02:00
Sergey Poznyakoff
60a5639981 Version 2.5 2022-05-09 11:08:39 +03:00
Sergey Poznyakoff
b4fb52526e Bugfix 2022-05-09 11:05:08 +03:00
Sergey Poznyakoff
d5165ae303 Update NEWS and THANKS files
Build the ChangeLog file using plain git, without auxiliary awk formatter.
2022-02-04 10:18:05 +02:00
Sergey Poznyakoff
f3b7c048b8 Update copyright years 2022-02-04 09:38:17 +02:00
Sergey Poznyakoff
203524c85d pam_fshadow: new option skip-password
* pam_fshadow/pam_fshadow.c (pam_opt): New option skip-password.
(_pam_parse,verify_user_acct,verify_user_pass): Fix log messages.
(verify_user_pass): Skip password verification, if requested.
(pam_sm_authenticate): Don't try to obtain password, if skip-password
is given.
Bugfix: even if password hash is given in passwd and verified successfully,
verify the shadow file too, this time with password set to NULL, so that
the actual account status is taken into account.
* doc/pam-modules.texi: Document skip-password
* doc/pam_fshadow.8in: Likewise.
2022-02-03 18:48:41 +02:00
Mirsad Goran Todorovac
1af3541706 Bugfixes in pam_fshadow
* pam_fshadow/pam_fshadow.c (verify_user_acct): Don't leave the file
open.
(pam_sm_authenticate): If the username was changed, set the changed value
in the PAM_USER item, for eventual use by subsequent modules in stack.
2022-02-02 17:46:48 +02:00
Sergey Poznyakoff
9f0391c84b transform: fix replacement of particular pattern instance
This fixes handling of expressions like 's/s/@/2'.

* lib/transform.c (_single_transform_name_to_slist): Avoid duplicating
initial prefix if replace is not needed.
2021-08-28 10:15:09 +03:00
Sergey Poznyakoff
84d3767491 Version 2.4.1 2021-08-11 13:28:35 +03:00
Sergey Poznyakoff
13fe7d6d40 pam_mysql: optionally read MySQL default file
* doc/pam-modules.texi: Document new MySQL statements.
* pam_sql/pam_mysql.c (mysql_do_query): Use MySQL default file/group,
if specified.
(gpam_sql_verify_user_pass): Fix handling of "setenv-query".
* pam_sql/pam_pgsql.c (gpam_sql_verify_user_pass): Likewise.
* pam_sql/pam_sql.c (gpam_sql_get_query): Return PAM_AUTHINFO_UNAVAIL
if the keyword is not defined in the environment.
2021-08-11 11:13:12 +02:00
Sergey Poznyakoff
8d681979ab Fix typo 2021-07-07 21:57:48 +03:00
Sergey Poznyakoff
da41d2aec4 Update copyright years 2021-01-06 18:15:52 +02:00
Sergey Poznyakoff
1bb6687e98 Version 2.4 2020-12-30 19:10:58 +02:00
Sergey Poznyakoff
e158ebd00e Use wordsplit v1.1 2020-06-14 13:04:23 +03:00
Sergey Poznyakoff
b6c720096e Use wordsplit for keyword expansion.
* .gitmodules: Add wordsplit
* configure.ac: Likewise.
* lib/Makefile.am: Likewise.
* lib/graypam.h (gray_expand_argv): Remove.
(gray_expand_string): Change prototype.
* lib/vartab.c (gray_expand_argv): Remove.
(gray_expand_string): Rewrite using wordsplit.
* pam_ldaphome/pam_ldaphome.c (import_public_key): Assume
sshPublicKey as a default attribute.
* pam_log/pam_log.c (_pam_parse): Take two return arguments.
(echo): Use gray_expand_string.
* pam_sql/pam_mysql.c: Update gray_expand_string usage.
* pam_sql/pam_pgsql.c: Likewise.
* pam_sql/pam_sql.c: Likewise.
* pam_sql/pam_sql.h (gpam_sql_get_query): Change signature.
* pam_umotd/pam_umotd.c (pam_sm_open_session): Update
gray_expand_string usage.
2020-03-29 17:39:54 +03:00
Sergey Poznyakoff
5d4abc6e44 pam_regex: Return PAM_IGNORE if called with 'transform=' but without 'regex='
Bug spotted by Ray Morris.
2020-03-29 11:27:40 +03:00
Sergey Poznyakoff
d14f8e6c1f Minor fix
* examples/ldappubkey: Pass arguments to start_tls
2019-08-30 11:09:44 +03:00
Sergey Poznyakoff
96631a9a89 Bugfix
* lib/mem.c (gray_2nrealloc): Add missing multiplier.
2018-09-01 09:09:21 +03:00
Sergey Poznyakoff
84fcfeb07c Version 2.3.90 2018-08-16 14:22:13 +03:00
Sergey Poznyakoff
5f13fe76ab Minor changes 2018-08-16 09:32:59 +03:00
Sergey Poznyakoff
cd169165d8 Minor fix 2018-08-15 22:33:12 +03:00
Sergey Poznyakoff
7a40b7873b Major cleanup
* lib/graypam.h (gray_pam_init)
(gray_raise,gray_malloc,gray_zalloc,gray_calloc)
(gray_realloc,gray_strdup): Remove.
(gray_slist_err,gray_slist_clrerr): New functions.
(gray_slist_append,gray_slist_append_char): Return ssize_t.
(gray_slist_coalesce): Likewise.
(gray_slist_grow_backslash_num)
(gray_slist_grow_backslash): Return int.
(errno_to_pam): New function.
(gray_set_transform_expr): Return int.
* lib/mem.c (gray_raise,gray_malloc,gray_zalloc,gray_calloc)
(gray_realloc,gray_strdup): Remove.
(gray_2nrealloc): Rewrite.
* lib/base64.c: Check return from gray_slist_append_char
* lib/env.c: Check return values from gray_slist functions
* lib/ldappass.c: Likewise.
* lib/slist.c (gray_slist_bucket) <ec>: New member.
(gray_slist_err,gray_slist_clrerr): New functions.
(gray_slist_append,gray_slist_append_char): Return ssize_t.
(gray_slist_coalesce): Likewise.
(gray_slist_grow_backslash_num)
(gray_slist_grow_backslash): Return int.
* lib/transform.c: Use standard memory allocation functions.
* pam_ldaphome/pam_ldaphome.c: Likewise.
* pam_innetgr/pam_innetgr.c: Likewise.
* pam_log/pam_log.c: Likewise.
* pam_regex/pam_regex.c: Likewise.
* pam_sql/pam_mysql.c: Likewise.
* pam_sql/pam_pgsql.c: Likewise.
2018-08-15 22:22:31 +03:00
Sergey Poznyakoff
988b8e27f5 Bugfix
* pam_groupmember/pam_groupmember.c (split): Use standard memory
allocation functions. Correctly handle empty strings (demimiter
immediately followed by another delimiter.
2018-08-15 15:01:34 +03:00
Sergey Poznyakoff
082c967151 Minor fixes
* configure.ac: Don't build static libraries.
* examples/ldappubkey: Optionally authenticate via PAM`
2018-08-14 16:20:35 +03:00
Sergey Poznyakoff
23951fcddb Version 2.3.1: add missing pam_sm_setcred symbol 2018-08-13 10:49:24 +03:00
Sergey Poznyakoff
5d171e11b4 Version 2.3 2018-08-12 20:30:45 +03:00
Sergey Poznyakoff
6bba235d66 New module pam_innetgr.
* Makefile.am: Add new module.
* NEWS: Upgrade
* configure.ac: Add configuration for pam_innetgr
* pam_innetgr/Makefile.am: New file.
* pam_innetgr/pam_innetgr.c: New file.
* doc/Makefile.am: Add pam_innetgr.8
* doc/pam-modules.texi: Document pam_innetgr.
* doc/pam_innetgr.8: New file.
* examples/ldappubkey: Bugfixes
(publickeyattribute setting): Accept a list of attributes
(publickeyfilter): New setting.
2018-08-12 19:20:04 +03:00
Sergey Poznyakoff
23b718d2a3 Version 2.2 2018-01-02 00:04:23 +02:00
Sergey Poznyakoff
c20d0e4bf3 Happy GNU Year 2018-01-01 11:22:40 +02:00
Sergey Poznyakoff
55620228a8 pam_fshadow: allow the user to use arbitrary group numbers for username and domain parts.
New options username-index and domain-index are used to indicate
indices of the parenthesized groups used to extract the user and
the domain name. The default corresponds to 'user-index=1 domain-index=1'.

Additionally, change the behavior in case if the user name doesn't
match the regexp. Previous versions would fall back to plain authentication
in this case. New behavior is to reject access.

* pam_fshadow/pam_fshadow.c (pam_opt): New options
username-index and domain-index.
(pam_sm_authenticate): Move username splitting into a separate
function.
* doc/pam_fshadow.8in: Document the new options.
2017-12-22 15:25:58 +02:00
Sergey Poznyakoff
fc8bf4028f Version 2.1 2015-08-04 17:31:34 +03:00
Sergey Poznyakoff
d3bce2d705 minor change 2015-04-23 18:01:57 +03:00
Sergey Poznyakoff
a5855defe5 Fix doc generation.
Default Config file applied to all output formats, which is wrong.
Use a dedicated configuration file for html output formats, and
defaults for the rest.

* doc/Makefile.am (GENDOCS): Add html-specific configuration file.
* doc/Config: Rename to doc/html.init (with changes).
2015-04-23 17:54:46 +03:00
Sergey Poznyakoff
176430825d Switch to Texinfo 5.0
* doc/Config: Rewrite.
* doc/Makefile.am: Use Makeinfo 5 instead of texi2htm
* doc/gendocs_template: Ps is not built
* imprimatur: Upgrade.
2015-03-01 21:36:08 +02:00
Sergey Poznyakoff
7974dd9073 Version 2.0
* NEWS: Update version number
* configure.ac: Likewise.
* doc/pam-modules.texi: Fix a typo.
* doc/pam_ldaphome.8in: Likewise.
* pamck/pamck.c: Update copyright years.

* pam_fshadow/pam_fshadow.c: Suppress cc warnings.
* pam_groupmember/pam_groupmember.c: Likewise.
* pam_ldaphome/pam_ldaphome.c: Likewise.
* pam_log/pam_log.c: Likewise.
* pam_regex/pam_regex.c: Likewise.
2015-02-26 11:22:00 +02:00
Sergey Poznyakoff
30d6e72e17 Document user-keys-boundary 2015-01-30 14:45:25 +02:00
Sergey Poznyakoff
946c85c169 Update copyright dates. 2015-01-28 16:54:21 +02:00
Sergey Poznyakoff
947e0c2f8a pam_ldaphome: run initrc command as user.
* examples/usergitconfig: Documentation formatting change.
* lib/graypam.h (gray_2nrealloc): New function.
* lib/mem.c (gray_2nrealloc): New function.
* pam_fshadow/pam_fshadow.c (fgetpwent): Skip malformed entries.
* pam_ldaphome/pam_ldaphome.c (runas): New finction.
(run_prog): Switch to user privileges unless initrc-root is true.

* NEWS: Update.
* doc/pam-modules.texi: Update.
* doc/pam_ldaphome.8in: Update.
2015-01-28 16:42:52 +02:00
Sergey Poznyakoff
399768dde3 Build pam_fshadow even if fgetpwent is not defined.
* configure.ac: Only check if fgetpwent is defined,
don't disable the module if it is not.
* pam_fshadow/pam_fshadow.c [!HAVE_FGETPWENT] (fgetpwent): Provide a
replacement.
2014-12-05 07:49:41 +02:00
Sergey Poznyakoff
e094d80820 Implement audit option
Audit is equivalent to debug=100, i.e. it enables logging
maximum debugging output.
2014-12-04 17:25:44 +02:00
Sergey Poznyakoff
44ee01dd4d pam_ldaphome: Make user-specific key boundary configurable.
* pam_ldaphome/pam_ldaphome.c (store_pubkeys): Use the value of the
user-keys-boundary option as the boundary of user-specific key section.
2014-09-16 11:40:26 +03:00
Sergey Poznyakoff
a792777294 Provide a way to keep user-defined pubkeys in file.
A user can add his public keys to the authorized_keys file without disturbing
the key synchronization from the LDAP database.  The #:end comment in the file
marks the end of area synchronized with LDAP.  Everything below this comment
is preserved intact.

* pam_ldaphome/pam_ldaphome.c (pubkeyfile): New struct.
(pubkeyfile_open,pubkeyfile_read,pubkeyfile_init)
(pubkeyfile_write,pubkeyfile_remove_lines)
(pubkeyfile_alloc_lines,pubkeyfile_insert_lines)
(pubkeyfile_close): New functions.
(store_pubkeys): Use pubkeyfile functions to operate on
the authorized_keys file.
2014-09-12 10:27:43 +03:00
Sergey Poznyakoff
05bf037ee1 Bugfixes
* pam_ldaphome/pam_ldaphome.c (check_groups): Take into account primary
group.
* doc/pam_regex.8: Fix escaping.
2014-09-11 20:16:59 +03:00
Sergey Poznyakoff
6e7bbc2eb1 Improve docstrings in examples. 2014-07-26 08:29:03 +03:00
Sergey Poznyakoff
639fd46fac Implement TLS in perl utilities. 2014-07-25 17:48:54 +03:00
Sergey Poznyakoff
c764d46348 Raise version number to 1.9.90 2014-07-25 15:42:56 +03:00
Sergey Poznyakoff
b4a27a9c7a pam_ldaphome: read /etc/ldap.conf file.
* lib/env.c (gray_env_read_tr): New function.
(gray_env_read): Rewrite using gray_env_read_tr.
(gray_env_merge): New function.
* lib/escape.c (gray_escape_string): Remove useless typecasts.
* lib/graypam.h (gray_env_read_tr)
(gray_env_merge): New protos.
* pam_ldaphome/pam_ldaphome.c (ldap_config_name): New variable.
(ldap_connect): Use 'ssl' keyword, if 'tls' is not defined.
(ldaphome_main): New keyword ldap-config

* doc/pam-modules.texi: Document reading system-wide ldap.conf
* doc/pam_ldaphome.8in: Likewise.
2014-07-25 15:37:28 +03:00
Sergey Poznyakoff
c1059e0398 pam_ldaphome: provide an option to specify CA certificate file for TLS
* pam_ldaphome/pam_ldaphome.c (ldap_connect): New option tls-cacert
* doc/pam-modules.texi: Document tls-cacert
* doc/pam_ldaphome.8in: Likewise.
2014-07-24 17:33:10 +03:00