Alejandro Colomar bec925d29d
lib/, src/, configure.ac: Use utmpx instead of utmp
utmpx is specified by POSIX as an XSI extension.  That's more portable
than utmp, which is unavailable for example in musl libc.  The manual
page specifies that in Linux (but it probably means in glibc), utmp and
utmpx (and the functions that use them) are identical, so this commit
shouldn't affect glibc systems.

Assume utmpx is always present.

Also, if utmpx is present, POSIX guarantees that some members exist:

-  ut_user
-  ut_id
-  ut_line
-  ut_pid
-  ut_type
-  ut_tv

So, rely on them unconditionally.

Fixes: 170b76cdd1a9 ("Disable utmpx permanently")
Closes: <https://github.com/shadow-maint/shadow/issues/945>
Reported-by: Firas Khalil Khana <firasuke@gmail.com>
Reported-by: "A. Wilfox" <https://github.com/awilfox>
Tested-by: Firas Khalil Khana <firasuke@gmail.com>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Cherry-picked-from: 64bcb54fa962 ("lib/, src/, configure.ac: Use utmpx instead of utmp")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-02-20 22:53:54 +01:00
2023-08-04 14:15:49 -05:00
2023-02-09 10:03:03 -06:00
2024-02-13 18:47:39 +01:00
2023-09-10 14:13:01 +02:00
2024-01-26 13:32:08 +01:00
2023-09-10 14:13:01 +02:00
2023-03-02 16:33:06 -06:00
2023-09-10 14:13:01 +02:00
2023-04-18 09:21:09 +02:00
2023-08-07 09:42:11 -05:00
2023-04-26 17:35:58 -05:00
2021-12-23 19:36:50 -06:00
2023-09-10 14:13:01 +02:00
2023-04-26 17:35:58 -05:00
2021-12-19 14:09:08 -06:00
2023-03-20 10:54:45 -05:00
2023-09-10 14:13:01 +02:00

shadow-utils

Introduction

The shadow-utils package includes the necessary programs for converting UNIX password files to the shadow password format, plus programs for managing user and group accounts. The pwconv command converts passwords to the shadow password format. The pwunconv command unconverts shadow passwords and generates a passwd file (a standard UNIX password file). The pwck command checks the integrity of password and shadow files. The lastlog command prints out the last login times for all users. The useradd, userdel, and usermod commands are used for managing user accounts. The groupadd, groupdel, and groupmod commands are used for managing group accounts.

Sites

Contacts

There are several ways to contact us:

Mailing archives

Contributions

Contributions are welcome. Follow the guidelines before posting any patches.

Authors and maintainers

Authors and maintainers are listed in AUTHORS.md.

Description
Upstream shadow tree
Readme 30 MiB
Languages
Shell 54.2%
C 41.2%
Python 3.1%
M4 0.8%
Makefile 0.6%
Other 0.1%