<?xml version="1.0" ?>

<kc>

<title>Samba Traffic</title>

<editor contact="mailto:zbrown@tumblerings.org">Zack Brown</editor>

<issue num="36" date="23 Dec 2000 00:00:00 -0800" />

<headquote><a href="http://samba.org">Samba Homepage</a> | <a
href="http://marc.theaimsgroup.com/#samba">Samba List Archives</a>
| <a href="http://samba.he.net/using_samba/">"Using Samba"</a> | <a
href="http://www.redhat.com/support/docs/tips/Samba-Tips/Samba-Tips.html">Samba
Tips</a> | <a href="http://home.germany.net/101-69082/samba.html">A
Samba Doc Page</a> | <a
href="http://www.uwsg.iu.edu/software/source-docs/faq/Samba-meta-FAQ.html">Samba
Meta-FAQ</a> | <a href="http://www.sgi.com/software/samba/faq.html">Samba
For IRIX FAQ</a></headquote>

<intro>

<p>

Want to help write KC Samba? See the <a href="../author.html">KC Authorship
page</a>, the <a href="index.html">KC Samba homepage</a>, and the <a
href="../summaryfaq.html">Thread Summary FAQ</a>. Send any questions to the
<a href="mailto:kcdevel@zork.net">KCDevel mailing list.</a>

</p>

</intro>

<stats posts="508" size="2284" contrib="179" multiples="85" lastweek="0">

