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"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></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"><<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>></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>
|
---|
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="id2689135"></a>HPUX</h2></div></div></div><p>
|
---|
7 | <a class="indexterm" name="id2689143"></a>
|
---|
8 | <a class="indexterm" name="id2689150"></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="id2689221"></a>
|
---|
27 | <a class="indexterm" name="id2689227"></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="id2689239"></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 class="ulink" 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="id2689278"></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="id2689420"></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="id2689445"></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="id2689463"></a>AIX: Sequential Read Ahead</h2></div></div></div><p>
|
---|
119 | Disabling sequential read ahead can improve Samba performance significantly
|
---|
120 | when there is a relatively high level of multiprogramming (many smbd processes
|
---|
121 | or mixed with another workload), not an abundance of physical memory or slower
|
---|
122 | disk technology. These can cause AIX to have a higher WAIT values. Disabling
|
---|
123 | sequential read-ahead can also have an adverse affect on other workloads in the
|
---|
124 | system so you will need to evaluate other applications for impact.
|
---|
125 | </p><p>
|
---|
126 | It is recommended to use the defaults provided by IBM, but if you experience a
|
---|
127 | high amount of wait time, try disabling read-ahead with the following commands:
|
---|
128 | </p><p>
|
---|
129 | For AIX 5.1 and earlier: <strong class="userinput"><code>vmtune -r 0</code></strong>
|
---|
130 | </p><p>
|
---|
131 | For AIX 5.2 and later jfs filesystems: <strong class="userinput"><code>ioo -o minpgahead=0</code></strong>
|
---|
132 | </p><p>
|
---|
133 | For AIX 5.2 and later jfs2 filesystems: <strong class="userinput"><code>ioo -o j2_minPageReadAhead=0</code></strong>
|
---|
134 | </p><p>
|
---|
135 | If you have a mix of jfs and jfs2 filesystems on the same host, simply use both
|
---|
136 | ioo 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
|
---|
138 | when running Samba on Solaris. The built-in file-locking mechanism was
|
---|
139 | not scalable. Performance would degrade to the point where processes would
|
---|
140 | get into loops of trying to lock a file. It would try a lock, then fail,
|
---|
141 | then try again. The lock attempt was failing before the grant was
|
---|
142 | occurring. The visible manifestation of this was a handful of
|
---|
143 | processes stealing all of the CPU, and when they were trussed, they would
|
---|
144 | be stuck in F_SETLKW64 loops.
|
---|
145 | </p><p>
|
---|
146 | Please check with Sun support for current patches needed to fix this bug.
|
---|
147 | The patch revision for 2.6 is 105181-34, for 8 is 108528-19, and for 9 is 112233-04.
|
---|
148 | After the installation of these patches, it is recommended to reconfigure
|
---|
149 | and 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>
|
---|
151 | Nsswitch on Solaris 9 refuses to use the Winbind NSS module. This behavior
|
---|
152 | is fixed by Sun in patch <a class="ulink" href="http://sunsolve.sun.com/search/advsearch.do?collection=PATCH&type=collections&max=50&language=en&queryKey5=112960;rev=14&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>
|
---|