1 <chapter id="Portability">
4 <firstname>Jelmer</firstname><surname>Vernooij</surname>
8 <title>Portability</title>
10 <para>Samba works on a wide range of platforms but the interface all the
11 platforms provide is not always compatible. This chapter contains
12 platform-specific information about compiling and using samba.</para>
18 HP's implementation of supplementary groups is, er, non-standard (for
19 hysterical reasons). There are two group files, /etc/group and
20 /etc/logingroup; the system maps UIDs to numbers using the former, but
21 initgroups() reads the latter. Most system admins who know the ropes
22 symlink /etc/group to /etc/logingroup (hard link doesn't work for reasons
23 too stupid to go into here). initgroups() will complain if one of the
24 groups you're in in /etc/logingroup has what it considers to be an invalid
25 ID, which means outside the range [0..UID_MAX], where UID_MAX is (I think)
26 60000 currently on HP-UX. This precludes -2 and 65534, the usual 'nobody'
31 If you encounter this problem, make sure that the programs that are failing
32 to initgroups() be run as users not in any groups with GIDs outside the
36 <para>This is documented in the HP manual pages under setgroups(2) and passwd(4).
42 <title>SCO Unix</title>
45 If you run an old version of SCO Unix then you may need to get important
46 TCP/IP patches for Samba to work correctly. Without the patch, you may
47 encounter corrupt data transfers using samba.
51 The patch you need is UOD385 Connection Drivers SLS. It is available from
52 SCO (ftp.sco.com, directory SLS, files uod385a.Z and uod385a.ltr.Z).
61 DNIX has a problem with seteuid() and setegid(). These routines are
62 needed for Samba to work correctly, but they were left out of the DNIX
63 C library for some reason.
67 For this reason Samba by default defines the macro NO_EID in the DNIX
68 section of includes.h. This works around the problem in a limited way,
69 but it is far from ideal, some things still won't work right.
73 To fix the problem properly you need to assemble the following two
74 functions and then either add them to your C library or link them into
79 put this in the file <filename>setegid.s</filename>:
82 <para><programlisting>
95 </programlisting></para>
98 put this in the file <filename>seteuid.s</filename>:
101 <para><programlisting>
114 </programlisting></para>
117 after creating the above files you then assemble them using
120 <para><command>as seteuid.s</command></para>
121 <para><command>as setegid.s</command></para>
124 that should produce the files <filename>seteuid.o</filename> and
125 <filename>setegid.o</filename>
129 then you need to add these to the LIBSM line in the DNIX section of
130 the Samba Makefile. Your LIBSM line will then look something like this:
133 <para><programlisting>
134 LIBSM = setegid.o seteuid.o -ln
135 </programlisting></para>
138 You should then remove the line:
141 <para><programlisting>
143 </programlisting></para>
145 <para>from the DNIX section of <filename>includes.h</filename></para>