Make the `become' program setuid root when installing.
authormdw <mdw>
Fri, 20 Feb 1998 18:12:35 +0000 (18:12 +0000)
committermdw <mdw>
Fri, 20 Feb 1998 18:12:35 +0000 (18:12 +0000)
src/Makefile.am

index 31e95ae..effb91c 100644 (file)
@@ -1,7 +1,7 @@
 ## Process this file with `automake' to generate `Makefile.in'
 ## -*-makefile-*-
 ##
-## $Id: Makefile.am,v 1.8 1998/01/12 16:45:36 mdw Exp $
+## $Id: Makefile.am,v 1.9 1998/02/20 18:12:35 mdw Exp $
 ##
 ## Makefile for `become'
 ##
@@ -29,6 +29,9 @@
 ##----- Revision history ----------------------------------------------------
 ##
 ## $Log: Makefile.am,v $
+## Revision 1.9  1998/02/20 18:12:35  mdw
+## Make the `become' program setuid root when installing.
+##
 ## Revision 1.8  1998/01/12 16:45:36  mdw
 ## Fix copyright date.
 ##
@@ -113,6 +116,17 @@ keygen_SOURCES = keygen.c
 become_DEPENDENCIES = libbcm.a
 keygen_DEPENDENCIES = libbcm.a
 
+##----- Become must be setuid root ------------------------------------------
+
+install-data-hook:
+       become_prog=${bindir}/`echo become|sed '${transform}'`; \
+       { chown root $${become_prog} && \
+         chmod 4755 $${become_prog}; } || \
+       { echo ">>>>>"; \
+         echo ">>>>> $${become_prog} must be installed setuid-root"; \
+         echo ">>>>>"; \
+       }
+
 ##----- Testing -------------------------------------------------------------
 
 ## --- The test programs ---