syncing docs with HEAD
[samba.git] / docs / htmldocs / portability.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Portability</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
9 REL="HOME"
10 TITLE="SAMBA Project Documentation"
11 HREF="samba-howto-collection.html"><LINK
12 REL="UP"
13 TITLE="Appendixes"
14 HREF="appendixes.html"><LINK
15 REL="PREVIOUS"
16 TITLE="Appendixes"
17 HREF="appendixes.html"><LINK
18 REL="NEXT"
19 TITLE="Samba and other CIFS clients"
20 HREF="other-clients.html"></HEAD
21 ><BODY
22 CLASS="CHAPTER"
23 BGCOLOR="#FFFFFF"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 SUMMARY="Header navigation table"
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >SAMBA Project Documentation</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="appendixes.html"
49 ACCESSKEY="P"
50 >Prev</A
51 ></TD
52 ><TD
53 WIDTH="80%"
54 ALIGN="center"
55 VALIGN="bottom"
56 ></TD
57 ><TD
58 WIDTH="10%"
59 ALIGN="right"
60 VALIGN="bottom"
61 ><A
62 HREF="other-clients.html"
63 ACCESSKEY="N"
64 >Next</A
65 ></TD
66 ></TR
67 ></TABLE
68 ><HR
69 ALIGN="LEFT"
70 WIDTH="100%"></DIV
71 ><DIV
72 CLASS="CHAPTER"
73 ><H1
74 ><A
75 NAME="PORTABILITY"
76 ></A
77 >Chapter 24. Portability</H1
78 ><P
79 >Samba works on a wide range of platforms but the interface all the 
80 platforms provide is not always compatible. This chapter contains 
81 platform-specific information about compiling and using samba.</P
82 ><DIV
83 CLASS="SECT1"
84 ><H1
85 CLASS="SECT1"
86 ><A
87 NAME="AEN3198"
88 ></A
89 >24.1. HPUX</H1
90 ><P
91 >HP's implementation of supplementary groups is, er, non-standard (for
92 hysterical reasons).  There are two group files, /etc/group and
93 /etc/logingroup; the system maps UIDs to numbers using the former, but
94 initgroups() reads the latter.  Most system admins who know the ropes
95 symlink /etc/group to /etc/logingroup (hard link doesn't work for reasons
96 too stupid to go into here).  initgroups() will complain if one of the
97 groups you're in in /etc/logingroup has what it considers to be an invalid
98 ID, which means outside the range [0..UID_MAX], where UID_MAX is (I think)
99 60000 currently on HP-UX.  This precludes -2 and 65534, the usual 'nobody'
100 GIDs.</P
101 ><P
102 >If you encounter this problem, make sure that the programs that are failing 
103 to initgroups() be run as users not in any groups with GIDs outside the 
104 allowed range.</P
105 ><P
106 >This is documented in the HP manual pages under setgroups(2) and passwd(4).</P
107 ><P
108 >On HPUX you must use gcc or the HP Ansi compiler. The free compiler
109 that comes with HP-UX is not Ansi compliant and cannot compile
110 Samba.</P
111 ></DIV
112 ><DIV
113 CLASS="SECT1"
114 ><H1
115 CLASS="SECT1"
116 ><A
117 NAME="AEN3204"
118 ></A
119 >24.2. SCO Unix</H1
120 ><P
121
122 If you run an old version of  SCO Unix then you may need to get important 
123 TCP/IP patches for Samba to work correctly. Without the patch, you may 
124 encounter corrupt data transfers using samba.</P
125 ><P
126 >The patch you need is UOD385 Connection Drivers SLS. It is available from
127 SCO (ftp.sco.com, directory SLS, files uod385a.Z and uod385a.ltr.Z).</P
128 ></DIV
129 ><DIV
130 CLASS="SECT1"
131 ><H1
132 CLASS="SECT1"
133 ><A
134 NAME="AEN3208"
135 ></A
136 >24.3. DNIX</H1
137 ><P
138 >DNIX has a problem with seteuid() and setegid(). These routines are
139 needed for Samba to work correctly, but they were left out of the DNIX
140 C library for some reason.</P
141 ><P
142 >For this reason Samba by default defines the macro NO_EID in the DNIX
143 section of includes.h. This works around the problem in a limited way,
144 but it is far from ideal, some things still won't work right.</P
145 ><P
146
147 To fix the problem properly you need to assemble the following two
148 functions and then either add them to your C library or link them into
149 Samba.</P
150 ><P
151
152 put this in the file <TT
153 CLASS="FILENAME"
154 >setegid.s</TT
155 >:</P
156 ><P
157 ><PRE
158 CLASS="PROGRAMLISTING"
159 >        .globl  _setegid
160 _setegid:
161         moveq   #47,d0
162         movl    #100,a0
163         moveq   #1,d1
164         movl    4(sp),a1
165         trap    #9
166         bccs    1$
167         jmp     cerror
168 1$:
169         clrl    d0
170         rts</PRE
171 ></P
172 ><P
173 >put this in the file <TT
174 CLASS="FILENAME"
175 >seteuid.s</TT
176 >:</P
177 ><P
178 ><PRE
179 CLASS="PROGRAMLISTING"
180 >        .globl  _seteuid
181 _seteuid:
182         moveq   #47,d0
183         movl    #100,a0
184         moveq   #0,d1
185         movl    4(sp),a1
186         trap    #9
187         bccs    1$
188         jmp     cerror
189 1$:
190         clrl    d0
191         rts</PRE
192 ></P
193 ><P
194 >after creating the above files you then assemble them using</P
195 ><P
196 ><B
197 CLASS="COMMAND"
198 >as seteuid.s</B
199 ></P
200 ><P
201 ><B
202 CLASS="COMMAND"
203 >as setegid.s</B
204 ></P
205 ><P
206 >that should produce the files <TT
207 CLASS="FILENAME"
208 >seteuid.o</TT
209 > and 
210 <TT
211 CLASS="FILENAME"
212 >setegid.o</TT
213 ></P
214 ><P
215 >then you need to add these to the LIBSM line in the DNIX section of
216 the Samba Makefile. Your LIBSM line will then look something like this:</P
217 ><P
218 ><PRE
219 CLASS="PROGRAMLISTING"
220 >LIBSM = setegid.o seteuid.o -ln</PRE
221 ></P
222 ><P
223
224 You should then remove the line:</P
225 ><P
226 ><PRE
227 CLASS="PROGRAMLISTING"
228 >#define NO_EID</PRE
229 ></P
230 ><P
231 >from the DNIX section of <TT
232 CLASS="FILENAME"
233 >includes.h</TT
234 ></P
235 ></DIV
236 ><DIV
237 CLASS="SECT1"
238 ><H1
239 CLASS="SECT1"
240 ><A
241 NAME="AEN3237"
242 ></A
243 >24.4. RedHat Linux Rembrandt-II</H1
244 ><P
245 >By default RedHat Rembrandt-II during installation adds an
246 entry to /etc/hosts as follows:
247 <PRE
248 CLASS="PROGRAMLISTING"
249 >       127.0.0.1 loopback "hostname"."domainname"</PRE
250 ></P
251 ><P
252 >This causes Samba to loop back onto the loopback interface.
253 The result is that Samba fails to communicate correctly with
254 the world and therefor may fail to correctly negotiate who
255 is the master browse list holder and who is the master browser.</P
256 ><P
257 >Corrective Action:     Delete the entry after the word loopback
258         in the line starting 127.0.0.1</P
259 ></DIV
260 ></DIV
261 ><DIV
262 CLASS="NAVFOOTER"
263 ><HR
264 ALIGN="LEFT"
265 WIDTH="100%"><TABLE
266 SUMMARY="Footer navigation table"
267 WIDTH="100%"
268 BORDER="0"
269 CELLPADDING="0"
270 CELLSPACING="0"
271 ><TR
272 ><TD
273 WIDTH="33%"
274 ALIGN="left"
275 VALIGN="top"
276 ><A
277 HREF="appendixes.html"
278 ACCESSKEY="P"
279 >Prev</A
280 ></TD
281 ><TD
282 WIDTH="34%"
283 ALIGN="center"
284 VALIGN="top"
285 ><A
286 HREF="samba-howto-collection.html"
287 ACCESSKEY="H"
288 >Home</A
289 ></TD
290 ><TD
291 WIDTH="33%"
292 ALIGN="right"
293 VALIGN="top"
294 ><A
295 HREF="other-clients.html"
296 ACCESSKEY="N"
297 >Next</A
298 ></TD
299 ></TR
300 ><TR
301 ><TD
302 WIDTH="33%"
303 ALIGN="left"
304 VALIGN="top"
305 >Appendixes</TD
306 ><TD
307 WIDTH="34%"
308 ALIGN="center"
309 VALIGN="top"
310 ><A
311 HREF="appendixes.html"
312 ACCESSKEY="U"
313 >Up</A
314 ></TD
315 ><TD
316 WIDTH="33%"
317 ALIGN="right"
318 VALIGN="top"
319 >Samba and other CIFS clients</TD
320 ></TR
321 ></TABLE
322 ></DIV
323 ></BODY
324 ></HTML
325 >