Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 318285 - >=net-fs/samba-3.5.2 - smbd/negprot.c:37: error: ‘struct auth_context’ has no member named ‘dmalloc_free’
Summary: >=net-fs/samba-3.5.2 - smbd/negprot.c:37: error: ‘struct auth_context’ has no...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
: 368455 379099 (view as bug list)
Depends on:
Blocks: CVE-2011-2522
  Show dependency tree
 
Reported: 2010-05-03 14:29 UTC by Arsen Shnurkov
Modified: 2011-08-15 17:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/net-fs/samba-3.5.2/temp/build.log (build.log,87.47 KB, text/plain)
2010-05-03 14:30 UTC, Arsen Shnurkov
Details
Modified ebuild which makes dmalloc a separate USE flag. (samba-3.5.3-r1.ebuild,12.04 KB, text/plain)
2010-06-10 23:35 UTC, Scott Bertilson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arsen Shnurkov 2010-05-03 14:29:21 UTC
Compiling smbd/negprot.c
smbd/negprot.c: In function ‘get_challenge’:
smbd/negprot.c:37: error: ‘struct auth_context’ has no member named ‘dmalloc_free’
The following command failed:
x86_64-pc-linux-gnu-gcc -O2 -pipe -g -g -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER -Wdeclaration-after-statement -Werror-implicit-function-declaration -I. -I/var/tmp/portage/net-fs/samba-3.5.2/work/samba-3.5.2/source3 -Iinclude -I./include  -I. -I. -I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc -I./.. -DHAVE_CONFIG_H  -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc -I./.. -I./../lib/popt -DLDAP_DEPRECATED  -I/var/tmp/portage/net-fs/samba-3.5.2/work/samba-3.5.2/source3/lib -I.. -I../source4 -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3  -fPIC -c smbd/negprot.c -o smbd/negprot.o
make: *** [smbd/negprot.o] Error 1
Comment 1 Arsen Shnurkov 2010-05-03 14:30:18 UTC
Created attachment 230143 [details]
/var/tmp/portage/net-fs/samba-3.5.2/temp/build.log
Comment 2 MrSnivvel 2010-05-11 17:04:42 UTC
I get the same error.

Portage 2.2_rc67 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11.1-r0, 2.6.33-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-r2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E4600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 11 May 2010 15:00:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:     4.1_p5
dev-java/java-config: 2.1.11
dev-lang/python:     2.5.4-r4, 2.6.5-r2, 3.1.2-r3
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-ggdb -march=core2 -mtune=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-ggdb -march=core2 -mtune=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests candy distcc distlocks fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.netnitco.net http://gentoo.wetzlmayr.com/ http://www.cyberuse.com/gentoo/ http://gentoo.mirrors.tds.net/gentoo http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.arcticnetwork.ca/ http://gentoo.mirrors.tera-byte.com/ http://gentoo.osuosl.org/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ http://mirror.usu.edu/mirrors/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en_US en"
MAKEOPTS="-j16"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/gnome /usr/local/portage/layman/sunrise /usr/local/portage/layman/zugaina /usr/local/portage/layman/jokey /usr/local/portage/layman/webapps-experimental /usr/local/portage/layman/pro-audio"
SYNC="rsync://192.168.1.193/gentoo-portage"
USE="X a52 aac acl acpi ads aio alsa amavis amd64 ao apache2 applet archive artworkextra aspell atk avahi babl bacula-console bash-completion beagle berkdb bluetooth boost branding bzip2 cairo caps cdda cddb cdio cdr cli consolekit cracklib crypt cups curl cxx cygnal daap dbus debug device-mapper dia dirac dms dmx docbook dri dtmf dts dv dvd dvdr dvi eds emboss empathy encode epiphany evo exif extensions extras faac faad fam ffmpeg fftw firefox flac fontconfig fontforge fortran ftp fuse gajim galago games gconf gd gdbm gdu gedit geoip gif git gmp gmplayer gnome gnome-keyring gnome-print gnutls gocr goocanvas gpac gpm grammar graphics gs gsm gstreamer gtk guile h224 h281 h323 hal html http humanities iax icecast iceweasel iconv id3tag ieee1394 imagemagick imap inkjar iphone ipod ipv6 iscsi ithreads jabber jack java java6 javascript jingle jpeg jpeg2k json kdrive kerberos kpathsea kvm lame latex lcms ldap libffi libgda libnotify libsoup libsysfs libwnck lightning logrotate logwatch lvm lyx lzma lzo mad math matroska mdnsresponder-compat mikmod mmx mmxext mng modules mono moonlight mozilla mp3 mp4 mpeg mudflap multilib music mysql nautilus ncurses network networking nptl nptlonly nsplugin odk offensive ogg ogm omega opengl openmp openssl ots overlays pam pango parted pcre pdf perl php pidgin pipechan plotutils plugins png policykit poppler portage postgres postscript ppds pppd pstricks publishers python python-bindings qemu qt3support qt4 quicktime readline reflection restrict-javascript rtf rtsp samba sasl scanner schroedinger science sdl secure-delete session shout simplexml sip smp snmp sockets socks sox speex spell spl sse sse2 sse3 ssl startup-notification stlport stream subversion svg sysfs t1lib tcl tcpd templates test tex4ht theora thesaurus threads tidy tiff tk tools totem truetype udev unicode usb utils v4l v4l2 vhosts vim-syntax vim-with-x vorbis vte vxml wav win64 winbind wmf x264 xattr xcb xchatdccserver xcomposite xft xhtml xinerama xml xmlrpc xorg xsl xulrunner xv xvid yahoo zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel radeon vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 MrSnivvel 2010-05-12 16:32:26 UTC
I was able to get it compile with these USE flags:

