source: branches/samba-3.2.x/docs/htmldocs/Samba3-HOWTO/Portability.html

Last change on this file was 335, checked in by Herwig Bauernfeind, 16 years ago

Update 3.2 to 3.2.14 (final)

File size: 12.2 KB
Line 
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 43. Portability</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.2.x HOWTO and Reference Guide"><link rel="up" href="Appendix.html" title="Part VI. Reference Section"><link rel="prev" href="compiling.html" title="Chapter 42. How to Compile Samba"><link rel="next" href="Other-Clients.html" title="Chapter 44. Samba and Other CIFS Clients"></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 43. Portability</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="compiling.html">Prev</a> </td><th width="60%" align="center">Part VI. Reference Section</th><td width="20%" align="right"> <a accesskey="n" href="Other-Clients.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Portability"></a>Chapter 43. Portability</h2></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">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><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="Portability.html#id2689135">HPUX</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2689239">SCO UNIX</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2689278">DNIX</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2689420">Red Hat Linux</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2689463">AIX: Sequential Read Ahead</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2689525">Solaris</a></span></dt><dd><dl><dt><span class="sect2"><a href="Portability.html#id2689530">Locking Improvements</a></span></dt><dt><span class="sect2"><a href="Portability.html#winbind-solaris9">Winbind on Solaris 9</a></span></dt></dl></dd></dl></div><p>
2<a class="indexterm" name="id2689117"></a>
3<a class="indexterm" name="id2689124"></a>
4Samba works on a wide range of platforms, but the interface all the
5platforms provide is not always compatible. This chapter contains
6platform-specific information about compiling and using Samba.</p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2689135"></a>HPUX</h2></div></div></div><p>
7<a class="indexterm" name="id2689143"></a>
8<a class="indexterm" name="id2689150"></a>
9Hewlett-Packard's implementation of supplementary groups is nonstandard (for
10historical reasons). There are two group files, <code class="filename">/etc/group</code> and
11<code class="filename">/etc/logingroup</code>; the system maps UIDs to numbers using the former, but
12initgroups() reads the latter. Most system admins who know the ropes
13symlink <code class="filename">/etc/group</code> to <code class="filename">/etc/logingroup</code>
14(hard-link does not work for reasons too obtuse to go into here). initgroups() will complain if one of the
15groups you're in, in <code class="filename">/etc/logingroup</code>, has what it considers to be an invalid
16ID, which means outside the range <code class="constant">[0..UID_MAX]</code>, where <code class="constant">UID_MAX</code> is
1760000 currently on HP-UX. This precludes -2 and 65534, the usual <code class="constant">nobody</code>
18GIDs.
19</p><p>
20If you encounter this problem, make sure the programs that are failing
21to initgroups() are run as users, not in any groups with GIDs outside the
22allowed range.
23</p><p>
24This is documented in the HP manual pages under setgroups(2) and passwd(4).
25</p><p>
26<a class="indexterm" name="id2689221"></a>
27<a class="indexterm" name="id2689227"></a>
28On HP-UX you must use gcc or the HP ANSI compiler. The free compiler
29that comes with HP-UX is not ANSI compliant and cannot compile Samba.
30</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2689239"></a>SCO UNIX</h2></div></div></div><p>
31If you run an old version of SCO UNIX, you may need to get important
32TCP/IP patches for Samba to work correctly. Without the patch, you may
33encounter corrupt data transfers using Samba.
34</p><p>
35The patch you need is UOD385 Connection Drivers SLS. It is available from
36SCO <a class="ulink" href="ftp://ftp.sco.com/" target="_top">ftp.sco.com</a>, directory SLS,
37files uod385a.Z and uod385a.ltr.Z).
38</p><p>
39The information provided here refers to an old version of SCO UNIX. If you require
40binaries for more recent SCO UNIX products, please contact SCO to obtain packages that are
41ready to install. You should also verify with SCO that your platform is up to date for the
42binary packages you will install. This is important if you wish to avoid data corruption
43problems with your installation. To build Samba for SCO UNIX products may
44require significant patching of Samba source code. It is much easier to obtain binary
45packages directly from SCO.
46</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2689278"></a>DNIX</h2></div></div></div><p>
47DNIX has a problem with seteuid() and setegid(). These routines are
48needed for Samba to work correctly, but they were left out of the DNIX
49C library for some reason.
50</p><p>
51For this reason Samba by default defines the macro NO_EID in the DNIX
52section of includes.h. This works around the problem in a limited way,
53but it is far from ideal, and some things still will not work right.
54</p><p>
55To fix the problem properly, you need to assemble the following two
56functions and then either add them to your C library or link them into
57Samba. Put the following in the file <code class="filename">setegid.s</code>:
58</p><pre class="programlisting">
59 .globl _setegid
60_setegid:
61 moveq #47,d0
62 movl #100,a0
63 moveq #1,d1
64 movl 4(sp),a1
65 trap #9
66 bccs 1$
67 jmp cerror
681$:
69 clrl d0
70 rts
71</pre><p>
72Put this in the file <code class="filename">seteuid.s</code>:
73</p><pre class="programlisting">
74 .globl _seteuid
75_seteuid:
76 moveq #47,d0
77 movl #100,a0
78 moveq #0,d1
79 movl 4(sp),a1
80 trap #9
81 bccs 1$
82 jmp cerror
831$:
84 clrl d0
85 rts
86</pre><p>
87After creating the files, you then assemble them using
88</p><pre class="screen">
89<code class="prompt">$ </code><strong class="userinput"><code>as seteuid.s</code></strong>
90<code class="prompt">$ </code><strong class="userinput"><code>as setegid.s</code></strong>
91</pre><p>
92which should produce the files <code class="filename">seteuid.o</code> and
93<code class="filename">setegid.o</code>.
94</p><p>
95Next you need to add these to the LIBSM line in the DNIX section of
96the Samba Makefile. Your LIBSM line will look something like this:
97</p><pre class="programlisting">
98LIBSM = setegid.o seteuid.o -ln
99</pre><p>
100You should then remove the line:
101</p><pre class="programlisting">
102#define NO_EID
103</pre><p>from the DNIX section of <code class="filename">includes.h</code>.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2689420"></a>Red Hat Linux</h2></div></div></div><p>
104By default during installation, some versions of Red Hat Linux add an
105entry to <code class="filename">/etc/hosts</code> as follows:
106</p><pre class="programlisting">
107127.0.0.1 loopback "hostname"."domainname"
108</pre><p>
109</p><p>
110<a class="indexterm" name="id2689445"></a>
111This causes Samba to loop back onto the loopback interface.
112The result is that Samba fails to communicate correctly with
113the world and therefore may fail to correctly negotiate who
114is the master browse list holder and who is the master browser.
115</p><p>
116Corrective action: Delete the entry after the word "loopback"
117in the line starting 127.0.0.1.
118</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2689463"></a>AIX: Sequential Read Ahead</h2></div></div></div><p>
119Disabling sequential read ahead can improve Samba performance significantly
120when there is a relatively high level of multiprogramming (many smbd processes
121or mixed with another workload), not an abundance of physical memory or slower
122disk technology. These can cause AIX to have a higher WAIT values. Disabling
123sequential read-ahead can also have an adverse affect on other workloads in the
124system so you will need to evaluate other applications for impact.
125</p><p>
126It is recommended to use the defaults provided by IBM, but if you experience a
127high amount of wait time, try disabling read-ahead with the following commands:
128</p><p>
129For AIX 5.1 and earlier: <strong class="userinput"><code>vmtune -r 0</code></strong>
130</p><p>
131For AIX 5.2 and later jfs filesystems: <strong class="userinput"><code>ioo -o minpgahead=0</code></strong>
132</p><p>
133For AIX 5.2 and later jfs2 filesystems: <strong class="userinput"><code>ioo -o j2_minPageReadAhead=0</code></strong>
134</p><p>
135If you have a mix of jfs and jfs2 filesystems on the same host, simply use both
136ioo commands.
137</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2689525"></a>Solaris</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2689530"></a>Locking Improvements</h3></div></div></div><p>Some people have been experiencing problems with F_SETLKW64/fcntl
138when running Samba on Solaris. The built-in file-locking mechanism was
139not scalable. Performance would degrade to the point where processes would
140get into loops of trying to lock a file. It would try a lock, then fail,
141then try again. The lock attempt was failing before the grant was
142occurring. The visible manifestation of this was a handful of
143processes stealing all of the CPU, and when they were trussed, they would
144be stuck in F_SETLKW64 loops.
145</p><p>
146Please check with Sun support for current patches needed to fix this bug.
147The patch revision for 2.6 is 105181-34, for 8 is 108528-19, and for 9 is 112233-04.
148After the installation of these patches, it is recommended to reconfigure
149and rebuild Samba.
150</p><p>Thanks to Joe Meslovich for reporting this.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="winbind-solaris9"></a>Winbind on Solaris 9</h3></div></div></div><p>
151Nsswitch on Solaris 9 refuses to use the Winbind NSS module. This behavior
152is fixed by Sun in patch <a class="ulink" href="http://sunsolve.sun.com/search/advsearch.do?collection=PATCH&amp;type=collections&amp;max=50&amp;language=en&amp;queryKey5=112960;rev=14&amp;toDocument=yes" target="_top">112960-14</a>.
153</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="compiling.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Appendix.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Other-Clients.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 42. How to Compile Samba </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 44. Samba and Other CIFS Clients</td></tr></table></div></body></html>
Note: See TracBrowser for help on using the repository browser.