Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2014 15:10:07 -0700
From:      John Hixson <john@ixsystems.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Craig Rodrigues <rodrigc@ixsystems.com>, Developers iXsystems <dev@ixsystems.com>, timur@freebsd.org, freebsd-ports@freebsd.org
Subject:   Re: net/samba41 port compiles nmbd as a shared object, not executable
Message-ID:  <20140508221006.GP58138@thinkbsd.divinix.org>
In-Reply-To: <20140508194227.GB74331@kib.kiev.ua>
References:  <536BB61A.7000307@ixsystems.com> <20140508194227.GB74331@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140508221006.GP58138>