|
0 |
Description: Link checkpassword with gnu libc, not diet libc
|
|
1 |
Unfortunately, crypt(3) from diet libc does not recognize $6$ prefix
|
|
2 |
of hash in /etc/shadow and as such, no login was possible at all.
|
|
3 |
.
|
|
4 |
Author of diet libc proposed to either contribute apporiate code
|
|
5 |
to diet libc, or link with other libc. There was choice to statically
|
|
6 |
link with musl libc or dynamically gnu libc. Static linking with
|
|
7 |
musl libc results in 76Kb binary (aganist 15Kb with diet libc) and
|
|
8 |
as I found it unreasonable.
|
|
9 |
.
|
|
10 |
Also, with dynamic linking, if new hashing method would ever reach gnu libc,
|
|
11 |
checkpassword would catch it without my interaction.
|
|
12 |
.
|
|
13 |
Unfortunately, this patch can't be forwarded, since upstream is not interested.
|
|
14 |
Author: Dmitry Bogatov <KAction@gnu.org>
|
|
15 |
Forwarded: no
|
|
16 |
Last-Update: 2016-02-16
|
|
17 |
---
|
|
18 |
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|
19 |
--- a/Makefile
|
|
20 |
+++ b/Makefile
|
|
21 |
@@ -22,7 +22,8 @@ fgetty: fgetty.o fmt_ulong.o
|
|
22 |
|
|
23 |
login: login.o
|
|
24 |
login2: login2.o
|
|
25 |
-checkpassword: checkpassword.o
|
|
26 |
+checkpassword: checkpassword.c
|
|
27 |
+ gcc -Os $^ -lcrypt -o $@
|
|
28 |
checkpassword-pam: checkpassword-pam.o checkpassword-pam2.o
|
|
29 |
$(CROSS)$(CC) -o $@ $^ -lmisc $(LDFLAGS)
|
|
30 |
|