Docbook XML conversion: manpages
[Samba/gebeck_regimport.git] / docs / docbook / projdoc / Portability.sgml
blob72c3d205471fab219a3032ec1a0a33c89aa578cc
1 <chapter id="Portability">
2 <chapterinfo>
3 &author.jelmer;
4 </chapterinfo>
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>
12 <sect1>
13 <title>HPUX</title>
15 <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'
25 GIDs.
26 </para>
28 <para>
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
31 allowed range.
32 </para>
34 <para>This is documented in the HP manual pages under setgroups(2) and passwd(4).
35 </para>
37 <para>
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
40 Samba.
41 </para>
43 </sect1>
45 <sect1>
46 <title>SCO Unix</title>
48 <para>
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.
52 </para>
54 <para>
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).
57 </para>
59 </sect1>
61 <sect1>
62 <title>DNIX</title>
64 <para>
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.
68 </para>
70 <para>
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.
74 </para>
76 <para>
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
79 Samba.
80 </para>
82 <para>
83 put this in the file <filename>setegid.s</filename>:
84 </para>
86 <para><programlisting>
87 .globl _setegid
88 _setegid:
89 moveq #47,d0
90 movl #100,a0
91 moveq #1,d1
92 movl 4(sp),a1
93 trap #9
94 bccs 1$
95 jmp cerror
96 1$:
97 clrl d0
98 rts
99 </programlisting></para>
101 <para>
102 put this in the file <filename>seteuid.s</filename>:
103 </para>
105 <para><programlisting>
106 .globl _seteuid
107 _seteuid:
108 moveq #47,d0
109 movl #100,a0
110 moveq #0,d1
111 movl 4(sp),a1
112 trap #9
113 bccs 1$
114 jmp cerror
116 clrl d0
118 </programlisting></para>
120 <para>
121 after creating the above files you then assemble them using
122 </para>
124 <para><command>as seteuid.s</command></para>
125 <para><command>as setegid.s</command></para>
127 <para>
128 that should produce the files <filename>seteuid.o</filename> and
129 <filename>setegid.o</filename>
130 </para>
132 <para>
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:
135 </para>
137 <para><programlisting>
138 LIBSM = setegid.o seteuid.o -ln
139 </programlisting></para>
141 <para>
142 You should then remove the line:
143 </para>
145 <para><programlisting>
146 #define NO_EID
147 </programlisting></para>
149 <para>from the DNIX section of <filename>includes.h</filename></para>
151 </sect1>
153 <sect1>
154 <title>RedHat Linux Rembrandt-II</title>
156 <para>
157 By default RedHat Rembrandt-II during installation adds an
158 entry to /etc/hosts as follows:
159 <programlisting>
160 127.0.0.1 loopback "hostname"."domainname"
161 </programlisting>
162 </para>
164 <para>
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.
169 </para>
171 <para>
172 Corrective Action: Delete the entry after the word loopback
173 in the line starting 127.0.0.1
174 </para>
175 </sect1>
177 <sect1>
178 <title>AIX</title>
179 <sect2>
180 <title>Sequential Read Ahead</title>
181 <!-- From an email by William Jojo <jojowil@hvcc.edu> -->
182 <para>
183 Disabling Sequential Read Ahead using <userinput>vmtune -r 0</userinput> improves
184 samba performance significally.
185 </para>
186 </sect2>
187 </sect1>
189 <sect1>
190 <title>Solaris</title>
192 <sect2>
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.
203 </para>
205 <para>
206 Sun released patches for Solaris 2.6, 8, and 9. The patch for Solaris 7
207 has not been released yet.
208 </para>
210 <para>
211 The patch revision for 2.6 is 105181-34
212 for 8 is 108528-19
213 and for 9 is 112233-04
214 </para>
216 <para>
217 After the install of these patches it is recommended to reconfigure
218 and rebuild samba.
219 </para>
221 <para>Thanks to Joe Meslovich for reporting</para>
223 </sect2>
225 <sect2 id="winbind-solaris9">
226 <title>Winbind on Solaris 9</title>
227 <para>
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
230 roll-up packages.
231 </para>
232 </sect2>
233 </sect1>
235 </chapter>