<person posts="29" size="119" who="David Bannon &lt;D.Bannon@latrobe.edu.au&gt;" />
<person posts="28" size="108" who="Gerald Carter &lt;gcarter@valinux.com&gt;" />
<person posts="27" size="120" who="Simo Sorce &lt;simo.sorce@polimi.it&gt;" />
<person posts="22" size="95" who="Richard Sharpe &lt;sharpe@ns.aus.com&gt;" />
<person posts="19" size="96" who="&quot;Anders C. Thorsen&quot; &lt;anders@aae.wisc.edu&gt;" />
<person posts="15" size="58" who="Jeremy Allison &lt;jeremy@valinux.com&gt;" />
<person posts="12" size="56" who="&quot;Robert Dahlem&quot; &lt;Robert.Dahlem@gmx.net&gt;" />
<person posts="12" size="42" who="Shaun Lipscombe &lt;shaun.lipscombe@gasops.co.uk&gt;" />
<person posts="10" size="56" who="&quot;Hazen Valliant-Saunders&quot; &lt;hazen@potentia.ca&gt;" />
<person posts="8" size="35" who="Affuso Giovanni &lt;giovanni.affuso@almaitalia.it&gt;" />
<person posts="8" size="28" who="Kevin Colby &lt;kevinc@grainsystems.com&gt;" />
<person posts="8" size="27" who="Steeve &lt;steeve@eps.mcgill.ca&gt;" />
<person posts="7" size="31" who="&quot;Armand Welsh&quot; &lt;armand@welshhome.org&gt;" />
<person posts="6" size="70" who="&quot;Ilender Linux&quot; &lt;linux@ilender.com.pe&gt;" />
<person posts="6" size="37" who="&quot;Mayers, Philip J&quot; &lt;p.mayers@ic.ac.uk&gt;" />
<person posts="6" size="21" who="&quot;James Moore&quot; &lt;jmoore@php.net&gt;" />
<person posts="5" size="27" who="&quot;Joshi, Shripad.G&quot; &lt;shripad.g.joshi@csam.com&gt;" />
<person posts="5" size="20" who="Gerry Maddock &lt;gerrym@futuremetals.com&gt;" />
<person posts="5" size="18" who="Sewa Makhinya &lt;loki@paco.net&gt;" />
<person posts="5" size="17" who="&lt;gandalf@mail.rss.cz&gt;" />
<person posts="5" size="16" who="Kai Blin &lt;k.blin@gmx.net&gt;" />
<person posts="5" size="15" who="Matthew Geddes &lt;mgeddes@xavier.sa.edu.au&gt;" />
<person posts="5" size="14" who="&quot;Adam Read&quot; &lt;read_a@univerahealthcare.org&gt;" />
<person posts="4" size="22" who="&quot;Richard Bollinger&quot; &lt;rabollinger@home.com&gt;" />
<person posts="4" size="18" who="Kenichi Okuyama &lt;okuyamak@dd.iij4u.or.jp&gt;" />
<person posts="4" size="17" who="Buchan Milne &lt;bgmilne@cae.co.za&gt;" />
<person posts="4" size="15" who="Tim Potter &lt;tpot@linuxcare.com.au&gt;" />
<person posts="4" size="14" who="High Mobley &lt;high@negacsbs.org&gt;" />
<person posts="4" size="12" who="Marcus Grando &lt;marcus@big.univali.br&gt;" />
<person posts="3" size="26" who="&quot;JBCurry&quot; &lt;jbcurry@hline.localhealth.net&gt;" />
<person posts="3" size="19" who="David Atkinson &lt;datk@albury.net.au&gt;" />
<person posts="3" size="19" who="&quot;James W. Beauchamp&quot; &lt;jbeauchamp@gesinc.com&gt;" />
<person posts="3" size="18" who="&quot;Chris Leavoy&quot; &lt;chrisleavoy@home.com&gt;" />
<person posts="3" size="16" who="Buchan Milne &lt;bgmilne@ing.sun.ac.za&gt;" />
<person posts="3" size="16" who="Marc Harding &lt;mharding@ecwebworks.com&gt;" />
<person posts="3" size="14" who="&quot;Christian Barth&quot; &lt;barth@cck.uni-kl.de&gt;" />
<person posts="3" size="14" who="Hergen Lange &lt;hergen.lange@olb.de&gt;" />
<person posts="3" size="14" who="David Collier-Brown &lt;David.Collier-Brown@canada.sun.com&gt;" />
<person posts="3" size="14" who="&quot;Stokes&quot; &lt;edmundo@moscow.com&gt;" />
<person posts="3" size="14" who="Chris Wood &lt;cwood@wencor.com&gt;" />
<person posts="3" size="12" who="Chen Shiyuan &lt;csy@hjc.edu.sg&gt;" />
<person posts="3" size="12" who="&quot;=?Iso-8859-1?Q?Johan_=D6stensson?=&quot; &lt;johan.ostensson@orebro.lantmen.se&gt;" />
<person posts="3" size="11" who="&quot;Torsten Curdt&quot; &lt;tcurdt@dff.st&gt;" />
<person posts="3" size="11" who="Bruce Ferrell &lt;bferrell@microdisplay.com&gt;" />
<person posts="3" size="10" who="Wilson H Yau &lt;wilson@coms.com&gt;" />
<person posts="3" size="10" who="Keith Lynn &lt;lynn@tsunami.cis.usouthal.edu&gt;" />
<person posts="3" size="9" who="Akop Pogosian &lt;akopps@CSUA.Berkeley.EDU&gt;" />
<person posts="3" size="9" who="Seth Vidal &lt;skvidal@phy.duke.edu&gt;" />
<person posts="3" size="7" who="greg &lt;ircd@michelog.med.uoc.gr&gt;" />
<person posts="2" size="42" who="Przemek Sobieski &lt;sobol@sobol.org&gt;" />
<person posts="2" size="25" who="Greg Dickie &lt;greg@discreet.com&gt;" />
<person posts="2" size="19" who="Kristyan Osborne &lt;kris.ozzy@lineone.net&gt;" />
<person posts="2" size="13" who="ctooley@amoa.org" />
<person posts="2" size="13" who="Manea Mirko &lt;mami@arena.sci.univr.it&gt;" />
<person posts="2" size="12" who="okuyamak@dd.iij4u.or.jp" />
<person posts="2" size="11" who="Brian Keats &lt;bkeats@spiff.chin.gc.ca&gt;" />
<person posts="2" size="10" who="Mitch McNeel &lt;mitchm@mwh.com&gt;" />
<person posts="2" size="9" who="Alexander Istomin &lt;alec@mipt.sw.ru&gt;" />
<person posts="2" size="9" who="t.nijenbrink@e-presence.nl" />
<person posts="2" size="9" who="Andrew Bartlett &lt;abartlet@pcug.org.au&gt;" />
<person posts="2" size="9" who="Gerd Georg-Muthweiss &lt;Gerd.Georg-Muthweiss@germany.sun.com&gt;" />
<person posts="2" size="9" who="Eric Pilger &lt;pilger@kahana.higp.hawaii.edu&gt;" />
<person posts="2" size="8" who="&quot;Paul Williams&quot; &lt;paul@slaterandson.com&gt;" />
<person posts="2" size="8" who="Mike Brodbelt &lt;m.brodbelt@acu.ac.uk&gt;" />
<person posts="2" size="8" who="&quot;Pablo&quot; &lt;chucky@sortes.com&gt;" />
<person posts="2" size="8" who="The DJ &lt;hartman@mac.com&gt;" />
<person posts="2" size="7" who="herve colasuonno &lt;herve.colasuonno@inpg.fr&gt;" />
<person posts="2" size="7" who="&quot;Yacketta,Ronald J&quot; &lt;YackettaRJ@worldkitchen.com&gt;" />
<person posts="2" size="7" who="Peter Leif Rasmussen &lt;plr@tt.dk&gt;" />
<person posts="2" size="7" who="Jelmer Vernooij &lt;jelmer@nl.linux.org&gt;" />
<person posts="2" size="7" who="sp &lt;gandalf@rss.cz&gt;" />
<person posts="2" size="7" who="Alain BARBET &lt;alain.barbet@mnc.fr&gt;" />
<person posts="2" size="7" who="&quot;Michael B. Allen&quot; &lt;mballen@erols.com&gt;" />
<person posts="2" size="7" who="Schlomo Schapiro &lt;schapiro@clerk.pi.huji.ac.il&gt;" />
<person posts="2" size="7" who="Lubomir &lt;lubo@ru.acad.bg&gt;" />
<person posts="2" size="7" who="Jelmer Vernooij &lt;jelmer@humbolt.nl.linux.org&gt;" />
<person posts="2" size="7" who="christian dare &lt;christian.dare@univ-brest.fr&gt;" />
<person posts="2" size="7" who="Hubert_RICOUARD%CRAMROUEN@cram-normandie.fr" />
<person posts="2" size="7" who="Giulio Orsero &lt;giulioo@pobox.com&gt;" />
<person posts="2" size="7" who="&quot;Phillip E. Ganze&quot; &lt;ganze@eng.buffalo.edu&gt;" />
<person posts="2" size="7" who="Anders Vedmar &lt;anders.vedmar@interactiveinstitute.se&gt;" />
<person posts="2" size="6" who="&quot;J D&quot; &lt;starkruzr1701@mail.ru&gt;" />
<person posts="2" size="6" who="iddwb &lt;David.Bear@asu.edu&gt;" />
<person posts="2" size="6" who="davep@hmgcc.gov.uk (DaveP)" />
<person posts="2" size="6" who="Ulf Bertilsson &lt;ulf.bertilsson@adcomdata.no&gt;" />
<person posts="1" size="17" who="Ryo Kawahara &lt;rkawa@lbe.co.jp&gt;" />
<person posts="1" size="12" who="Jesse Asher &lt;jwasher@orion.hd.intel.com&gt;" />
<person posts="1" size="8" who="Rick Day &lt;rick.day@thewarehousegroup.com.au&gt;" />
<person posts="1" size="7" who="&quot;Igor Yu. Zhbanov&quot; &lt;bsg@uniyar.ac.ru&gt;" />
<person posts="1" size="6" who="&quot;Wood, John  (Cahners)&quot; &lt;jwood@manufacturing.net&gt;" />
<person posts="1" size="6" who="guenther deschner &lt;gilles@deschner.de&gt;" />
<person posts="1" size="6" who="Pat &lt;slu@firerun.net&gt;" />
<person posts="1" size="6" who="&quot;Hitesh Talati&quot; &lt;htalati@torrentnet.com&gt;" />
<person posts="1" size="5" who="Luke Kenneth Casson Leighton &lt;lkcl@samba.org&gt;" />
<person posts="1" size="5" who="&quot;Bart Drijver&quot; &lt;b.drijver@nyenrode.nl&gt;" />
<person posts="1" size="5" who="Scott Gifford &lt;sgifford@tir.com&gt;" />
<person posts="1" size="5" who="William Jojo &lt;jojowil@hvcc.edu&gt;" />
<person posts="1" size="5" who="J M &lt;john_20_28_2000@yahoo.com&gt;" />
<person posts="1" size="5" who="stancel@netlife.de" />
<person posts="1" size="5" who="eirvine &lt;eirvine@tpgi.com.au&gt;" />
<person posts="1" size="5" who="Michael Sweet &lt;mike@easysw.com&gt;" />
<person posts="1" size="4" who="Peter Samuelson &lt;peter@cadcamlab.org&gt;" />
<person posts="1" size="4" who="Newman &lt;newman@engebras.com.br&gt;" />
<person posts="1" size="4" who="&quot;Morban Michael&quot; &lt;michael.morban@hqde.infrabrk.com&gt;" />
<person posts="1" size="4" who="&quot;Charles Lacour&quot; &lt;Clacour@greyhound.com&gt;" />
<person posts="1" size="4" who="Steve Langasek &lt;vorlon@netexpress.net&gt;" />
<person posts="1" size="4" who="&quot;Welsh, Armand&quot; &lt;armand.welsh@sscims.com&gt;" />
<person posts="1" size="4" who="Gregory Leblanc &lt;gleblanc@cu-portland.edu&gt;" />
<person posts="1" size="4" who="&quot;Romeril, Alan&quot; &lt;a.romeril@ic.ac.uk&gt;" />
<person posts="1" size="4" who="&quot;Ralf Huelsmann&quot; &lt;r_huelsmann@ish.com&gt;" />
<person posts="1" size="4" who="&quot;SKLIM&quot; &lt;sklim@elm-net.com&gt;" />
<person posts="1" size="4" who="&quot;Rob Mason&quot; &lt;Rob_Mason@eur.3com.com&gt;" />
<person posts="1" size="4" who="&quot;Christopher R. Hertel&quot; &lt;chertel@mn.mediaone.net&gt;" />
<person posts="1" size="4" who="Gerry George &lt;ggeorge@digisolv.com&gt;" />
<person posts="1" size="4" who="Scott Sanbeg &lt;ssanbeg@home.com&gt;" />
<person posts="1" size="4" who="Graeme.Vetterlein@ntl.com" />
<person posts="1" size="4" who="Jason Haar &lt;Jason.Haar@trimble.co.nz&gt;" />
<person posts="1" size="4" who="Jim Morris &lt;Jim@Morris.net&gt;" />
<person posts="1" size="4" who="&lt;bleys@box43.gnet.pl&gt;" />
<person posts="1" size="4" who="&quot;Kulraj Gurm&quot; &lt;kulraj@microbiz.net&gt;" />
<person posts="1" size="4" who="SRuth@LANDAM.com" />
<person posts="1" size="4" who="&quot;John E. Malmberg&quot; &lt;MALMBERG@Eisner.DECUS.org&gt;" />
<person posts="1" size="4" who="&quot;yaya&quot; &lt;dyaya_2000@yahoo.com&gt;" />
<person posts="1" size="3" who="not provided not provided &lt;steelbell@netscape.net&gt;" />
<person posts="1" size="3" who="Jani Jaakkola &lt;jjaakkol@cs.Helsinki.FI&gt;" />
<person posts="1" size="3" who="Jean Francois Micouleau &lt;Jean-Francois.Micouleau@dalalu.fr&gt;" />
<person posts="1" size="3" who="&quot;Michael H. Warfield&quot; &lt;mhw@wittsend.com&gt;" />
<person posts="1" size="3" who="&quot;Sven Packebusch&quot; &lt;Sven.Packebusch@web.de&gt;" />
<person posts="1" size="3" who="&quot;Testa, Stefan&quot; &lt;STEFAN.TESTA@saic.com&gt;" />
<person posts="1" size="3" who="Jason Todd &lt;todd.4@wright.edu&gt;" />
<person posts="1" size="3" who="Jonathan W Miner &lt;jminer@mcfly.sanders.lmco.com&gt;" />
<person posts="1" size="3" who="Simon.Murcott@solnet.co.nz" />
<person posts="1" size="3" who="Andrew Klaassen &lt;ak@dkp.com&gt;" />
<person posts="1" size="3" who="&quot;Vern H. Gill&quot; &lt;vgill@technologist.com&gt;" />
<person posts="1" size="3" who="&quot;Haugg, Franz&quot; &lt;franz_haugg@bdt-rw.de&gt;" />
<person posts="1" size="3" who="Andrew Tridgell &lt;tridge@linuxcare.com&gt;" />
<person posts="1" size="3" who="eirvine@tpg.com.au" />
<person posts="1" size="3" who="filipi &lt;filipi@technologist.com&gt;" />
<person posts="1" size="3" who="Jim Vopni &lt;jimv@metrics.com&gt;" />
<person posts="1" size="3" who="Kevin Long &lt;KLong@southlandInd.com&gt;" />
<person posts="1" size="3" who="&quot;Ralf Huelsmann&quot; &lt;r_huelsmann@ish.de&gt;" />
<person posts="1" size="3" who="&quot;Phil Yurko&quot; &lt;phil-samba@goodcompany.com&gt;" />
<person posts="1" size="3" who="Peter Svensson &lt;petersv@psv.nu&gt;" />
<person posts="1" size="3" who="Dave O'Neill &lt;doneill@linuxcare.com&gt;" />
<person posts="1" size="3" who="Sergei Makarov &lt;smakarov@nes.ru&gt;" />
<person posts="1" size="3" who="Adam Williams &lt;awilliam@whitemice.org&gt;" />
<person posts="1" size="3" who="Patrick &lt;slu@firerun.net&gt;" />
<person posts="1" size="3" who="Mathieu Masseboeuf &lt;mathieum@sports.com&gt;" />
<person posts="1" size="3" who="&quot;Guy Jayme Admin. Unix/Reseau C.O.M.&quot; &lt;Guy.Jayme@com.univ-mrs.fr&gt;" />
<person posts="1" size="3" who="Thorsten Schneider &lt;t.schneider@newellwf-de.com&gt;" />
<person posts="1" size="3" who="desag002@attglobal.net" />
<person posts="1" size="3" who="&quot;Brian T. O'Neill&quot; &lt;btoneill@misplaced.net&gt;" />
<person posts="1" size="3" who="Dolgopolov Sergey &lt;virgo@azcher.kharkov.ua&gt;" />
<person posts="1" size="3" who="eriddle@linuxcare.com" />
<person posts="1" size="3" who="&quot;Klein, Christopher&quot; &lt;CKlein@s-3.com&gt;" />
<person posts="1" size="3" who="&quot;Lay, Malcolm&quot; &lt;Malcolm.Lay@Compaq.com&gt;" />
<person posts="1" size="3" who="Todd Sabin &lt;tas@webspan.net&gt;" />
<person posts="1" size="3" who="Maciej Kalisiak &lt;mac@dgp.toronto.edu&gt;" />
<person posts="1" size="3" who="John Parsons &lt;J.Parsons@eim.surrey.ac.uk&gt;" />
<person posts="1" size="3" who="Mauricio Tavares &lt;raub@gator.net&gt;" />
<person posts="1" size="3" who="Brian Stephens &lt;brian.stephens@sdrc.com&gt;" />
<person posts="1" size="3" who="Meir Many &lt;Meir.Many@orange.co.il&gt;" />
<person posts="1" size="3" who="Dan Larsson &lt;dl@tyfon.net&gt;" />
<person posts="1" size="3" who="christophe.lecoent@sagem.com" />
<person posts="1" size="3" who="kykmak@pland.gov.hk" />
<person posts="1" size="3" who="&lt;aczart@poczta.onet.pl&gt;" />
<person posts="1" size="3" who="&lt;aczartoryski@dns.wroc.pbp.com.pl&gt;" />
<person posts="1" size="3" who="Ken Robinson &lt;ksrobin@erenj.com&gt;" />
<person posts="1" size="3" who="Laurent BRIERE &lt;Laurent.briere@lambert-alcyon.com&gt;" />
<person posts="1" size="3" who="Jacob Rosenberg &lt;jacob@mail.nano.com&gt;" />
<person posts="1" size="3" who="Kubinszky Ferenc &lt;ferenc.kubinszky@wit.mht.bme.hu&gt;" />
<person posts="1" size="2" who="&quot;Dennis Prather&quot; &lt;dprather@dentoncompanies.net&gt;" />
<person posts="1" size="2" who="&quot;Milyukov Vadim V.&quot; &lt;MILE@ccssu.crimea.ua&gt;" />
<person posts="1" size="2" who="Glen Barwick &lt;Glen.Barwick@utas.edu.au&gt;" />
<person posts="1" size="2" who="&quot;Scott Burch&quot; &lt;scott@bulldoginfo.com&gt;" />
<person posts="1" size="2" who="Douglas Chor &lt;douglas@unitedhk.net&gt;" />
<person posts="1" size="2" who="&quot;urki&quot; &lt;elpiso@tauro.unex.es&gt;" />
<person posts="1" size="2" who="Jonniyuma@cs.com" />

