Commit Graph

2381 Commits

Author SHA1 Message Date
Thorsten Kukuk
940747f88c pam_access: rework resolving of tokens as hostname
* modules/pam_access/pam_access.c: separate resolving of IP addresses
  from hostnames. Don't resolve TTYs or display variables as hostname
  (#834).
  Add "nodns" option to disallow resolving of tokens as hostname.
* modules/pam_access/pam_access.8.xml: document nodns option
* modules/pam_access/access.conf.5.xml: document that hostnames should
  be written as FQHN.
2024-11-18 23:09:45 +01:00
Yaakov Selkowitz
37b416c152 doc: make PDF documentation optional
While building any documentation requires xsltproc, only the PDF
documentation requires fop, which is dependency-heavy, and not always
available (e.g. it is not included in RHEL).  This allows the HTML
documentation to be built while skipping the PDFs.
2024-11-05 08:54:03 -05:00
root
df46458bee padout: build as a native executable
Add 'native: true' to the build config of padout.

Resolves: https://github.com/linux-pam/linux-pam/issues/850
Signed-off-by: Sietse <sietse@wizdom.nu>
2024-11-03 13:27:19 +00:00
Andika Triwidada
24a8502bed po: update translations using Weblate (Indonesian)
Currently translated at 100.0% (101 of 101 strings).

Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/id/
2024-10-28 08:00:00 +00:00
Dmitry V. Levin
900c9c82e0 meson: fix build with -Di18n=disabled
Resolves: https://github.com/linux-pam/linux-pam/issues/847
2024-10-27 15:00:00 +00:00
Dmitry V. Levin
ea980d9911 maint: update release procedure
* maint/README-release: Update.
2024-10-24 08:00:00 +00:00
Dmitry V. Levin
964d4fbc40 Remove autogen.sh
Complements: 613e59dca7 ("build: drop autotools support")
2024-10-24 08:00:00 +00:00
Dmitry V. Levin
df9df02295 Prepare for 1.7.0 release
* meson.build: Raise project version to 1.7.0.
* po/meson.build: Likewise.
* po/Linux-PAM.pot (Project-Id-Version): Likewise.
* libpam/include/security/_pam_types.h (__LINUX_PAM_MINOR__): Update.
* NEWS: Update.

Resolves: https://github.com/linux-pam/linux-pam/issues/844
2024-10-23 08:00:00 +00:00
Dmitry V. Levin
613e59dca7 build: drop autotools support
There is no point in supporting two different build systems.
2024-10-23 08:00:00 +00:00
Dmitry V. Levin
4aa3111998 ci: drop autotools support 2024-10-23 08:00:00 +00:00
Dmitry V. Levin
cd1533a5cc README: replace autotools-based instructions with meson-based ones 2024-10-23 08:00:00 +00:00
Dmitry V. Levin
61e184cab9 maint: use meson to generate release tarballs 2024-10-23 08:00:00 +00:00
Iker Pedrosa
641dfd1084 pam_access: clarify LOCAL keyword behaviour
* modules/pam_access/access.conf.5.xml: `LOCAL` keyword behaviour
  explanation was focused on the development internals. Let's clarify it
  by rephrasing it to something a sysadmin can understand.

Resolves: https://issues.redhat.com/browse/RHEL-39943
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2024-10-22 15:11:32 +02:00
Iker Pedrosa
ecaaf4456e pam_access: always match local address
* modules/pam_access/pam_access.c: match the local address regardless of
  the IP version in use.

In some circumstances the `localhost` may be translated to IPv4 or IPv6,
but the configuration file only indicated the address for one of the two
versions. Since the originating value is set in `PAM_RHOST` and PAM has
no control over it, let's match the local addresses regardless of the IP
version in use.

Resolves: https://issues.redhat.com/browse/RHEL-23018
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2024-10-22 15:11:13 +02:00
Dmitry V. Levin
e43b85f10d ci/meson-build.sh: add a git status check
* ci/meson-build.sh: Check that "git status" does not report
any differences or untracked files.
2024-10-21 08:00:00 +00:00
Dmitry V. Levin
ae0e60d7fa ci/meson-build.sh: change DESTDIR for the install test
Move DESTDIR inside the build tree to reduce the number of top level
directories used for tests.
2024-10-21 08:00:00 +00:00
Andrey Kovalev
43bdb7ce04 pam_get_authtok*: disallow setting pamh to NULL
This also prevents a potential NULL pointer dereference in
pam_get_authtok_internal and pam_get_authtok_verify when
the pamh argument they access is set to NULL.
2024-10-18 08:00:00 +00:00
Dmitry V. Levin
29c390c7e5 build: check gdbm_close return type
gdbm_close() used to return void, later it was changed to return int.
We cannot assume either way and have to check whether gdbm_close()
returns int.

Fixes: 45c2c496dc ("pam_userdb: enable GDBM support")
2024-10-15 08:00:00 +00:00
Dmitry V. Levin
83aa08a30f po: update .pot and .po files
Regenerate po/Linux-PAM.pot and po/*.po using "meson compile
Linux-PAM-update-po" command.  This essentially updates the line numbers
and timestamps.
2024-10-13 20:00:00 +00:00
Dmitry V. Levin
45cfbd76bb po: pass additional arguments to xgettext 2024-10-13 20:00:00 +00:00
김인수
55105e9dbc po: update translations using Weblate (Korean)
Currently translated at 100.0% (101 of 101 strings).

Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ko/
2024-10-13 08:00:00 +00:00
Seong-ho Cho
0d54c1f398 po: update translations using Weblate (Korean)
Currently translated at 100.0% (101 of 101 strings).

Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ko/
2024-10-13 08:00:00 +00:00
Tomohiro KATO
e71d7cd528 po: update translations using Weblate (Japanese)
Currently translated at 100.0% (101 of 101 strings).

Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ja/
2024-10-13 08:00:00 +00:00
Aindriu Mac Giolla Eoin
b778b40be1 po: update translations using Weblate (Irish)
Currently translated at 100.0% (101 of 101 strings).

Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/ga/
2024-10-13 08:00:00 +00:00
Léane GRASSER
397f6b4782 po: update translations using Weblate (French)
Currently translated at 100.0% (101 of 101 strings).

Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/fr/
2024-10-13 08:00:00 +00:00
Adaline Simonian
fa6b2eb65c po: update translations using Weblate (Norwegian Nynorsk)
Currently translated at 97.0% (98 of 101 strings).

Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/nn/
2024-10-13 08:00:00 +00:00
Martin Srebotnjak
866b627435 po: update translations using Weblate (Slovenian)
Currently translated at 100.0% (101 of 101 strings).

Translate-URL: https://translate.fedoraproject.org/projects/linux-pam/master/sl/
2024-10-13 08:00:00 +00:00
Dmitry V. Levin
22963de972 .github: add a few more meson jobs 2024-10-13 08:00:00 +00:00
Dmitry V. Levin
2f468e4265 .github: add gcc-14 and clang-16/clang-17/clang-18 jobs 2024-10-13 08:00:00 +00:00
Dmitry V. Levin
8362d3b92e .github: switch builder jobs from ubuntu-latest to ubuntu-24.04
Even though ubuntu-latest is still ubuntu-22.04 yet, let's move on
by switching builder jobs to ubuntu-24.04.
2024-10-13 08:00:00 +00:00
Dmitry V. Levin
280561e510 .github: drop old clang jobs
These clang versions suddenly disappeared from ubuntu-22.04 repository,
and it is unlikely that old clang jobs will be missed anyway.
2024-10-13 08:00:00 +00:00
Dmitry V. Levin
b7a37362d3 pam_filter: close unused file descriptors
When creating a socket pipe for communication between the parent and the
child process, each of these two processes should keep just one of these
socket pipe descriptors.
2024-09-13 08:00:00 +00:00
Dmitry V. Levin
2d6f1998dd pam_filter: fix potential fd leak on error path
Resolves: https://github.com/linux-pam/linux-pam/issues/829
2024-09-13 08:00:00 +00:00
PavlNekrasov
63ba6e4aa1 examples/tty_conv: fix potential out of bound write in readline()
At the end of the loop the iterator `i` can be equal to
`PAM_MAX_RESP_SIZE`, which will cause an index call outside the array
in the `input[i] = '\0';`

Signed-off-by: Dmitry V. Levin <ldv@strace.io>
2024-09-13 08:00:00 +00:00
Thorsten Kukuk
a2de804e56 pam_env: install environment file in vendordir
If vendordir is enabled, the distribution provided configuration files
should be below this directory and not in /etc.
2024-09-12 17:32:47 +02:00
Dmitry V. Levin
cce619f09b Add .gitattributes
Mark a few files and directories with export-ignore attribute so that
they won't be added to archive files.
2024-09-10 08:00:00 +00:00
Dmitry V. Levin
691688f3d0 ci: add a few meson jobs 2024-09-10 08:00:00 +00:00
Dmitry V. Levin
7fb6beed01 meson: build Linux-PAM using meson
On my non-representative hardware, the full build using autotools
(./autogen.sh && CFLAGS=-O2 ./configure && make -j`nproc` && make -j`nproc` install)
takes about 45 seconds.

On the same hardware, the full build using meson
(meson setup -Doptimization=2 dir && meson compile -C dir && meson install -C dir)
takes just about 7.5 seconds.
2024-09-10 08:00:00 +00:00
Dmitry V. Levin
aa3e91322c Remove unused .gitignore file
doc/specs/formatter/.gitignore became irrelevant along with the whole
doc/specs/formatter directory after commit
96eb2dc401 back in 2005.
2024-09-10 08:00:00 +00:00
Keith Turner - C72473
5f0b5b2def pam_userdb: don't overwrite free'd memory
As crypt_r is expected to return a pointer into a provided crypt_data
struct, callers should not modify the string returned by crypt_r after
freeing the corresponding crypt_data struct.

Co-authored-by: Dmitry V. Levin <ldv@strace.io>
2024-09-10 08:00:00 +00:00
Thorsten Kukuk
f5db2603d2 pam_limits: use systemd-logind instead of utmp (#822)
The utmp database is unreliable for counting logged in users, since
there is no standard which defines who should create an entry at which
time for which reason. And it has a Y2038 problem with glibc/x86-64.
Query systemd-logind for the number of user sessions instead.
2024-09-10 09:32:02 +02:00
Thorsten Kukuk
8401cef10c pam_issue: only count class user
Since systemd added new types of classes (e.g. manager*), we cannot
use the count of all sessions anymore, but have to check which class
this is.

This is backward compatible, systemd v209 or newer is required.
2024-09-05 08:00:00 +00:00
Dmitry V. Levin
1c6a4a54fa run-xtests.sh: skip the tests instead of failing them if run by non-root
This simplifies integration of xtests into test frameworks.
2024-09-05 08:00:00 +00:00
Dmitry V. Levin
2ecce4848a xtests: fix compilation warning 2024-09-05 08:00:00 +00:00
Dmitry V. Levin
5be52ddac5 Remove unused "dynamic" directory
The code there cannot be compiled at least since introduction
of autotools build system by commit
23624ea6f7 back in 2005.
2024-09-04 08:00:00 +00:00
Dmitry V. Levin
a5a410f1a0 pam_loginuid: avoid using postal address in the GNU GPL license notice
Following the recent news about the latest change of the FSF postal address,
replace the FSF postal address in the GNU GPL license notice with the URL.

Apparently, "Information for maintainers of GNU Software" for quite
a long time suggests using the URL instead of the postal address.

Link: https://lists.gnu.org/archive/html/info-gnu/2024-09/msg00000.html
Link: https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Code.html
2024-09-03 08:00:00 +00:00
Dmitry V. Levin
9e0bfbb94a ci: rename run-build-and-tests.sh to autotools-build.sh
As the script is for autotools-based builds, give it a more descriptive
name, so it wouldn't be confused with build scripts for other build
systems.
2024-08-31 08:00:00 +00:00
Dmitry V. Levin
5d7eefb188 build: consistently include config.h first
Make sure that config.h is included before any system header.
2024-08-30 08:00:00 +00:00
Dmitry V. Levin
8c2bb45941 pam_unix: do not check for HAVE_PAM_FAIL_DELAY
Given that pam_fail_delay is always provided by libpam, checking for
HAVE_PAM_FAIL_DELAY may have any sense only in third-party modules.
2024-08-29 08:00:00 +00:00
Dmitry V. Levin
214e97e115 build: consistently include config.h unconditionally
Given that in most places config.h is included unconditionally,
there is no point in keeping remaining HAVE_CONFIG_H checks.

Public header files do not use config.h and therefore
are not affected by this change anyway.
2024-08-28 08:00:00 +00:00