summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@gnu.org>2017-09-01 04:11:07 +0300
committerDmitry Bogatov <KAction@debian.org>2019-01-07 20:35:25 +0000
commit75104527c6dfdffb893c77a280c70f6c59b7172e (patch)
tree80510c5bb7752c86cdad697411d133370d2e6662
parentbb778bcea47776c32e51ae9d8eb1d532838af1ee (diff)
[PATCH] 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. Gbp-Pq: Name patch-install-login-binaries-into-privat.patch
-rw-r--r--Makefile6
-rw-r--r--fgetty.c2
-rw-r--r--login.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index a1ae4ad..088f7be 100644
--- 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)/usr/libexec/fgetty
+ install login $(DESTDIR)/usr/libexec/fgetty/login1
+ install login2 $(DESTDIR)/usr/libexec/fgetty/login2
install fgetty $(DESTDIR)/sbin
install checkpassword $(DESTDIR)/bin/checkpassword.login
install -m 644 fgetty.8 $(DESTDIR)/usr/share/man/man8/fgetty.8
diff --git a/fgetty.c b/fgetty.c
index c4a6241..2f82116 100644
--- 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("/usr/libexec/fgetty/login1", loginargv, environ);
#else
execve("/bin/login", loginargv, environ);
#endif
diff --git a/login.c b/login.c
index 8a46a76..0bd9b16 100644
--- 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 "/usr/libexec/fgetty/login2"
#include <string.h>
#include <unistd.h>