Initial import
[samba] / docs / htmldocs / Samba3-HOWTO / Portability.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 41. Portability</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="The Official Samba-3 HOWTO and Reference Guide"><link rel="up" href="Appendix.html" title="Part VI. Reference Section"><link rel="prev" href="compiling.html" title="Chapter 40. How to Compile Samba"><link rel="next" href="Other-Clients.html" title="Chapter 42. 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 41. 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 41. Portability</h2></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 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="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a 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#id2654860">HPUX</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2654964">SCO UNIX</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2655003">DNIX</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2655145">Red Hat Linux</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2655188">AIX: Sequential Read Ahead</a></span></dt><dt><span class="sect1"><a href="Portability.html#id2655209">Solaris</a></span></dt><dd><dl><dt><span class="sect2"><a href="Portability.html#id2655215">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="id2654842"></a>
3 <a class="indexterm" name="id2654849"></a>
4 Samba works on a wide range of platforms, but the interface all the 
5 platforms provide is not always compatible. This chapter contains 
6 platform-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="id2654860"></a>HPUX</h2></div></div></div><p>
7 <a class="indexterm" name="id2654868"></a>
8 <a class="indexterm" name="id2654875"></a>
9 Hewlett-Packard's implementation of supplementary groups is nonstandard (for
10 historical 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
12 initgroups() reads the latter. Most system admins who know the ropes
13 symlink <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
15 groups you're in, in <code class="filename">/etc/logingroup</code>, has what it considers to be an invalid
16 ID, which means outside the range <code class="constant">[0..UID_MAX]</code>, where <code class="constant">UID_MAX</code> is
17 60000 currently on HP-UX. This precludes -2 and 65534, the usual <code class="constant">nobody</code>
18 GIDs.
19 </p><p>
20 If you encounter this problem, make sure the programs that are failing 
21 to initgroups() are run as users, not in any groups with GIDs outside the 
22 allowed range.
23 </p><p>
24 This is documented in the HP manual pages under setgroups(2) and passwd(4).
25 </p><p>
26 <a class="indexterm" name="id2654946"></a>
27 <a class="indexterm" name="id2654952"></a>
28 On HP-UX you must use gcc or the HP ANSI compiler. The free compiler
29 that 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="id2654964"></a>SCO UNIX</h2></div></div></div><p> 
31 If you run an old version of SCO UNIX, you may need to get important 
32 TCP/IP patches for Samba to work correctly. Without the patch, you may 
33 encounter corrupt data transfers using Samba.
34 </p><p>
35 The patch you need is UOD385 Connection Drivers SLS. It is available from
36 SCO <a href="ftp://ftp.sco.com/" target="_top">ftp.sco.com</a>, directory SLS,
37 files uod385a.Z and uod385a.ltr.Z).
38 </p><p>
39 The information provided here refers to an old version of SCO UNIX. If you require
40 binaries for more recent SCO UNIX products, please contact SCO to obtain packages that are
41 ready to install. You should also verify with SCO that your platform is up to date for the
42 binary packages you will install. This is important if you wish to avoid data corruption
43 problems with your installation. To build Samba for SCO UNIX products  may
44 require significant patching of Samba source code. It is much easier to obtain binary
45 packages directly from SCO.
46 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2655003"></a>DNIX</h2></div></div></div><p>
47 DNIX has a problem with seteuid() and setegid(). These routines are
48 needed for Samba to work correctly, but they were left out of the DNIX
49 C library for some reason.
50 </p><p>
51 For this reason Samba by default defines the macro NO_EID in the DNIX
52 section of includes.h. This works around the problem in a limited way,
53 but it is far from ideal, and some things still will not work right.
54 </p><p> 
55 To fix the problem properly, you need to assemble the following two
56 functions and then either add them to your C library or link them into
57 Samba. 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
68 1$:
69         clrl    d0
70         rts
71 </pre><p>
72 Put 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
83 1$:
84         clrl    d0
85         rts
86 </pre><p>
87 After 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>
92 which should produce the files <code class="filename">seteuid.o</code> and 
93 <code class="filename">setegid.o</code>.
94 </p><p>
95 Next you need to add these to the LIBSM line in the DNIX section of
96 the Samba Makefile. Your LIBSM line will look something like this:
97 </p><pre class="programlisting">
98 LIBSM = setegid.o seteuid.o -ln
99 </pre><p> 
100 You 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="id2655145"></a>Red Hat Linux</h2></div></div></div><p>
104 By default during installation, some versions of Red Hat Linux add an
105 entry to <code class="filename">/etc/hosts</code> as follows:
106 </p><pre class="programlisting">
107 127.0.0.1 loopback "hostname"."domainname"
108 </pre><p>
109 </p><p>
110 <a class="indexterm" name="id2655170"></a>
111 This causes Samba to loop back onto the loopback interface.
112 The result is that Samba fails to communicate correctly with
113 the world and therefore may fail to correctly negotiate who
114 is the master browse list holder and who is the master browser.
115 </p><p>
116 Corrective action: Delete the entry after the word "loopback"
117 in 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="id2655188"></a>AIX: Sequential Read Ahead</h2></div></div></div><p>
119 Disabling sequential read ahead using <strong class="userinput"><code>vmtune -r 0</code></strong> improves 
120 Samba performance significantly.
121 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2655209"></a>Solaris</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2655215"></a>Locking Improvements</h3></div></div></div><p>Some people have been experiencing problems with F_SETLKW64/fcntl 
122 when running Samba on Solaris. The built-in file-locking mechanism was
123 not scalable. Performance would degrade to the point where processes would
124 get into loops of trying to lock a file. It would try a lock, then fail,
125 then try again. The lock attempt was failing before the grant was
126 occurring. The visible manifestation of this was a handful of
127 processes stealing all of the CPU, and when they were trussed, they would
128 be stuck in F_SETLKW64 loops.
129 </p><p>
130 Please check with Sun support for current patches needed to fix this bug.
131 The patch revision for 2.6 is 105181-34, for 8 is 108528-19, and for 9 is 112233-04.
132 After the installation of these patches, it is recommended to reconfigure
133 and rebuild Samba.
134 </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>
135 Nsswitch on Solaris 9 refuses to use the Winbind NSS module. This behavior
136 is fixed by Sun in patch <a 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>.
137 </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 40. 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 42. Samba and Other CIFS Clients</td></tr></table></div></body></html>