Q: RUNPATH missing in libsmbldap.so but not other executables/libraries?

Michael Tokarev mjt at tls.msk.ru
Fri May 13 12:57:23 UTC 2022


13.05.2022 12:35, Michael Tokarev via samba-technical wrote:
> Hi!
> 
> In debian we've got a bugreport about one of the samba libraries missing RUNPATH
> to the private library directory (where libreplace-sambae.so libsmbd-shim-samba4.so
> etc are located.  This one is libsmbldap.so.2.1.0. And indeed, unlike all other
> libs and executables, this one lacks RUNPATH section, while all other binaries
> does have it.

When building and installing, it looks like all other binaries are linked twice:
once with regular names, like bin/default/source3/libnetapi.so*, and also with .inst,
like bin/default/source3/libnetapi.inst.so*.

But libsmbldap.so* is linked only once, - there's no .inst suffix for it.

But I don't see a difference between the two declarations in wscript.build, both
seems to be using similar bld.SAMBA3_LIBRARY() constructs.

There are a few other files like this, with missing RUNPATH and without .inst
link, but these are private:

  /usr/lib/x86_64-linux-gnu/samba/libads-samba4.so.0
  /usr/lib/x86_64-linux-gnu/samba/libnet-keytab-samba4.so.0
  /usr/lib/x86_64-linux-gnu/samba/libsamba-modules-samba4.so.0
  /usr/lib/x86_64-linux-gnu/samba/libsmbldaphelper-samba4.so.0

I still can't figure out how it all is being built...

For me, a "fix" would be to manually add the missing RUNPATH with patchelf
or chrpath, but this is.. a very hackish temporary bandaid.

Thanks,

/mjt



More information about the samba-technical mailing list