</stats>

<section
  title="Tdb Diskspace Leak Fixed"
  author="John Quirk"
  contact="mailto:jq_quirk@hotmail.com"
  subject="2.2.0 tdb diskspace leak!"
  archive="http://lists.samba.org/pipermail/samba-technical/2000-December/010413.html"
  posts="4"
  startdate="12 Dec 2000 11:38:02 -0800"
  enddate="13 Dec 2000 08:41:52 -0800"
> 
<mention></mention>

<p>Richard Bollinger posted the following:</p>

<quote who="Richard Bollinger">

<p>
Contrary to prior messages regarding the unbounded growth of
"unexpected.tdb", it is _not_ growing to a high water mark.  A quick dump of
the file running on our test Solaris server shows its full of "dead"
entries, not freed ones.  tdbutil shows nothing on the "free list".
Identical results are showing on our Linux server.</p>


<p> Something is going wrong in the process which is prunes out old entries,
preventing them from being freed in clear_unexpected() -&gt; traverse_fn
() -&gt; tdb_delete() -&gt; do_delete() .  The code in do_delete() checks
to see if someone is traversing that record (apparently always true in
this instance) and marks it "dead" rather than really deleting the entry.
Thus the file grows indefinitely.  Someone who understand the tdb logic may
offer a simple cure?  </p>

