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

Michael Tokarev mjt at tls.msk.ru
Thu May 19 20:15:47 UTC 2022


19.05.2022 21:15, Alexander Bokovoy via samba-technical wrote:
> On to, 19 touko 2022, Michael Tokarev via samba-technical wrote:
...
>> I don't know (yet) about smbd-shim which is also needed by libsmbldap
>> but which is not a usual library.  But this is enough already to fix
>> the underlying issue (of binaries being unable to find their dependencies).
> 
> smbd and other daemons that load smbldap link to those four missing
> libraries, so there is no problem for them in real life. On Fedora we
> have it this way:
> 
> [root at dc ~]# ldd /usr/sbin/smbd|grep security
> 	libsamba-security-samba4.so => /usr/lib64/samba/libsamba-security-samba4.so (0x00007f21bc859000)
> [root at dc ~]# ldd /usr/lib64/libsmbldap.so.2.1.0 |grep security
> 	libsamba-security-samba4.so => not found
> 	libsamba-security-samba4.so => /usr/lib64/samba/libsamba-security-samba4.so (0x00007f8e3ee0a000)

it is exactly the same on debian, -- it is the same code after all.

...
>> Looking at the whole picture, it seems like the dependency problem
>> in samba is *huge*, there's just a few libs which gets their deps
>> correctly, vast majority of them are wrong. I don't know if it is
>> worth fixing this mess, -- at least it should be done by someone
>> who knows the thing just a bit.
> 
> Samba went through at least three or four build systems during past two
> decades exactly because we had a need to express complex dependencies we
> have. At some point there was a library called bigballofmud that simply
> linked all the pieces needed for smbd. WAF expressions allow to solve
> most of those problems now but they aren't a replacement for the cases
> when code morphs and gets refactored/moved between components. Human
> intervention is still needed.

Yeah, I know about the build systems (I've been here since samba was
moving from samba2 to samba3 and have seen many of that) and I know
about this stuff tending to bitrot quite fast, too.  Maybe there can
be some automated way to detect these things. Again, maybe wafsamba
can help there. The prob for me is that I don't understand it at all
and there's no one around who does, it seems, -- all my questions
about it basically went unanswered, except - like in this case - when
I answer to them myself. I don't know python either (but ofcourse can
read it. Eg, I weren't able to figure out how to print a name of the
library being built).

>> I'm fixing this in debian, but I'm not submitting a patch to samba,
>> since it's just a waste of my time.
> 
> No, please submit them upstream because otherwise it is going to be
> waste of your time every time this happens.

Now I know how to deal with this. The prob with submitting is that all
my patches goes to /dev/null, even the simplest spelling fixes. I had
enough of that.

Thanks,

/mjt



More information about the samba-technical mailing list