Re: [PATCH] Fix the undefined sudo_debug_exit_ssize_t_v1 symbol error in sudoers plugin (versions > 1.8.15)
Guido Trentalancia <[email protected]>
| Newsgroups | gmane.comp.tools.sudo.devel |
|---|---|
| Message-ID | <[email protected]> |
Yes, you're right, the reason is a mismatched libsudo_util.so ! Basically the symbolic link /usr/libexec/sudo/libsudo_util.so.0 (not /usr/libexec/sudo/libsudo_util.so) points to the old version of libsudo_util.so (the one with a trailing tilde). Apparently ldconfig (called by libtool) creates the wrong symbolic link... So, at the moment, I can only think about the following new version of the patch: In versions greater than 1.8.15, the shared object sudoers.so (plugin) should link sudo_debug.c in order to avoid the following missing symbol error on calls to debug_return_ssize_t()->sudo_debug_exit_ssize_t(): sudo: symbol lookup error: /usr/libexec/sudo/sudoers.so: undefined symbol: sudo_debug_exit_ssize_t_v1 This is the second version of the patch. Signed-off-by: Guido Trentalancia <[email protected]> --- Makefile.in | 2 +- configure.ac | 1 + lib/util/Makefile.in | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) --- sudo-1.8.17p1-orig/configure.ac 2016-07-08 17:39:47.925457605 +0200 +++ sudo-1.8.17p1/configure.ac 2016-07-08 16:04:32.179476385 +0200 @@ -2229,6 +2229,7 @@ dnl dnl Program checks dnl AC_PROG_AWK +AC_PROG_LN_S AC_PROG_YACC AC_PATH_PROG([FLEX], [flex], [flex]) SUDO_PROG_MV --- sudo-1.8.17p1-orig/Makefile.in 2016-03-17 17:13:10.000000000 +0100 +++ sudo-1.8.17p1/Makefile.in 2016-07-08 17:37:02.943920356 +0200 @@ -130,7 +130,7 @@ install-doc: config.status ChangeLog done install: config.status ChangeLog pre-install install-nls - for d in $(SUBDIRS); do \ + for d in "$(SUBDIRS) lib/util"; do \ (cd $$d && exec $(MAKE) "INSTALL_OWNER=$(INSTALL_OWNER)" $@) && continue; \ exit $$?; \ done --- sudo-1.8.17p1-orig/lib/util/Makefile.in 2016-06-18 04:44:21.000000000 +0200 +++ sudo-1.8.17p1/lib/util/Makefile.in 2016-07-08 17:12:34.462302364 +0200 @@ -48,6 +48,7 @@ CC = @CC@ LIBTOOL = @LIBTOOL@ SED = @SED@ AWK = @AWK@ +LN_S = @LN_S@ # Our install program supports extra flags... INSTALL = $(SHELL) $(top_srcdir)/install-sh -c @@ -80,6 +81,12 @@ SSP_LDFLAGS = @SSP_LDFLAGS@ # Libtool style shared library version SHLIB_VERSION = 0:0:0 +# Shared library version (standard format) +SHLIB_VERSION_MAJOR=$(shell $(AWK) -F: '{ print $$1 }' <<< $(SHLIB_VERSION)) +SHLIB_VERSION_MINOR=$(shell $(AWK) -F: '{ print $$2 }' <<< $(SHLIB_VERSION)) +SHLIB_VERSION_PATCH=$(shell $(AWK) -F: '{ print $$3 }' <<< $(SHLIB_VERSION)) +SHLIB_VERSION_STANDARD=$(SHLIB_VERSION_MAJOR).$(SHLIB_VERSION_MINOR).$(SHLIB_VERSION_PATCH) + # cppcheck options, usually set in the top-level Makefile CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64 @@ -212,6 +219,10 @@ install: install-dirs *-no-install*) ;; \ *) if [ X"$(shlib_enable)" = X"yes" ]; then \ INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --quiet --mode=install $(INSTALL) $(INSTALL_OWNER) libsudo_util.la $(DESTDIR)$(libexecdir)/sudo; \ + rm -f $(DESTDIR)$(libexecdir)/sudo/libsudo_util.so; \ + $(LN_S) libsudo_util.so.$(SHLIB_VERSION_STANDARD) $(DESTDIR)$(libexecdir)/sudo/libsudo_util.so; \ + rm -f $(DESTDIR)$(libexecdir)/sudo/libsudo_util.so.$(SHLIB_VERSION_MAJOR); \ + $(LN_S) libsudo_util.so.$(SHLIB_VERSION_STANDARD) $(DESTDIR)$(libexecdir)/sudo/libsudo_util.so.$(SHLIB_VERSION_MAJOR); \ fi;; \ esac ____________________________________________________________ sudo-workers mailing list <[email protected]> For list information, options, or to unsubscribe, visit: https://www.sudo.ws/mailman/listinfo/sudo-workers