1 <chapter id=
"Portability">
6 <title>Portability
</title>
8 <para>Samba works on a wide range of platforms but the interface all the
9 platforms provide is not always compatible. This chapter contains
10 platform-specific information about compiling and using samba.
</para>
16 HP's implementation of supplementary groups is, er, non-standard (for
17 hysterical reasons). There are two group files, /etc/group and
18 /etc/logingroup; the system maps UIDs to numbers using the former, but
19 initgroups() reads the latter. Most system admins who know the ropes
20 symlink /etc/group to /etc/logingroup (hard link doesn't work for reasons
21 too stupid to go into here). initgroups() will complain if one of the
22 groups you're in in /etc/logingroup has what it considers to be an invalid
23 ID, which means outside the range [
0..UID_MAX], where UID_MAX is (I think)
24 60000 currently on HP-UX. This precludes -
2 and
65534, the usual 'nobody'
29 If you encounter this problem, make sure that the programs that are failing
30 to initgroups() be run as users not in any groups with GIDs outside the
34 <para>This is documented in the HP manual pages under setgroups(
2) and passwd(
4).
38 On HPUX you must use gcc or the HP Ansi compiler. The free compiler
39 that comes with HP-UX is not Ansi compliant and cannot compile
46 <title>SCO Unix
</title>
49 If you run an old version of SCO Unix then you may need to get important
50 TCP/IP patches for Samba to work correctly. Without the patch, you may
51 encounter corrupt data transfers using samba.
55 The patch you need is UOD385 Connection Drivers SLS. It is available from
56 SCO (ftp.sco.com, directory SLS, files uod385a.Z and uod385a.ltr.Z).
65 DNIX has a problem with seteuid() and setegid(). These routines are
66 needed for Samba to work correctly, but they were left out of the DNIX
67 C library for some reason.
71 For this reason Samba by default defines the macro NO_EID in the DNIX
72 section of includes.h. This works around the problem in a limited way,
73 but it is far from ideal, some things still won't work right.
77 To fix the problem properly you need to assemble the following two
78 functions and then either add them to your C library or link them into
83 put this in the file
<filename>setegid.s
</filename>:
86 <para><programlisting>
99 </programlisting></para>
102 put this in the file
<filename>seteuid.s
</filename>:
105 <para><programlisting>
118 </programlisting></para>
121 after creating the above files you then assemble them using
124 <para><command>as seteuid.s
</command></para>
125 <para><command>as setegid.s
</command></para>
128 that should produce the files
<filename>seteuid.o
</filename> and
129 <filename>setegid.o
</filename>
133 then you need to add these to the LIBSM line in the DNIX section of
134 the Samba Makefile. Your LIBSM line will then look something like this:
137 <para><programlisting>
138 LIBSM = setegid.o seteuid.o -ln
139 </programlisting></para>
142 You should then remove the line:
145 <para><programlisting>
147 </programlisting></para>
149 <para>from the DNIX section of
<filename>includes.h
</filename></para>
154 <title>RedHat Linux Rembrandt-II
</title>
157 By default RedHat Rembrandt-II during installation adds an
158 entry to /etc/hosts as follows:
160 127.0.0.1 loopback
"hostname".
"domainname"
165 This causes Samba to loop back onto the loopback interface.
166 The result is that Samba fails to communicate correctly with
167 the world and therefor may fail to correctly negotiate who
168 is the master browse list holder and who is the master browser.
172 Corrective Action: Delete the entry after the word loopback
173 in the line starting
127.0.0.1
180 <title>Sequential Read Ahead
</title>
181 <!-- From an email by William Jojo <jojowil@hvcc.edu> -->
183 Disabling Sequential Read Ahead using
<userinput>vmtune -r
0</userinput> improves
184 samba performance significally.
190 <title>Solaris
</title>
193 <title>Locking improvements
</title>
195 <para>Some people have been experiencing problems with F_SETLKW64/fcntl
196 when running samba on solaris. The built in file locking mechanism was
197 not scalable. Performance would degrade to the point where processes would
198 get into loops of trying to lock a file. It woul try a lock, then fail,
199 then try again. The lock attempt was failing before the grant was
200 occurring. So the visible manifestation of this would be a handful of
201 processes stealing all of the CPU, and when they were trussed they would
202 be stuck if F_SETLKW64 loops.
206 Sun released patches for Solaris
2.6,
8, and
9. The patch for Solaris
7
207 has not been released yet.
211 The patch revision for
2.6 is
105181-
34
213 and for
9 is
112233-
04
217 After the install of these patches it is recommended to reconfigure
221 <para>Thanks to Joe Meslovich for reporting
</para>
225 <sect2 id=
"winbind-solaris9">
226 <title>Winbind on Solaris
9</title>
228 Nsswitch on Solaris
9 refuses to use the winbind nss module. This behavior
229 is fixed by Sun in patch
113476-
05 which as of March
2003 is not in any