</quote>



<p>Jeremy Allison thanked Richard for his report and said he would work on
it ASAP . Later, he came back with:</p>

<quote who="Jeremy Allison">

<p>
I've finally fixed this (it took a while :-). Please check
out the CVS and try again.</p>

<p>Thanks for reporting this one !
</p>

</quote>

<p>Richard replied this change had fixed his problems. </p>

</section>

<section
  title="DocBook Conversion"
  author="Zack Brown"
  contact="mailto:zbrown@tumblerings.org"
  subject="Docu status"
  archive=""
  posts="10"
  startdate="13 Dec 2000 10:16:02 -0800"
  enddate="17 Dec 2000 17:22:08 -0800"
>

<mention>David Bannon</mention>
<mention></mention>

<p>on samba-docs, James Moore noticed there had been very little traffic on
that list since he'd joined a week before, and volunteered to help with the
DocBook translation. He suggested, <quote who="James Moore">I can set up a
self contained manual with everything we will need so the docs can just be
built using: autoconf, ./configure, make &lt;doc_type&gt;.</quote> Gerald
Carter was happy to find a new interested volunteer, and replied regarding
James' suggestion:</p>

<quote who="Gerald Carter">

<p>I like this.  David Bannon has been working on converting a HOWTO and
FAQ over to DocBook/SGML.  These have been sort of a proof of concept.</p>

<p>David, How does this sound to you?  No more checking in HTML and
Text versions.  Only SGML files with the real docs built by users and/or
vendors?</p>

</quote>

<p>After a bit more discussion Gerald and James agreed to speak some more
offline and possibly set it up.</p>

</section>

<section
  title="Confusion With mktmp() Libary Call"
  author="John Quirk"
  contact="mailto:jq_quirk@hotmail.com"
  subject="warnings on compile"
  archive="http://lists.samba.org/pipermail/samba-technical/2000-December/010438.html"
  posts="12"
  startdate="14 Dec 2000 11:57:11 -0800"
  enddate="18 Dec 2000 00:54:02 -0800"
> 

<mention></mention>
<mention>Robert Dahlem</mention>

<p>Christopher Klein posted a question about a warning he was seeing. He
said, <quote who="Christopher Klein">I am trying to install samba on an ftp
server running freebsd 4.1 I am getting the following warning repeated many
times on the initial make ... <em>Warning: mktemp() possibly used unsafely;
consider using mkstemp</em>.</quote> Jeremy Allison replied:</p>

<quote who="Jeremy Allison">

<p>
The warning is wrong. mktemp is being used securely in Samba.</p>

<p>Every use of the generated filename uses the O_EXCL flag,
which prevents /tmp races.</p>

<p>mkstemp doesn't do what we need here, as it returns a file
descriptor which is not what we want - we want a filename
that is *potentially* unique. We take care of the security
issue ourselves.
</p>

</quote>

<p>Tim Potter posted a clarification:</p>

<quote who="Tim Potter">
<p>
Well the warning is technically right - mktmp() may *possibly* be
used unsafely but it isn't in this case.  (-:
</p>

<p>
It's a pretty annoying error though.  I wonder if it's possible
to patch gcc to determine whether the O_EXCL flag is not being
used and then print out the warning rather than always doing it.
</p>
</quote>

<p>This started a discussion about how this is checked and what proof there
is that the code is in fact correct and the need to call an external mktmp()
function as smbd_mktemp() is doing similar work. Jeremy Allison said,
<quote who="Jeremy Allison">What I meant is that we grep for *every* use
of open/fopen and check that it cannot be used for mktemp races. It's not
so difficult.</quote></p>

<p>Kenichi Okuyama replied to Jeremy, <quote who="Kenichi
Okuyama">Ah... Jeremy. "It's not so difficult" is quite different from
"It'll never be difficult". I'm sure that you can do this work in very good
quality. But still, we have chance of sneeking the problem into the samba
code. And there is chance that you might miss the change.</quote></p>

<p>Also durring the discussion Kenichi Okuyama gave the list this
piece of Japanese folk lore:</p>

<quote who="Kenichi Okuyama">
<p>
[Binbou-Gami]: In Japan, there's said to be 8 Million Gods.
In those god, there's god name 'Binbou-Gami', he's god of poverty.
</p>

<p>What's so great about him, is that he can eat up entire resource of
any kind, no matter how you may earn it. Even if other GOD tries to
generate infinit resource, Binbou-Gami can waste all the resources
instantly.  He's one of the strongest God of all 8Millions.</p>

<p>So, if you believe in 'Binbou-Gami's existance, you should not think
about infinite resource, never. If you think there's no such a god,
.... well .... look at your wallet (^^;)</p>
</quote>

<p>Steve Langasek added, <quote who="Steve Langasek">Despite disagreeing with you about the divine nature of the Samba project
leaders :), it seems to me that pulling the mktemp code entirely into Samba
would be a good idea.  There's enough variation in the mktemp(), mkstemp(),
tmpnam(), etc. functions available on different Unices, and it's simple enough
to reimplement correctly, that it might just reduce the Samba code size to do
it all internally.</quote></p>

<p>Jeremy Allison replied that it sounded like a good idea and asked 
for volunteers.</p>

<p>Andrew Tridgell posted his thoughts on this issue:</p>

<quote who="Andrew Tridgell">

<p>
We continue to use mktemp() because the alternatives are worse.
</p>

<p>If we switched to using something based on mkstemp() then we would
actually open up a security hole! That is because some platforms open
the file in mkstemp() with permissions of 0666, which allows an
attacker to modify the file contents. That's why recent Linux man
pages recommend NOT using mkstemp() and instead using tmpfile().
</p>

<p>So now of couse people will ask why we don't use tmpfile(). We don't
because it is fundamentally broken as it uses a FILE* pointer. On some
major platforms FILE* is limited to 8 bit file descriptors which means
tmpfile() would fail when Samba has more than 255 files open. Not
good.
</p>

<p>Despite the stupid compiler warnings mktemp() (when used properly) is
the most secure option available. When something better comes along we
can consider using it, but meanwhile just put up with the stupid
compiler warnings.</p>

</quote>

<p>Kenichi Okuyama felt that Andrew's statements reinforced the need to
write a samba version of this libary call. Robert Dahlem noted that there
might be a memory leak in Kenichi contribution. There where no further post
to this thread.</p>


</section>

