Description: Install login binaries into private directory
 These binaries are never invoked directly and as such should not
 pollute PATH. Also, this way they do not have to have manpage.
Author: Dmitry Bogatov <KAction@gnu.org>
Forwarded: not-needed
Last-Update: 2016-03-19
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile
+++ b/Makefile
@@ -29,9 +29,9 @@ debug: fgetty.c fmt_ulong.o
 	gcc -g -o debug fgetty.c fmt_ulong.o -DDEBUG
 
 install:
-	install -d $(DESTDIR)/bin $(DESTDIR)/sbin $(DESTDIR)/usr/share/man/man8
-	install login $(DESTDIR)/bin/login1
-	install login2 $(DESTDIR)/bin
+	install -d $(DESTDIR)/bin $(DESTDIR)/sbin $(DESTDIR)/usr/share/man/man8 $(DESTDIR)/lib/fgetty
+	install login $(DESTDIR)/lib/fgetty/login1
+	install login2 $(DESTDIR)/lib/fgetty/login2
 	install fgetty $(DESTDIR)/sbin
 	install checkpassword $(DESTDIR)/bin/checkpassword.login
 	install -m 644 fgetty.8 $(DESTDIR)/usr/share/man/man8/fgetty.8
--- a/fgetty.c
+++ b/fgetty.c
@@ -311,7 +311,7 @@ int main(int argc,char *argv[]) {
   loginargv[2]=logname;
   echo_off();
 #ifdef TEST
-  execve("/bin/login1", loginargv, environ);
+  execve("/lib/fgetty/login1", loginargv, environ);
 #else
   execve("/bin/login", loginargv, environ);
 #endif
--- a/login.c
+++ b/login.c
@@ -25,7 +25,7 @@
 
 #define CHECKPASSWORD "/bin/checkpassword.login"
 #define FALLBACKCHECKPASSWORD "/bin/checkpassword"
-#define LOGIN2 "/bin/login2"
+#define LOGIN2 "/lib/fgetty/login2"
 
 #include <string.h>
 #include <unistd.h>
