Skip to content

Commit b403837

Browse files
committed
_posts: add post about glibc xcrypt borkage
1 parent 0d94014 commit b403837

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

_posts/2024-01-04-glibc-xcrypt.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: glibc 2.38 Update Issues and Solutions
3+
layout: post
4+
---
5+
6+
With the update to glibc 2.38, `libcrypt.so.1` is no longer part of glibc. This
7+
is an important library providing cryptographic functions for some core system
8+
packages like `pam`. The library is now `libcrypt.so.2` and is provided by
9+
`libxcrypt`. If the library `libcrypt.so.1` is still needed by an application
10+
(e.g. a precompiled or proprietary one), `libxcrypt-compat` provides it.
11+
12+
With this change, some kinds of partial upgrades can leave PAM unable to
13+
function. This breaks tools like `sudo`, `doas`, and `su`, as well as breaking
14+
authentication to your system. If this has happened to you, you can either:
15+
16+
- add `init=/bin/sh` to your kernel command-line in the bootloader and
17+
[downgrade](https://docs.voidlinux.org/xbps/advanced-usage.html#downgrading)
18+
glibc,
19+
- or mount the system's root partition in a live environment,
20+
[chroot](https://docs.voidlinux.org/config/containers-and-vms/chroot.html#chroot-usage)
21+
into it, and install `libxcrypt-compat`
22+
23+
This should allow you to access your system normally and run a full update.
24+
25+
To ensure a disasterous partial upgrade cannot happen, `glibc-2.38_4` conflicts
26+
with `pam<=1.5.3_3`. If you try to install update a package and get a message
27+
like:
28+
29+
```
30+
# xbps-install -Su somepkg
31+
...
32+
CONFLICT: glibc-2.38_4 with installed pkg pam-1.5.3_2 (matched by pam<=1.5.3_3)
33+
Transaction aborted due to conflicting packages.
34+
```
35+
36+
the solution is to either add `pam` to the command:
37+
38+
```
39+
# xbps-install -Su somepkg pam
40+
```
41+
42+
or run a full system update first.

0 commit comments

Comments
 (0)