Install libcoloredstderr.so read-only.

Prevents accidental truncates of libcoloredstderr.so with `cp` which
crash all programs which have loaded it.
This commit is contained in:
Simon Ruderich
2013-06-14 13:40:06 +02:00
parent dcaadb5f7c
commit 18d52b3b5a
2 changed files with 14 additions and 0 deletions

View File

@@ -6,3 +6,12 @@ libcoloredstderr_la_SOURCES = coloredstderr.c \
hookmacros.h \
ldpreload.h \
trackfds.h
# Make sure the library is not writable. See README why this is important. Is
# not run with `make libcoloredstderr.la`, but this isn't common usage.
all-local: $(lib_LTLIBRARIES)
find .libs -type f -exec chmod ugo-w '{}' \;
# `install` uses normal permissions, "fix" them so `make install` also
# installs non-writable files.
install-exec-hook:
find $(DESTDIR)$(libdir) -type f -exec chmod ugo-w '{}' \;