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