net/samba41 port compiles nmbd as a shared object, not executable

John Hixson john at ixsystems.com
Thu May 8 22:11:21 UTC 2014


On Thu, May 08, 2014 at 10:42:27PM +0300, Konstantin Belousov wrote:
> On Thu, May 08, 2014 at 09:51:38AM -0700, Craig Rodrigues wrote:
> > Timur,
> > 
> > John Hixson at iXsystems pointed out the following problem to me, and I 
> > noticed it as well.
> What is the problem, exactly ?  Does something mis-function ?
> 
> > 
> > When compiling the net/samba41 port on a FreeBSD-CURRENT host,
> > I notice that all binaries seem to be compiled as shared objects, and 
> > not as proper executables.
> > 
> > % file usr/local/sbin/nmbd
> > usr/local/sbin/nmbd: ELF 64-bit LSB shared object, x86-64, version 1 
> > (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 11.0 
> > (1100013), not stripped
> This is normal for PIE binaries.
> 
> > 
> > 
> > If I look at the link line for nmbd for example, I see that linker flags 
> > such as:
> > -Wl,--export-dynamic
> > -Wl,-Bdynamic
> > 
> > are being passed which force this to be linked together as a shared 
> > object, not as an executable.
> This has nothing to do with the output object type.
> 
> > 
> > Do you have any idea as to how to fix this?
> 
> So, fix what ?

We were seeing that smbd was not dumping core. It would claim to be dumping
core but wasn't. It appears this is completely unrelated. The issue
turns out to be the kern.sugid_coredump sysctl. Once this is set, smbd
will core fine.

- John


More information about the freebsd-ports mailing list