build: give explicit error when unable to setuid on install.
Added build error message when 'make install' is run as non-root and the --disable-setuid-install configuration option has not been used. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
committed by
Pekka Paalanen
parent
4937214999
commit
90f23ca3f4
+9
-2
@@ -161,8 +161,15 @@ weston_launch_LDADD = $(PAM_LIBS) $(SYSTEMD_LOGIN_LIBS) $(LIBDRM_LIBS)
|
|||||||
|
|
||||||
if ENABLE_SETUID_INSTALL
|
if ENABLE_SETUID_INSTALL
|
||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
chown root $(DESTDIR)$(bindir)/weston-launch
|
can_suid_files=no; \
|
||||||
chmod u+s $(DESTDIR)$(bindir)/weston-launch
|
chown root $(DESTDIR)$(bindir)/weston-launch \
|
||||||
|
&& chmod u+s $(DESTDIR)$(bindir)/weston-launch \
|
||||||
|
&& can_suid_files=yes;\
|
||||||
|
if test $$can_suid_files=no; then \
|
||||||
|
echo 'Error: unable to unable to change ownership/setuid on weston-launch.'; \
|
||||||
|
echo 'To skip this step, re-run ./configure using --disable-setuid-install'; \
|
||||||
|
false; \
|
||||||
|
fi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif # BUILD_WESTON_LAUNCH
|
endif # BUILD_WESTON_LAUNCH
|
||||||
|
|||||||
Reference in New Issue
Block a user