]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
The Unix `make install' target now allows you to define UTMP_GROUP,
authorSimon Tatham <anakin@pobox.com>
Tue, 11 Jan 2005 10:45:43 +0000 (10:45 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 11 Jan 2005 10:45:43 +0000 (10:45 +0000)
in which case pterm will be installed setgid that, or to define
UTMP_USER in which case it will be installed setuid that. If you
define neither, it will be installed without any set-id bits as
before.

[originally from svn r5093]

Recipe

diff --git a/Recipe b/Recipe
index 497ce704c85a321d62e5bf160fc6fc70bf8c8602..8f1ae44704aceb47d486f74b439b0715a889b0bb 100644 (file)
--- a/Recipe
+++ b/Recipe
@@ -156,6 +156,13 @@ install:
        $(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
        $(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
        $(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
+       if test -n "$(UTMP_GROUP)"; then \
+         chgrp $(UTMP_GROUP) $(DESTDIR)$(bindir)/pterm && \
+           chmod 2755 $(DESTDIR)$(bindir)/pterm; \
+       elif test -n "$(UTMP_USER)"; then \
+         chown $(UTMP_USER) $(DESTDIR)$(bindir)/pterm && \
+           chmod 4755 $(DESTDIR)$(bindir)/pterm; \
+       fi
        $(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
        $(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
        $(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel