~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to docs/htmldocs/Samba3-HOWTO/bugreport.html

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-01-29 06:16:15 UTC
  • mfrom: (0.27.9 upstream) (0.34.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100129061615-37hs6xqpsdhjq3ld
Tags: 2:3.4.5~dfsg-1ubuntu1
* Merge from debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - Add "(Samba, Ubuntu)" to server string.
    - Comment out the default [homes] share, and add a comment about "valid users = %s"
      to show users how to restrict access to \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are allowed to create
      public shares in additon to authenticated ones.
    - add map to guest = Bad user, maps bad username to gues access.
  + debian/samba-common.conf:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control: 
    - Make libswbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb, since its not in main yet.
  + debian/rules:
    - Enable "native" PIE hardening.
    - Add BIND_NOW to maximize benefit of RELRO hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile.
    - debian/rules, debian/samba.dirs, debian/samba.files: install
  + Add apoort hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + debian/rules, debian/samba.if-up: allow "NetworkManager" as a recognized address
    family... it's obviously /not/ an address family, but it's what gets
    sent when using NM, so we'll cope for now.  (LP: #462169). Taken from karmic-proposed.
  + debian/control: Recommend keyutils for smbfs (LP: #493565)
  + Dropped patches:
    - debian/patches/security-CVE-2009-3297.patch: No longer needed
    - debian/patches/fix-too-many-open-files.patch: No longer needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�40.�Reporting Bugs</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="The Official Samba 3.4.x HOWTO and Reference Guide"><link rel="up" href="troubleshooting.html" title="Part�V.�Troubleshooting"><link rel="prev" href="problems.html" title="Chapter�39.�Analyzing and Solving Samba Problems"><link rel="next" href="tdb.html" title="Chapter�41.�Managing TDB Files"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�40.�Reporting Bugs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="problems.html">Prev</a>�</td><th width="60%" align="center">Part�V.�Troubleshooting</th><td width="20%" align="right">�<a accesskey="n" href="tdb.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="bugreport"></a>Chapter�40.�Reporting Bugs</h2></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="orgname">Samba Team</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="orgname">The Samba Team</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="orgname">Samba Team</span> <span class="surname">Tridgell</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:tridge@samba.org">tridge@samba.org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate"> 27 June 1997 </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bugreport.html#id2686050">Introduction</a></span></dt><dt><span class="sect1"><a href="bugreport.html#id2686140">General Information</a></span></dt><dt><span class="sect1"><a href="bugreport.html#dbglvl">Debug Levels</a></span></dt><dd><dl><dt><span class="sect2"><a href="bugreport.html#id2686375">Debugging-Specific Operations</a></span></dt></dl></dd><dt><span class="sect1"><a href="bugreport.html#id2686577">Internal Errors</a></span></dt><dt><span class="sect1"><a href="bugreport.html#id2686710">Attaching to a Running Process</a></span></dt><dt><span class="sect1"><a href="bugreport.html#id2686836">Patches</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2686050"></a>Introduction</h2></div></div></div><p>
2
 
<a class="indexterm" name="id2686058"></a>
3
 
<a class="indexterm" name="id2686065"></a>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�40.�Reporting Bugs</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The Official Samba 3.4.x HOWTO and Reference Guide"><link rel="up" href="troubleshooting.html" title="Part�V.�Troubleshooting"><link rel="prev" href="problems.html" title="Chapter�39.�Analyzing and Solving Samba Problems"><link rel="next" href="tdb.html" title="Chapter�41.�Managing TDB Files"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�40.�Reporting Bugs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="problems.html">Prev</a>�</td><th width="60%" align="center">Part�V.�Troubleshooting</th><td width="20%" align="right">�<a accesskey="n" href="tdb.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter�40.�Reporting Bugs"><div class="titlepage"><div><div><h2 class="title"><a name="bugreport"></a>Chapter�40.�Reporting Bugs</h2></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:tridge@samba.org">tridge@samba.org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate"> 27 June 1997 </p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="bugreport.html#id2692107">Introduction</a></span></dt><dt><span class="sect1"><a href="bugreport.html#id2692196">General Information</a></span></dt><dt><span class="sect1"><a href="bugreport.html#dbglvl">Debug Levels</a></span></dt><dd><dl><dt><span class="sect2"><a href="bugreport.html#id2692432">Debugging-Specific Operations</a></span></dt></dl></dd><dt><span class="sect1"><a href="bugreport.html#id2692634">Internal Errors</a></span></dt><dt><span class="sect1"><a href="bugreport.html#id2692767">Attaching to a Running Process</a></span></dt><dt><span class="sect1"><a href="bugreport.html#id2692892">Patches</a></span></dt></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2692107"></a>Introduction</h2></div></div></div><p>
 
2
<a class="indexterm" name="id2692115"></a>
 
3
<a class="indexterm" name="id2692122"></a>
4
4
Please report bugs using Samba's <a class="ulink" href="https://bugzilla.samba.org/" target="_top">Bugzilla</a> facilities and take
5
5
the time to read this file before you submit a bug report. Also, check to see if it has changed between
6
6
releases, as we may be changing the bug reporting mechanism at some point.
9
9
bug. Samba is maintained by a dedicated group of people who volunteer
10
10
their time, skills, and efforts. We receive far more mail than
11
11
we can possibly answer, so you have a much higher chance of a response
12
 
and a fix if you send us a &#8220;<span class="quote">developer-friendly</span>&#8221; bug report that lets
 
12
and a fix if you send us a <span class="quote">&#8220;<span class="quote">developer-friendly</span>&#8221;</span> bug report that lets
13
13
us fix it fast. 
14
14
</p><p>
15
 
<a class="indexterm" name="id2686098"></a>
16
 
<a class="indexterm" name="id2686105"></a>
17
 
<a class="indexterm" name="id2686111"></a>
 
15
<a class="indexterm" name="id2692154"></a>
 
16
<a class="indexterm" name="id2692161"></a>
 
17
<a class="indexterm" name="id2692168"></a>
18
18
If you post the bug to the comp.protocols.smb
19
19
newsgroup or the mailing list, do not assume that we will read it. If you suspect that your 
20
20
problem is not a bug but a configuration problem, it is better to send 
24
24
You may also like to look though the recent mailing list archives,
25
25
which are conveniently accessible on the Samba Web pages
26
26
at <a class="ulink" href="http://samba.org/samba/" target="_top">http://samba.org/samba/</a>.
27
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2686140"></a>General Information</h2></div></div></div><p>
 
27
</p></div><div class="sect1" title="General Information"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2692196"></a>General Information</h2></div></div></div><p>
28
28
Before submitting a bug report, check your config for silly
29
29
errors. Look in your log files for obvious messages that tell
30
30
you've misconfigured something. Run testparm to check your config
35
35
If you include part of a log file with your bug report, then be sure to
36
36
annotate it with exactly what you were doing on the client at the
37
37
time and exactly what the results were.
38
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dbglvl"></a>Debug Levels</h2></div></div></div><p>
 
38
</p></div><div class="sect1" title="Debug Levels"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dbglvl"></a>Debug Levels</h2></div></div></div><p>
39
39
If the bug has anything to do with Samba behaving incorrectly as a
40
40
server (like refusing to open a file), then the log files will probably
41
41
be quite useful. Depending on the problem, a log level of between 3 and
42
42
10 showing the problem may be appropriate. A higher level gives more
43
43
detail but may use too much disk space.
44
44
</p><p>
45
 
<a class="indexterm" name="id2686191"></a>
46
 
<a class="indexterm" name="id2686198"></a>
 
45
<a class="indexterm" name="id2692248"></a>
 
46
<a class="indexterm" name="id2692255"></a>
47
47
To set the debug level, use the <a class="link" href="smb.conf.5.html#LOGLEVEL" target="_top">log level</a> in your 
48
48
<code class="filename">smb.conf</code>. You may also find it useful to set the log 
49
49
level higher for just one machine and keep separate logs for each machine. 
50
50
To do this, add the following lines to your main <code class="filename">smb.conf</code> file:
51
 
</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2686238"></a><em class="parameter"><code>log level = 10</code></em></td></tr><tr><td><a class="indexterm" name="id2686250"></a><em class="parameter"><code>log file = /usr/local/samba/lib/log.%m</code></em></td></tr><tr><td><a class="indexterm" name="id2686261"></a><em class="parameter"><code>include = /usr/local/samba/lib/smb.conf.%m</code></em></td></tr></table><p>
 
51
</p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id2692295"></a><em class="parameter"><code>log level = 10</code></em></td></tr><tr><td><a class="indexterm" name="id2692307"></a><em class="parameter"><code>log file = /usr/local/samba/lib/log.%m</code></em></td></tr><tr><td><a class="indexterm" name="id2692318"></a><em class="parameter"><code>include = /usr/local/samba/lib/smb.conf.%m</code></em></td></tr></table><p>
52
52
and create a file <code class="filename">/usr/local/samba/lib/smb.conf.<em class="replaceable"><code>machine</code></em></code> where
53
53
<em class="replaceable"><code>machine</code></em> is the name of the client you wish to debug. In that file put any
54
54
<code class="filename">smb.conf</code> commands you want; for example, <a class="link" href="smb.conf.5.html#LOGLEVEL" target="_top">log level</a> may be useful. This also allows
61
61
debugging information. For most debugging operations, you may not need a setting higher than
62
62
<code class="constant">3</code>. Nearly all bugs can be tracked at a setting of <code class="constant">10</code>, but be
63
63
prepared for a large volume of log data.
64
 
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2686375"></a>Debugging-Specific Operations</h3></div></div></div><p>
65
 
<a class="indexterm" name="id2686383"></a>
66
 
<a class="indexterm" name="id2686390"></a>
67
 
<a class="indexterm" name="id2686397"></a>
68
 
<a class="indexterm" name="id2686404"></a>
 
64
</p><div class="sect2" title="Debugging-Specific Operations"><div class="titlepage"><div><div><h3 class="title"><a name="id2692432"></a>Debugging-Specific Operations</h3></div></div></div><p>
 
65
<a class="indexterm" name="id2692440"></a>
 
66
<a class="indexterm" name="id2692446"></a>
 
67
<a class="indexterm" name="id2692453"></a>
 
68
<a class="indexterm" name="id2692460"></a>
69
69
        Samba-3.x permits debugging (logging) of specific functional components without unnecessarily
70
70
        cluttering the log files with detailed logs for all operations. An example configuration to 
71
71
        achieve this is shown in:
72
72
        </p><p>
73
 
</p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2686423"></a><em class="parameter"><code>log level = 0 tdb:3 passdb:5 auth:4 vfs:2</code></em></td></tr><tr><td><a class="indexterm" name="id2686434"></a><em class="parameter"><code>max log size = 0</code></em></td></tr><tr><td><a class="indexterm" name="id2686446"></a><em class="parameter"><code>log file = /var/log/samba/%U.%m.log</code></em></td></tr></table><p>
 
73
</p><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id2692480"></a><em class="parameter"><code>log level = 0 tdb:3 passdb:5 auth:4 vfs:2</code></em></td></tr><tr><td><a class="indexterm" name="id2692491"></a><em class="parameter"><code>max log size = 0</code></em></td></tr><tr><td><a class="indexterm" name="id2692502"></a><em class="parameter"><code>log file = /var/log/samba/%U.%m.log</code></em></td></tr></table><p>
74
74
</p><p>
75
75
        This will cause the level of detail to be expanded to the debug class (log level) passed to
76
76
        each functional area per the value shown above. The first value passed to the <em class="parameter"><code>log level</code></em>
77
77
        of <code class="constant">0</code> means turn off all unnecessary debugging except the debug classes set for
78
78
        the functional areas as specified. The table shown in <a class="link" href="bugreport.html#dbgclass" title="Table�40.1.�Debuggable Functions">Debuggable Functions</a>
79
79
        may be used to attain very precise analysis of each SMB operation Samba is conducting.
80
 
        </p><div class="table"><a name="dbgclass"></a><p class="title"><b>Table�40.1.�Debuggable Functions</b></p><div class="table-contents"><table summary="Debuggable Functions" border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Function Name</th><th align="center">Function Name</th></tr></thead><tbody><tr><td align="center">all</td><td align="center">passdb</td></tr><tr><td align="center">tdb</td><td align="center">sam</td></tr><tr><td align="center">printdrivers</td><td align="center">auth</td></tr><tr><td align="center">lanman</td><td align="center">winbind</td></tr><tr><td align="center">smb</td><td align="center">vfs</td></tr><tr><td align="center">rpc_parse</td><td align="center">idmap</td></tr><tr><td align="center">rpc_srv</td><td align="center">quota</td></tr><tr><td align="center">rpc_cli</td><td align="center">acls</td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2686577"></a>Internal Errors</h2></div></div></div><p>
81
 
If you get the message &#8220;<span class="quote"><span class="errorname">INTERNAL ERROR</span></span>&#8221; in your log files, 
 
80
        </p><div class="table"><a name="dbgclass"></a><p class="title"><b>Table�40.1.�Debuggable Functions</b></p><div class="table-contents"><table summary="Debuggable Functions" border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Function Name</th><th align="center">Function Name</th></tr></thead><tbody><tr><td align="center">all</td><td align="center">passdb</td></tr><tr><td align="center">tdb</td><td align="center">sam</td></tr><tr><td align="center">printdrivers</td><td align="center">auth</td></tr><tr><td align="center">lanman</td><td align="center">winbind</td></tr><tr><td align="center">smb</td><td align="center">vfs</td></tr><tr><td align="center">rpc_parse</td><td align="center">idmap</td></tr><tr><td align="center">rpc_srv</td><td align="center">quota</td></tr><tr><td align="center">rpc_cli</td><td align="center">acls</td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="sect1" title="Internal Errors"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2692634"></a>Internal Errors</h2></div></div></div><p>
 
81
If you get the message <span class="quote">&#8220;<span class="quote"><span class="errorname">INTERNAL ERROR</span></span>&#8221;</span> in your log files, 
82
82
it means that Samba got an unexpected signal while running. It is probably a
83
83
segmentation fault and almost certainly means a bug in Samba (unless
84
84
you have faulty hardware or system software).
91
91
You should also detail how to reproduce the problem, if
92
92
possible. Please make this reasonably detailed.
93
93
</p><p>
94
 
<a class="indexterm" name="id2686610"></a>
 
94
<a class="indexterm" name="id2692666"></a>
95
95
You may also find that a core file appeared in a <code class="filename">corefiles</code>
96
96
subdirectory of the directory where you keep your Samba log
97
97
files. This file is the most useful tool for tracking down the bug. To
98
98
use it, you do this:
99
 
<a class="indexterm" name="id2686626"></a>
100
 
<a class="indexterm" name="id2686632"></a>
 
99
<a class="indexterm" name="id2692682"></a>
 
100
<a class="indexterm" name="id2692689"></a>
101
101
</p><pre class="screen">
102
102
<code class="prompt">$ </code><strong class="userinput"><code>gdb smbd core</code></strong>
103
103
</pre><p>
104
104
</p><p>
105
 
<a class="indexterm" name="id2686658"></a>
106
 
<a class="indexterm" name="id2686665"></a>
 
105
<a class="indexterm" name="id2692715"></a>
 
106
<a class="indexterm" name="id2692721"></a>
107
107
adding appropriate paths to smbd and core so gdb can find them. If you
108
108
do not have gdb, try <strong class="userinput"><code>dbx</code></strong>. Then within the debugger,
109
109
use the command <code class="literal">where</code> to give a stack trace of where the
110
110
problem occurred. Include this in your report.
111
111
</p><p>
112
 
<a class="indexterm" name="id2686690"></a>
 
112
<a class="indexterm" name="id2692747"></a>
113
113
If you know any assembly language, do a <code class="literal">disass</code> of the routine
114
114
where the problem occurred (if it's in a library routine, then
115
115
disassemble the routine that called it) and try to work out exactly
116
116
where the problem is by looking at the surrounding code. Even if you
117
117
do not know assembly, including this information in the bug report can be
118
118
useful. 
119
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2686710"></a>Attaching to a Running Process</h2></div></div></div><p>
120
 
<a class="indexterm" name="id2686719"></a>
121
 
<a class="indexterm" name="id2686726"></a>
122
 
<a class="indexterm" name="id2686732"></a>
 
119
</p></div><div class="sect1" title="Attaching to a Running Process"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2692767"></a>Attaching to a Running Process</h2></div></div></div><p>
 
120
<a class="indexterm" name="id2692775"></a>
 
121
<a class="indexterm" name="id2692782"></a>
 
122
<a class="indexterm" name="id2692789"></a>
123
123
Unfortunately, some UNIXes (in particular some recent Linux kernels)
124
124
refuse to dump a core file if the task has changed UID (which smbd
125
125
does often). To debug with this sort of system, you could try to attach
145
145
</p><pre class="screen">
146
146
<code class="prompt">root# </code> gdb /usr/local/samba/sbin/smbd
147
147
</pre><p>
148
 
<a class="indexterm" name="id2686818"></a>
149
 
then &#8220;<span class="quote">attach `pid'</span>&#8221; (of the spinning process), then type &#8220;<span class="quote">bt</span>&#8221; to
 
148
<a class="indexterm" name="id2692874"></a>
 
149
then <span class="quote">&#8220;<span class="quote">attach `pid'</span>&#8221;</span> (of the spinning process), then type <span class="quote">&#8220;<span class="quote">bt</span>&#8221;</span> to
150
150
get a backtrace to see where the smbd is in the call path.
151
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2686836"></a>Patches</h2></div></div></div><p>
152
 
<a class="indexterm" name="id2686843"></a>
153
 
<a class="indexterm" name="id2686850"></a>
 
151
</p></div><div class="sect1" title="Patches"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2692892"></a>Patches</h2></div></div></div><p>
 
152
<a class="indexterm" name="id2692900"></a>
 
153
<a class="indexterm" name="id2692907"></a>
154
154
The best sort of bug report is one that includes a fix! If you send us
155
155
patches, please use <strong class="userinput"><code>diff -u</code></strong> format if your version of 
156
156
diff supports it; otherwise, use <strong class="userinput"><code>diff -c4</code></strong>. Make sure