The branch, v3-2-stable has been updated via 874bc18a992999af5413d3c17d674108a3078f67 (commit) via 37644ccdd97f0c816589fac2e6cb29cc84adf37c (commit) via bc24cee4f9dba9a2df53326c83eeab44bd5057f6 (commit) via 56f630063ce533dfb6f3c51046b7e27b7305c7be (commit) via 033edccdaeaabc1bbd31411173f999916abc530b (commit) via ce05f183d3719fc5592a850d93a1f785acb8fb30 (commit) via c26cf8379d9344dc09530f94e9eeaa98623220c4 (commit) via 6eba5bb5b0967443493baa56b414344920ed33a6 (commit) via c831a1b448c68cdffe40c26ac29569c5bf854b29 (commit) from ecd935a4fada0737fe09ba20cb33b5304132e13b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable - Log ----------------------------------------------------------------- commit 874bc18a992999af5413d3c17d674108a3078f67 Author: Karolin Seeger <[EMAIL PROTECTED]> Date: Fri May 23 15:49:09 2008 +0200 WHATSNEW: Fix typo. Karolin (cherry picked from commit 18bab9472e7f85f3f518b64c4673f6f19a60f94d) commit 37644ccdd97f0c816589fac2e6cb29cc84adf37c Author: Stefan Metzmacher <[EMAIL PROTECTED]> Date: Fri May 23 14:18:42 2008 +0200 libwbclient: add wbcLibraryDetails() metze (cherry picked from commit b68916328e935e61840cb03560ebeeee15bb2c6f) commit bc24cee4f9dba9a2df53326c83eeab44bd5057f6 Author: Stefan Metzmacher <[EMAIL PROTECTED]> Date: Fri May 23 13:59:53 2008 +0200 libwbclient: rename MAXSUBAUTHS => WBC_MAXSUBAUTHS metze (cherry picked from commit 04d465c622c614bec29f24793ae897a73bcb51f4) commit 56f630063ce533dfb6f3c51046b7e27b7305c7be Author: Stefan Metzmacher <[EMAIL PROTECTED]> Date: Fri May 23 11:52:31 2008 +0200 build: add symbol versioning when we build with gnu ld There's --enable-symbol-versioning=no to disable it. metze (cherry picked from commit cb5492978b6b157f529806afb2f5fc6202888129) commit 033edccdaeaabc1bbd31411173f999916abc530b Author: Stefan Metzmacher <[EMAIL PROTECTED]> Date: Fri May 23 12:45:37 2008 +0200 build: autogenerate exports/libwbclient.syms metze (cherry picked from commit 8e0fcd583a643a8f4240698efcbb177463534a82) commit ce05f183d3719fc5592a850d93a1f785acb8fb30 Author: Stefan Metzmacher <[EMAIL PROTECTED]> Date: Fri May 23 12:04:21 2008 +0200 build: autogenerate exports/libtalloc.syms metze (cherry picked from commit ce9d8ea9818d91bd91f95149f3b0a7ed4f2dae3b) commit c26cf8379d9344dc09530f94e9eeaa98623220c4 Author: Stefan Metzmacher <[EMAIL PROTECTED]> Date: Fri May 23 11:39:23 2008 +0200 build: pass .syms extention via @SYMSEXT@ from configure metze (cherry picked from commit efb23fdce72db48b4c149fb3dd4a6f4aa3eebbbe) commit 6eba5bb5b0967443493baa56b414344920ed33a6 Author: Karolin Seeger <[EMAIL PROTECTED]> Date: Fri May 23 14:12:05 2008 +0200 man pages: Fix typo. Karolin (cherry picked from commit 87bcff8dde4302f7b473933f8fddfb98b3c024db) commit c831a1b448c68cdffe40c26ac29569c5bf854b29 Author: Karolin Seeger <[EMAIL PROTECTED]> Date: Fri May 23 15:16:37 2008 +0200 WHATSNEW: Update changes since pre3. Karolin (cherry picked from commit 93ca0277e78622081c1a6cab037543187902fd86) ----------------------------------------------------------------------- Summary of changes: WHATSNEW.txt | 8 +++++ docs-xml/smbdotconf/ldap/ldaptimeout.xml | 2 +- source/Makefile.in | 43 +++++++++++++++++--------- source/configure.in | 25 +++++++++++++++ source/exports/libsmbclient.version.syms | 8 +++++ source/exports/libsmbsharemodes.version.syms | 7 ++++ source/exports/libtalloc.syms | 6 --- source/exports/libwbclient.syms | 4 -- source/nsswitch/libwbclient/wbc_pam.c | 2 +- source/nsswitch/libwbclient/wbc_sid.c | 2 +- source/nsswitch/libwbclient/wbclient.c | 23 ++++++++++++++ source/nsswitch/libwbclient/wbclient.h | 21 +++++++++++-- source/script/mksyms.awk | 3 -- source/script/mksyms.sh | 34 +++++++++++++++++--- 14 files changed, 149 insertions(+), 39 deletions(-) create mode 100644 source/exports/libsmbclient.version.syms create mode 100644 source/exports/libsmbsharemodes.version.syms delete mode 100644 source/exports/libtalloc.syms delete mode 100644 source/exports/libwbclient.syms Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 56fca9c..b268fd6 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -233,6 +233,7 @@ o Alexander Bokovoy <[EMAIL PROTECTED]> o Günther Deschner <[EMAIL PROTECTED]> + * BUG 5453: Fix winbindd and smbd crash when dsgetdcname is used. * BUG 5465: Fix joining with createcomputer=ou1/ou2/ou3. * BUG 5461: Fix issue with Citrix on Samba DCs with more than 900 groups. * Fix wins null pointer crash in nss_wins module. @@ -277,6 +278,13 @@ o Volker Lendecke <[EMAIL PROTECTED]> * Fix dfs_Enum: In form_junctions, correctly check for malloc failure. +o Stefan Metzmacher <[EMAIL PROTECTED]> + * BUG 5443: Fix build on HP-UX. + * Add support for symbol versioning in shared libraries (can be + disabled with --disable-sysmbol-versioning). + * Add new function wbcLibraryDetails() to libwbclient. + + o Tim Prouty <[EMAIL PROTECTED]> * Cleanup size_t return values in convert_string_allocate. diff --git a/docs-xml/smbdotconf/ldap/ldaptimeout.xml b/docs-xml/smbdotconf/ldap/ldaptimeout.xml index cd88494..9c34ac8 100644 --- a/docs-xml/smbdotconf/ldap/ldaptimeout.xml +++ b/docs-xml/smbdotconf/ldap/ldaptimeout.xml @@ -5,7 +5,7 @@ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para> - When Samba connects to an ldap server that servermay be down or unreachable. To prevent Samba from hanging whilst + When Samba connects to an ldap server that server may be down or unreachable. To prevent Samba from hanging whilst waiting for the connection this parameter specifies in seconds how long Samba should wait before failing the connect. The default is to only wait fifteen seconds for the ldap server to respond to the connect request. </para> diff --git a/source/Makefile.in b/source/Makefile.in index 0430de2..998bf43 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -25,7 +25,7 @@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ ## Dynamic shared libraries build settings -DSO_EXPORTS_CMD=-Wl,--version-script,$(srcdir)/exports/`basename $@ | sed 's/@[EMAIL PROTECTED]/syms/'` +DSO_EXPORTS_CMD=-Wl,--version-script,$(srcdir)/exports/`basename $@ | sed 's/@[EMAIL PROTECTED]/@SYMSEXT@/'` [EMAIL PROTECTED]@ SONAME_VER=`grep \^$@ $(builddir)/library-versions | cut -d: -f2` SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) -o $@ @@ -145,22 +145,29 @@ PIDDIR = @piddir@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ LIBTALLOC=$(LIBTALLOC_STATIC_TARGET) @LIBTALLOC_SHARED@ +LIBTALLOC_SYMS=$(srcdir)/exports/[EMAIL PROTECTED]@ +LIBTALLOC_HEADERS=$(srcdir)/@tallocdir@/talloc.h [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ LIBTDB=$(LIBTDB_STATIC_TARGET) @LIBTDB_SHARED@ -LIBTDB_SYMS=$(srcdir)/exports/libtdb.syms +LIBTDB_SYMS=$(srcdir)/exports/[EMAIL PROTECTED]@ LIBTDB_HEADERS=$(srcdir)/@tdbdir@/include/tdb.h LIBSMBCLIENT=bin/libsmbclient.a @LIBSMBCLIENT_SHARED@ LIBSMBSHAREMODES=bin/libsmbsharemodes.a @LIBSMBSHAREMODES_SHARED@ LIBADDNS=bin/libaddns.a @LIBADDNS_SHARED@ [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ @LIBWBCLIENT_SHARED@ +LIBWBCLIENT_SYMS=$(srcdir)/exports/[EMAIL PROTECTED]@ +LIBWBCLIENT_HEADERS=$(srcdir)/nsswitch/libwbclient/wbclient.h [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ LIBNETAPI=$(LIBNETAPI_STATIC_TARGET) @LIBNETAPI_SHARED@ -LIBNETAPI_SYMS=$(srcdir)/exports/libnetapi.syms +LIBNETAPI_SYMS=$(srcdir)/exports/[EMAIL PROTECTED]@ LIBNETAPI_HEADERS=$(srcdir)/lib/netapi/netapi.h FLAGS1 = $(CFLAGS) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS) @@ -1578,7 +1585,12 @@ bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIB $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ -$(LIBTALLOC_SHARED_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ) +MKSYMS_SH = $(srcdir)/script/mksyms.sh + +$(LIBTALLOC_SYMS): $(LIBTALLOC_HEADERS) $(builddir)/library-versions + @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBTALLOC_HEADERS) + +$(LIBTALLOC_SHARED_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ) $(LIBTALLOC_SYMS) @echo Linking shared library $@ @$(SHLD_DSO) $(LIBTALLOC_OBJ) \ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) @@ -1588,10 +1600,8 @@ $(LIBTALLOC_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ0) @echo Linking non-shared library $@ @-$(AR) -rc $@ $(LIBTALLOC_OBJ0) -MKSYMS_SH = $(srcdir)/script/mksyms.sh - -$(LIBTDB_SYMS): $(LIBTDB_HEADERS) - @$(MKSYMS_SH) $(AWK) $@ $(LIBTDB_HEADERS) +$(LIBTDB_SYMS): $(LIBTDB_HEADERS) $(builddir)/library-versions + @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBTDB_HEADERS) $(LIBTDB_SHARED_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ) $(LIBTDB_SYMS) @echo Linking shared library $@ @@ -1603,13 +1613,16 @@ $(LIBTDB_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ0) @echo Linking non-shared library $@ @-$(AR) -rc $@ $(LIBTDB_OBJ0) -bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) @LIBTALLOC_SHARED@ +$(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS) $(builddir)/library-versions + @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBWBCLIENT_HEADERS) + +$(LIBWBCLIENT_SHARED_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) $(LIBWBCLIENT_SYMS) @LIBTALLOC_SHARED@ @echo Linking shared library $@ @$(SHLD_DSO) @LIBTALLOC_LIBS@ $(LIBWBCLIENT_OBJ) \ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) @ln -s -f `basename [EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) -bin/libwbclient.a: $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ) +$(LIBWBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ) @echo Linking non-shared library $@ @-$(AR) -rc $@ $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ) @@ -1623,8 +1636,8 @@ bin/libaddns.a: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @echo Linking non-shared library $@ @-$(AR) -rc $@ $(LIBADDNS_OBJ) -$(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS) - @$(MKSYMS_SH) $(AWK) $@ $(LIBNETAPI_HEADERS) +$(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS) $(builddir)/library-versions + @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBNETAPI_HEADERS) $(LIBNETAPI_SHARED_TARGET): $(BINARY_PREREQS) $(LIBNETAPI_OBJ) $(LIBNETAPI_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking shared library $@ @@ -2135,7 +2148,7 @@ installlibtalloc: installdirs libtalloc -$(INSTALLLIBCMD_SH) $(LIBTALLOC_SHARED_TARGET) $(DESTDIR)$(LIBDIR) -$(INSTALLLIBCMD_A) $(LIBTALLOC_STATIC_TARGET) $(DESTDIR)$(LIBDIR) @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include - -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/@tallocdir@/talloc.h $(DESTDIR)${prefix}/include + -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBTALLOC_HEADERS) $(DESTDIR)${prefix}/include installlibtdb: installdirs libtdb @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) @@ -2276,7 +2289,7 @@ clean: delheaders $(LIBSMBSHAREMODES) $(EVERYTHING_PROGS) $(LIBNETAPI) \ bin/libwbclient.so.0 bin/timelimit \ .headers.stamp */src/*.o proto_exists \ - $(LIBTDB_SYMS) + $(LIBTALLOC_SYMS) $(LIBWBCLIENT_SYMS) $(LIBTDB_SYMS) $(LIBNETAPI_SYMS) -rm -rf t_dir # Making this target will just make sure that the prototype files diff --git a/source/configure.in b/source/configure.in index 8a6b2d6..a9d22af 100644 --- a/source/configure.in +++ b/source/configure.in @@ -86,7 +86,9 @@ AC_SUBST(LIBADDNS) AC_SUBST(INSTALL_LIBWBCLIENT) AC_SUBST(UNINSTALL_LIBWBCLIENT) +AC_SUBST(LIBWBCLIENT_SHARED_TARGET) AC_SUBST(LIBWBCLIENT_SHARED) +AC_SUBST(LIBWBCLIENT_STATIC_TARGET) AC_SUBST(LIBWBCLIENT_STATIC) AC_SUBST(LIBWBCLIENT) AC_SUBST(WINBIND_LIBS) @@ -1499,6 +1501,27 @@ EOF fi fi +# Set defaults +SYMSEXT="syms" +AC_SUBST(SYMSEXT) +use_symbol_versioning=no +if test x"$ac_cv_gnu_ld_version_script" = x"yes"; then + use_symbol_versioning=yes +fi +AC_ARG_ENABLE(symbol-versioning,[ + AS_HELP_STRING([--enable-symbol-versioning], + [Turn on symbol versioning support if available (default=auto)]) +]) +if test x"$enable_symbol_versioning" = x"no"; then + use_symbol_versioning=no +fi + +AC_MSG_CHECKING([symbol versioning]) +if test "x$use_symbol_versioning" = x"yes"; then + SYMSEXT="version.syms" +fi +AC_MSG_RESULT($use_symbol_versioning) + # Assume non-shared by default and override below BLDSHARED="false" @@ -5694,12 +5717,14 @@ if test $BLDSHARED = true -a x"$HAVE_WINBIND" = x"yes" -a x"$BUILD_LIBWBCLIENT_S NSS_MODULES="${WINBIND_NSS} ${WINBIND_WINS_NSS}" ## Only worry about libwbclient if we have shared library support ## and winbindd + LIBWBCLIENT_SHARED_TARGET=bin/libwbclient.$SHLIBEXT LIBWBCLIENT_SHARED=bin/libwbclient.$SHLIBEXT LIBWBCLIENT=libwbclient INSTALL_LIBWBCLIENT=installlibwbclient UNINSTALL_LIBWBCLIENT=uninstalllibwbclient WINBIND_LIBS="-lwbclient" else + LIBWBCLIENT_STATIC_TARGET=bin/libwbclient.a LIBWBCLIENT_STATIC=bin/libwbclient.a fi diff --git a/source/exports/libsmbclient.version.syms b/source/exports/libsmbclient.version.syms new file mode 100644 index 0000000..6afdbcb --- /dev/null +++ b/source/exports/libsmbclient.version.syms @@ -0,0 +1,8 @@ +# +# we use no version symbols for libsmbclient +# to be compatible with 3.0.x +# +{ + global: smbc_*; + local: *; +}; diff --git a/source/exports/libsmbsharemodes.version.syms b/source/exports/libsmbsharemodes.version.syms new file mode 100644 index 0000000..cf3f033 --- /dev/null +++ b/source/exports/libsmbsharemodes.version.syms @@ -0,0 +1,7 @@ +# +# we use no version symbols for libsmbsharemodes +# to be compatible with 3.0.x +# +{ + global: *; +}; diff --git a/source/exports/libtalloc.syms b/source/exports/libtalloc.syms deleted file mode 100644 index 87f1c5c..0000000 --- a/source/exports/libtalloc.syms +++ /dev/null @@ -1,6 +0,0 @@ -{ - global: - talloc_*; - _talloc_*; - local: *; -}; diff --git a/source/exports/libwbclient.syms b/source/exports/libwbclient.syms deleted file mode 100644 index f1e68b4..0000000 --- a/source/exports/libwbclient.syms +++ /dev/null @@ -1,4 +0,0 @@ -{ - global: wbc*; - local: *; -}; diff --git a/source/nsswitch/libwbclient/wbc_pam.c b/source/nsswitch/libwbclient/wbc_pam.c index a0e91fa..3e0b6a5 100644 --- a/source/nsswitch/libwbclient/wbc_pam.c +++ b/source/nsswitch/libwbclient/wbc_pam.c @@ -117,7 +117,7 @@ static wbcErr wbc_create_auth_info(TALLOC_CTX *mem_ctx, #define _SID_COMPOSE(s, d, r, a) { \ (s).sid = d; \ - if ((s).sid.num_auths < MAXSUBAUTHS) { \ + if ((s).sid.num_auths < WBC_MAXSUBAUTHS) { \ (s).sid.sub_auths[(s).sid.num_auths++] = r; \ } else { \ wbc_status = WBC_ERR_INVALID_SID; \ diff --git a/source/nsswitch/libwbclient/wbc_sid.c b/source/nsswitch/libwbclient/wbc_sid.c index de9b028..deec8e5 100644 --- a/source/nsswitch/libwbclient/wbc_sid.c +++ b/source/nsswitch/libwbclient/wbc_sid.c @@ -139,7 +139,7 @@ wbcErr wbcStringToSid(const char *str, p = q +1; sid->num_auths = 0; - while (sid->num_auths < MAXSUBAUTHS) { + while (sid->num_auths < WBC_MAXSUBAUTHS) { if ((x=(uint32_t)strtoul(p, &q, 10)) == 0) break; sid->sub_auths[sid->num_auths++] = x; diff --git a/source/nsswitch/libwbclient/wbclient.c b/source/nsswitch/libwbclient/wbclient.c index 9383fd5..215b61e 100644 --- a/source/nsswitch/libwbclient/wbclient.c +++ b/source/nsswitch/libwbclient/wbclient.c @@ -132,5 +132,28 @@ void wbcFreeMemory(void *p) return; } +wbcErr wbcLibraryDetails(struct wbcLibraryDetails **_details) +{ + wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE; + struct wbcLibraryDetails *info; + + info = talloc(NULL, struct wbcLibraryDetails); + BAIL_ON_PTR_ERROR(info, wbc_status); + + info->major_version = WBCLIENT_MAJOR_VERSION; + info->minor_version = WBCLIENT_MINOR_VERSION; + info->vendor_version = talloc_strdup(info, + WBCLIENT_VENDOR_VERSION); + BAIL_ON_PTR_ERROR(info->vendor_version, wbc_status); + + *_details = info; + info = NULL; + + wbc_status = WBC_ERR_SUCCESS; + +done: + talloc_free(info); + return wbc_status; +} diff --git a/source/nsswitch/libwbclient/wbclient.h b/source/nsswitch/libwbclient/wbclient.h index f236c43..e594f3c 100644 --- a/source/nsswitch/libwbclient/wbclient.h +++ b/source/nsswitch/libwbclient/wbclient.h @@ -52,6 +52,19 @@ typedef enum _wbcErrType wbcErr; const char *wbcErrorString(wbcErr error); /** + * @brief Some useful details about the wbclient library + * + **/ +#define WBCLIENT_MAJOR_VERSION 0 +#define WBCLIENT_MINOR_VERSION 1 +#define WBCLIENT_VENDOR_VERSION "Samba libwbclient" +struct wbcLibraryDetails { + uint16_t major_version; + uint16_t minor_version; + const char *vendor_version; +}; + +/** * @brief Some useful details about the running winbindd * **/ @@ -68,8 +81,8 @@ struct wbcInterfaceDetails { * Data types used by the Winbind Client API */ -#ifndef MAXSUBAUTHS -#define MAXSUBAUTHS 15 /* max sub authorities in a SID */ +#ifndef WBC_MAXSUBAUTHS +#define WBC_MAXSUBAUTHS 15 /* max sub authorities in a SID */ #endif /** @@ -81,7 +94,7 @@ struct wbcDomainSid { uint8_t sid_rev_num; uint8_t num_auths; uint8_t id_auth[6]; - uint32_t sub_auths[MAXSUBAUTHS]; + uint32_t sub_auths[WBC_MAXSUBAUTHS]; }; /** @@ -308,6 +321,8 @@ wbcErr wbcStringToSid(const char *sid_string, wbcErr wbcPing(void); +wbcErr wbcLibraryDetails(struct wbcLibraryDetails **details); + wbcErr wbcInterfaceDetails(struct wbcInterfaceDetails **details); /* diff --git a/source/script/mksyms.awk b/source/script/mksyms.awk index a30bea4..dfe51db 100644 --- a/source/script/mksyms.awk +++ b/source/script/mksyms.awk @@ -9,9 +9,6 @@ BEGIN { inheader=0; current_file=""; - print "#" - print "# This file is automatically generated with \"make symbols\". DO NOT EDIT " - print "#" print "{" print "\tglobal:" } diff --git a/source/script/mksyms.sh b/source/script/mksyms.sh index 51d3fbd..673c77a 100755 --- a/source/script/mksyms.sh +++ b/source/script/mksyms.sh @@ -15,26 +15,50 @@ LANG=C; export LANG LC_ALL=C; export LC_ALL LC_COLLATE=C; export LC_COLLATE -if [ $# -lt 2 ] +if [ $# -lt 3 ] then - echo "Usage: $0 awk output_file header_files" + echo "Usage: $0 awk versionfile output_file header_files" exit 1 fi awk="$1" shift +versionfile="$1" +shift + symsfile="$1" shift symsfile_tmp="$symsfile.$$.tmp~" -proto_src="`echo $@ | tr ' ' '\n' | sort | uniq `" +libname=`basename $symsfile | cut -d '.' -f1` +verline=`grep $libname $versionfile` +majver=`echo -n "$verline" | cut -d ':' -f2` +minver=`echo -n "$verline" | cut -d ':' -f3` +upname=`echo -n "$libname" | sed -e 's/^lib//' | tr '[a-z]' '[A-Z]'` +symver="${upname}_${majver}.${minver}" -echo creating $symsfile +symsext=`basename $symsfile | cut -d '.' -f2-` + +if test x"$symsext" = x"version.syms"; then + echo "creating $symsfile for $symver" +else + echo "creating $symsfile" + symver="# no symbol versioning" +fi + +proto_src="`echo $@ | tr ' ' '\n' | sort | uniq `" mkdir -p `dirname $symsfile` -${awk} -f `dirname $0`/mksyms.awk $proto_src > $symsfile_tmp +cat > $symsfile_tmp <<_ACEOF +# +# This file is automatically generated with "$0". DO NOT EDIT +# +$symver +_ACEOF + +${awk} -f `dirname $0`/mksyms.awk $proto_src >> $symsfile_tmp if cmp -s $symsfile $symsfile_tmp 2>/dev/null then -- Samba Shared Repository