[beast: 20/23] BSE: check for writable /etc/ld.so.cache before running /sbin/ldconfig



commit 6f83f75da9e961fe34065ce0267c5ce8e89bc36c
Author: Tim Janik <timj gnu org>
Date:   Fri Oct 9 10:16:11 2015 +0200

    BSE: check for writable /etc/ld.so.cache before running /sbin/ldconfig
    
    Only root or sudo environments can execute /sbin/ldconfig. Detecting
    this via `id -u`==0 breaks fakeroot, which cannot write /etc/ld.so.cache.
    Actually checking for a writable /etc/ld.so.cache covers all cases.
    
    Signed-off-by: Tim Janik <timj gnu org>

 bse/Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/bse/Makefile.am b/bse/Makefile.am
index 05eb46d..3668938 100644
--- a/bse/Makefile.am
+++ b/bse/Makefile.am
@@ -160,7 +160,7 @@ SFIDL = $(top_builddir)/sfi/sfidl
 SFIDL_INC = --nostdinc -I$(top_builddir) -I$(top_srcdir) -I$(srcdir)
 
 install-exec-ldconfig: # libtool >= 1.5.2 doesn't always set rpath, requiring ldconfig
-       test `id -u` != 0 -o ! -x /sbin/ldconfig || /sbin/ldconfig $(DESTDIR)$(libdir)
+       test ! -x /sbin/ldconfig -o ! -w /etc/ld.so.cache || /sbin/ldconfig $(DESTDIR)$(libdir)
 install-exec-hook: install-exec-ldconfig
 
 #


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]