summaryrefslogtreecommitdiffstats
path: root/login-utils/Makefile.am
diff options
context:
space:
mode:
authorKarel Zak2012-06-05 17:38:09 +0200
committerKarel Zak2012-06-05 17:38:09 +0200
commitd07dc5e4eebdd80c08be5ba941505c3603bca010 (patch)
treecdec50a10545de5c7a2e48036a9148d571eee505 /login-utils/Makefile.am
parentlogin: fix compiler warning [-Wsign-compare] (diff)
downloadkernel-qcow2-util-linux-d07dc5e4eebdd80c08be5ba941505c3603bca010.tar.gz
kernel-qcow2-util-linux-d07dc5e4eebdd80c08be5ba941505c3603bca010.tar.xz
kernel-qcow2-util-linux-d07dc5e4eebdd80c08be5ba941505c3603bca010.zip
build-sys: suid su in make install
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/Makefile.am')
-rw-r--r--login-utils/Makefile.am13
1 files changed, 11 insertions, 2 deletions
diff --git a/login-utils/Makefile.am b/login-utils/Makefile.am
index f55119199..e061ab5ed 100644
--- a/login-utils/Makefile.am
+++ b/login-utils/Makefile.am
@@ -111,8 +111,6 @@ vipw_LDADD =
if HAVE_SELINUX
vipw_LDADD += -lselinux
endif
-install-exec-hook::
- cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr
endif # BUILD_VIPW
@@ -122,3 +120,14 @@ test_islocal_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS)
test_logindefs_SOURCES = logindefs.c logindefs.h
test_logindefs_CPPFLAGS = -DTEST_PROGRAM $(AM_CPPFLAGS)
+
+
+install-exec-hook:
+if BUILD_SU
+if MAKEINSTALL_DO_SETUID
+ chmod 4755 $(DESTDIR)$(bindir)/su
+endif
+endif
+if BUILD_VIPW
+ cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr
+endif