Codebase list fgetty / 87a049f
Commit Debian 3.0 (quilt) metadata [dgit (4.3~bpo9+1) quilt-fixup] Dmitry Bogatov 6 years ago
6 changed file(s) with 185 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From: Dmitry Bogatov <KAction@gnu.org>
1 Date: Fri, 1 Sep 2017 04:11:07 +0300
2 X-Dgit-Generated: 0.7-3 469cd532d910496ef04fcd682505ecf6983d8aa2
3 Subject: [PATCH] Disable binary stripping
4
5
6 ---
7
8 --- fgetty-0.7.orig/Makefile
9 +++ fgetty-0.7/Makefile
10 @@ -7,13 +7,12 @@ all: fgetty login login2 checkpassword
11 DIET=diet -Os
12 #CROSS=arm-linux-
13 CROSS=
14 -LDFLAGS=-s
15 +LDFLAGS=
16
17 %.o: %.c
18 # gcc -march=i386 -mcpu=i386 -pipe -Os -fomit-frame-pointer -I../dietlibc/include -c $^ -DTEST
19 $(DIET) $(CROSS)$(CC) -pipe -Os -fomit-frame-pointer -I../dietlibc/include -c $^ -DTEST
20 # gcc -march=i386 -mcpu=i386 -pipe -g -I../dietlibc/include -DTEST -c $^
21 - $(CROSS)strip -x -R .comment -R .note $@
22
23 %: %.o
24 $(DIET) $(CROSS)$(CC) -o $@ $^ $(LDFLAGS)
0 From: Dmitry Bogatov <KAction@gnu.org>
1 Date: Fri, 1 Sep 2017 04:11:07 +0300
2 X-Dgit-Generated: 0.7-3 39087416da44ca4a27131d5d7ddb71343581b6c8
3 Subject: [PATCH] Fix manpage installation
4
5 Install manpage under /usr/share/man, not /usr/man. It fixes lintian error.
6
7 ---
8
9 --- fgetty-0.7.orig/Makefile
10 +++ fgetty-0.7/Makefile
11 @@ -29,12 +29,12 @@ debug: fgetty.c fmt_ulong.o
12 gcc -g -o debug fgetty.c fmt_ulong.o -DDEBUG
13
14 install:
15 - install -d $(DESTDIR)/bin $(DESTDIR)/sbin $(DESTDIR)/usr/man/man8
16 + install -d $(DESTDIR)/bin $(DESTDIR)/sbin $(DESTDIR)/usr/share/man/man8
17 install login $(DESTDIR)/bin/login1
18 install login2 $(DESTDIR)/bin
19 install fgetty $(DESTDIR)/sbin
20 install checkpassword $(DESTDIR)/bin/checkpassword.login
21 - install -m 644 fgetty.8 $(DESTDIR)/usr/man/man8/fgetty.8
22 + install -m 644 fgetty.8 $(DESTDIR)/usr/share/man/man8/fgetty.8
23 @echo "now change your /etc/inittab to do something like"
24 @echo " 1:123:respawn:/sbin/fgetty /dev/vc/1 --noclear"
25
0 From: Dmitry Bogatov <KAction@gnu.org>
1 Date: Fri, 1 Sep 2017 04:11:07 +0300
2 X-Dgit-Generated: 0.7-3 0f54d42cfb603888b202aa4130fa94d139726f71
3 Subject: [PATCH] Install login binaries into private directory
4
5 These binaries are never invoked directly and as such should not
6 pollute PATH. Also, this way they do not have to have manpage.
7
8 ---
9
10 --- fgetty-0.7.orig/Makefile
11 +++ fgetty-0.7/Makefile
12 @@ -29,9 +29,9 @@ debug: fgetty.c fmt_ulong.o
13 gcc -g -o debug fgetty.c fmt_ulong.o -DDEBUG
14
15 install:
16 - install -d $(DESTDIR)/bin $(DESTDIR)/sbin $(DESTDIR)/usr/share/man/man8
17 - install login $(DESTDIR)/bin/login1
18 - install login2 $(DESTDIR)/bin
19 + install -d $(DESTDIR)/bin $(DESTDIR)/sbin $(DESTDIR)/usr/share/man/man8 $(DESTDIR)/lib/fgetty
20 + install login $(DESTDIR)/lib/fgetty/login1
21 + install login2 $(DESTDIR)/lib/fgetty/login2
22 install fgetty $(DESTDIR)/sbin
23 install checkpassword $(DESTDIR)/bin/checkpassword.login
24 install -m 644 fgetty.8 $(DESTDIR)/usr/share/man/man8/fgetty.8
25 --- fgetty-0.7.orig/fgetty.c
26 +++ fgetty-0.7/fgetty.c
27 @@ -311,7 +311,7 @@ int main(int argc,char *argv[]) {
28 loginargv[2]=logname;
29 echo_off();
30 #ifdef TEST
31 - execve("/bin/login1", loginargv, environ);
32 + execve("/lib/fgetty/login1", loginargv, environ);
33 #else
34 execve("/bin/login", loginargv, environ);
35 #endif
36 --- fgetty-0.7.orig/login.c
37 +++ fgetty-0.7/login.c
38 @@ -25,7 +25,7 @@
39
40 #define CHECKPASSWORD "/bin/checkpassword.login"
41 #define FALLBACKCHECKPASSWORD "/bin/checkpassword"
42 -#define LOGIN2 "/bin/login2"
43 +#define LOGIN2 "/lib/fgetty/login2"
44
45 #include <string.h>
46 #include <unistd.h>
0 From: Dmitry Bogatov <KAction@gnu.org>
1 Date: Fri, 1 Sep 2017 04:11:07 +0300
2 X-Dgit-Generated: 0.7-3 e9d67d805b5d6285d370eb63a073617bd727d9c7
3 Subject: [PATCH] Link checkpassword with gnu libc, not diet libc
4
5 Unfortunately, crypt(3) from diet libc does not recognize $6$ prefix
6 of hash in /etc/shadow and as such, no login was possible at all.
7
8 Author of diet libc proposed to either contribute apporiate code
9 to diet libc, or link with other libc. There was choice to statically
10 link with musl libc or dynamically gnu libc. Static linking with
11 musl libc results in 76Kb binary (aganist 15Kb with diet libc) and
12 as I found it unreasonable.
13
14 Also, with dynamic linking, if new hashing method would ever reach gnu libc,
15 checkpassword would catch it without my interaction.
16
17 Unfortunately, this patch can't be forwarded, since upstream is not interested.
18
19 ---
20
21 --- fgetty-0.7.orig/Makefile
22 +++ fgetty-0.7/Makefile
23 @@ -7,7 +7,6 @@ all: fgetty login login2 checkpassword
24 DIET=diet -Os
25 #CROSS=arm-linux-
26 CROSS=
27 -LDFLAGS=
28
29 %.o: %.c
30 # gcc -march=i386 -mcpu=i386 -pipe -Os -fomit-frame-pointer -I../dietlibc/include -c $^ -DTEST
31 @@ -15,13 +14,14 @@ LDFLAGS=
32 # gcc -march=i386 -mcpu=i386 -pipe -g -I../dietlibc/include -DTEST -c $^
33
34 %: %.o
35 - $(DIET) $(CROSS)$(CC) -o $@ $^ $(LDFLAGS)
36 + $(DIET) $(CROSS)$(CC) -o $@ $^
37
38 fgetty: fgetty.o fmt_ulong.o
39
40 login: login.o
41 login2: login2.o
42 -checkpassword: checkpassword.o
43 +checkpassword: checkpassword.c
44 + gcc -Os $(CFLAGS) $(CPPFLAGS) $^ -lcrypt $(LDFLAGS) -o $@
45 checkpassword-pam: checkpassword-pam.o checkpassword-pam2.o
46 $(CROSS)$(CC) -o $@ $^ -lmisc $(LDFLAGS)
47
48 --- fgetty-0.7.orig/checkpassword.c
49 +++ fgetty-0.7/checkpassword.c
50 @@ -1,8 +1,10 @@
51 +#define _XOPEN_SOURCE
52 #include <string.h>
53 #include <unistd.h>
54 #include <pwd.h>
55 #include <shadow.h>
56 #include <stdio.h>
57 +#include <alloca.h>
58 #ifdef __dietlibc__
59 #include <write12.h>
60 #else
0 From: Adrian Bunk <bunk@debian.org>
1 Date: Tue, 13 Feb 2018 06:22:21 +0300
2 X-Dgit-Generated: 0.7-3 aa7ede475fa28329223c7c9060e99b134d333139
3 Subject: [PATCH] Use "extern inline" for __write2
4
5 This is required to ensure that an out-of-line
6 version of the function will be generated.
7
8 ---
9
10 --- fgetty-0.7.orig/checkpassword.c
11 +++ fgetty-0.7/checkpassword.c
12 @@ -8,7 +8,7 @@
13 #ifdef __dietlibc__
14 #include <write12.h>
15 #else
16 -inline void __write2(const char* message) {
17 +extern inline void __write2(const char* message) {
18 write(2,message,strlen(message));
19 }
20 #endif
0 patch-disable-binary-stripping.patch
1 patch-fix-manpage-installation.patch
2 patch-link-checkpassword-with-gnu-libc-n.patch
3 patch-install-login-binaries-into-privat.patch
4 patch-use-extern-inline-for-__write2.patch