On 03/05/2010 11:45 AM, Dan Nicholson wrote: > On Fri, Mar 5, 2010 at 8:15 AM, Alan Coopersmith > <[email protected]> wrote: > >> Dan Nicholson wrote: >> >>> Is X at least linked to the right libraries? If not, then I think what >>> we need to do is add them Xext/libXextmodule.la. Something like the >>> attached patch should work, but I'm not sure it's the right thing. >>> >>
I can confirm that libXext should be the only place that references libselinux symbols. I modified the patch to use "_LIBADD" instead of "_LIBS" (based on Alan's example) and to remove SELINUX_LIBS from XSERVER_SYS_LIBS because that should not be necessary with this fix. Please review...hopefully this finally fixes the issues. -- Eamon Walsh National Security Agency
>From f1a3ef1976e9a690c8d6f8858e96cfee0bbb8914 Mon Sep 17 00:00:00 2001 From: Eamon Walsh <[email protected]> Date: Mon, 8 Mar 2010 16:33:37 -0500 Subject: [PATCH] Xext: Link to external libraries when necessary. Although the DDX should be linked to the necessary libraries, we may also need to pull them in directly to the module to ensure the symbols are resolved at runtime. Should fix this bug with XSELINUX: /usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/extensions/libextmod.so: undefined symbol: is_selinux_enabled -v2: use _LIBADD instead of _LIBS; remove SELINUX_LIBS from XSERVER_SYS_LIBS as it should only be needed in extmod. Signed-off-by: Dan Nicholson <[email protected]> Signed-off-by: Eamon Walsh <[email protected]> --- Xext/Makefile.am | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 7287c4a..193d6e5 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -32,6 +32,7 @@ BUILTIN_SRCS = \ # Sources always included in libXextmodule.la & libXext.la. That's right, zero. MODULE_SRCS = +MODULE_LIBS = # Optional sources included if extension enabled by configure.ac rules @@ -83,6 +84,7 @@ endif XSELINUX_SRCS = xselinux_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h if XSELINUX MODULE_SRCS += $(XSELINUX_SRCS) +MODULE_LIBS += $(SELINUX_LIBS) endif # Security extension: multi-level security to protect clients from each other @@ -119,11 +121,13 @@ endif # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS) +libXext_la_LIBADD = $(MODULE_LIBS) if XORG libXextbuiltin_la_SOURCES = $(BUILTIN_SRCS) libXextmodule_la_SOURCES = $(MODULE_SRCS) +libXextmodule_la_LIBADD = $(MODULE_LIBS) endif EXTRA_DIST = \ diff --git a/configure.ac b/configure.ac index 0579551..3e8ea10 100644 --- a/configure.ac +++ b/configure.ac @@ -1432,7 +1432,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) # XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}" XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB" -XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SELINUX_LIBS}" +XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" AC_SUBST([XSERVER_LIBS]) AC_SUBST([XSERVER_SYS_LIBS]) -- 1.7.0
_______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