net-fs/samba-3.5.2-r1  USE="acl addns ads aio avahi caps client cups fam ldap netapi pam readline server smbclient syslog -cluster -debug -doc -examples -ldb -quota -smbsharemodes -swat -winbind"

Had to specifically disable debug and winbind.
Comment 4 Scott Bertilson 2010-06-10 23:35:16 UTC
Created attachment 234901 [details]
Modified ebuild which makes dmalloc a separate USE flag.
Comment 5 Scott Bertilson 2010-06-10 23:37:58 UTC
This is also an issue in 3.5.3.  It is caused by the fact that the "debug" USE flag enables the use / inclusion of dmalloc.h which re-defines free(...) which re-defines an element of the auth_context struct.  Due to the ordering of the includes, it doesn't modify the definition of the struct, just where that element gets used.

Worked around this by modifying the ebuild to make dmalloc only be enabled by a specific dmalloc USE flag.  Doing that allows winbind as well as debug.
Comment 6 Víctor Ostorga (RETIRED) gentoo-dev 2010-07-04 06:03:07 UTC
(In reply to comment #5)
> This is also an issue in 3.5.3.  It is caused by the fact that the "debug" USE
> flag enables the use / inclusion of dmalloc.h which re-defines free(...) which
> re-defines an element of the auth_context struct.  Due to the ordering of the
> includes, it doesn't modify the definition of the struct, just where that
> element gets used.
> 
> Worked around this by modifying the ebuild to make dmalloc only be enabled by a
> specific dmalloc USE flag.  Doing that allows winbind as well as debug.
> 

Thanks for spotting the problem, the explanation can't be more clear.

The workaround is a problem for every user that have samba and dmalloc installed at the same time.

I have found an irc log that apparently gives a fix[1] to this issue, but haven't had time to test it yet

[1] http://samba.sernet.de/irclog/2010/04/20100416-Fri.log  
from  04/16/10  3:13:24 to 04/16/10  3:23:11
Comment 7 Rafał Mużyło 2011-05-23 14:45:34 UTC
*** Bug 368455 has been marked as a duplicate of this bug. ***
Comment 8 F.N 2011-05-24 21:18:49 UTC
I had the same problem and make samba-3.5.8 get worked with this command :

Which is the same in some way with what Matt McAdoo  said.


USE="acl addns ads aio avahi caps client cups fam ldap
netapi pam readline server smbclient syslog -cluster -debug -doc -examples -ldb
-quota -smbsharemodes -swat -winbind" emerge samba-3.5.8.ebuild


I run this command in /usr/portage/net-fs/samba directory.
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-08-13 19:36:17 UTC
*** Bug 379099 has been marked as a duplicate of this bug. ***
Comment 10 Víctor Ostorga (RETIRED) gentoo-dev 2011-08-15 17:15:24 UTC
dmalloc support in samba implies the re-definition of many structures, which makes samba build crashing by consequence. 
I have disabled dmalloc support, although developer support in debug use flag is always there.