<section
  title="BugTraq Exploit Discussion"
  author="Zack Brown"
  contact="mailto:zbrown@tumblerings.org"
  subject="BugTraq Post: Symlink attack in (all?) Samba. - Local root walkthrough by Tozz"
  archive=""
  posts="7"
  startdate="14 Dec 2000 21:54:17 -0800"
  enddate="17 Dec 2000 16:17:47 -0800"
>

<mention></mention>

<p>Scott Gifford forwarded a post from BugTraq:</p>

<quote who="Scott Gifford">

<p>Requirements:</p>

<p>

<ul>

<li>Shell access or any other way to create symlinks</li>

<li>A running samba deamon</li>

<li>The username and/or password of a user named in the
  admin lists in one or more shares.</li>

<li>Brains are not required.</li>

</ul>

</p>

<p>By default, Samba (http://www.samba.org) followes symlinks, which can
lead to root promises. Here is an example:</p>

<p>I have a guy that sorts out all my uploads through SMB, he has 'admin'
access (admin users = username).. This means he will work as UID 0 (root).</p>

<p>e.g. we have this share in /etc/smb.conf</p>

<p>

[uploads]<br />
 path = /home/ftp/incoming<br />
 comment = Uploads that came through anon ftp<br />
 guest ok = no<br />
 writeable = no<br />
 force create mode = 0755<br />
 force directory mode = 0755<br />
 admin users = warezmaster

</p>

<p>Login to the shell, or find some other way to create symlinks and create
a symlink in /home/ftp/incoming you do something like</p>

<p>ln /etc -s</p>

<p>now type on you're box (local or remote works both): smbclient
file://foobar.com/uploads -U warezmaster it will ask for a password, enter
it and you will get something like</p>

<p>smb\:&gt;</p>

<p>There we go</p>

<p>

smb\:&gt;cd etc<br />
smb\:&gt;get shadow<br />
smb\:&gt;exit<br />

</p>

<p>[root@embrace /root]<br />
now you downloaded the shadow file on you're localbox
edit it, change you're UID to 0, or remove the password
from the root account (no password required at logon)</p>

<p>login with smbclient again</p>

<p>smbclient file://foobar.com/uploads -U warezmaster
enter the password</p>

<p>and reupload</p>

<p>

smb\:&gt;cd etc<br />
smb\:&gt;put shadow<br />
smb\:&gt;exit

</p>

<p>that's it, now login to the shell, if you changed you're own uid
you are now root. If you removed the password from root account
just su to it and you wont need a password.</p>

<p>Note:</p>

<p>The 'Follow Symlinks' can be turned off, but it's on by default.</p>

<p>Fix:</p>

<p>Disable Follow Symlinks</p>

</quote>

<p>Scott gave his take, saying:</p>

<quote who="Scott Gifford">

<p>I don't think that this "attack" is particularly surprising.  Basically,
he is leveraging a Samba "admin user" account into a UNIX root account,
using a symlink (created from a shell) to get outside of the share.</p>

<p>It seems to me like a "leveraging root to get root" attack, but I guess if
somebody had fileserver admins that were less trusted than their UNIX admins,
it could be an issue.</p>

</quote>

<p>Jeremy Allison replied:</p>

<quote who="Jeremy Allison">

<p>Crackers must be getting desparate if they post this kind of stuff. If
you've got an admin user account you are already root - why bother with all
this pathetic stuff - just copy a /bin/sh onto the share, logon locally and
run it from there.</p>

<p>Sometimes I wonder about these people. Don't they realise there are more
creative things to do than re-arranging bits on a disk when you already have
root permission :-).</p>

</quote>

<p>Robert Dahlem added with disdain:</p>

<quote who="Robert Dahlem">

<p>Too much twits on bugtraq. :-(</p>

<p>man smb.conf reveals (to everyones surprise): </p>

<blockquote>

<p>  admin users (S)</p>

<p>    This is a list of users who will be granted administrative
    privileges on the share. This means that they will do all file operations
    as the super-user (root).</p>

<p>    You should use this option very carefully, as any user in this
    list will be able to do anything they like on the share, irrespective
    of file permissions.</p>

</blockquote>

<p>I stopped reading bugtraq a while ago. Every second script kid thinks he
were Guninski.</p>

</quote>

</section>

</kc>

