xref: /netbsd-src/share/man/man8/compat_30.8 (revision c7e46fd216df95ac8d032325384f921e06ea4e13)
1.\" $NetBSD: compat_30.8,v 1.9 2011/09/13 09:16:00 wiz Exp $
2.\"
3.\" Copyright (c) 2006 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from a document contributed to The NetBSD Foundation
7.\" by Chapman Flack.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd December 15, 2007
31.Dt COMPAT_30 8
32.Os
33.Sh NAME
34.Nm compat_30
35.Nd setup procedure for backward compatibility on post-3.0 releases
36.Sh SYNOPSIS
37.Cd "options COMPAT_30"
38.Sh DESCRIPTION
39The
40.Nm
41module allows
42.Nx
43to run
44.Nx 3.0
45executables.
46.Pp
47The support is present if the kernel was built with option
48.Dv COMPAT_30 .
49It is not available as a loadable module.
50.Pp
51Static executables typically need no additional setup.
52Dynamic binaries may require shared libraries whose major version
53number changed since
54.Nx 3.0 ,
55which are listed below.
56A shadow directory under
57.Pa /emul
58is not used; the libraries can be obtained from a
59.Nx 3.0
60distribution and installed in the original directories shown,
61as the major version number in the file name will prevent conflicts.
62If an upgrade installation from
63.Nx 3.0
64has been done and these libraries are still present, nothing more need
65be done.
66.Ss Libraries needed from 3.0
67.Bl -item
68.It
69.Pa /lib/libcrypto.so.2.1
70.Pa /lib/libcrypto.so.2
71.It
72.Pa /usr/lib/libcrypto.so.2.1
73.Pa /usr/lib/libcrypto.so.2
74.It
75.Pa /lib/libevent.so.0.2
76.Pa /lib/libevent.so.0
77.It
78.Pa /usr/lib/libevent.so.0.2
79.Pa /usr/lib/libevent.so.0
80.It
81.Pa /usr/lib/libg2c.so.2.0
82.Pa /usr/lib/libg2c.so.2
83.It
84.Pa /usr/lib/libkadm.so.5.0
85.Pa /usr/lib/libkadm.so.5
86.It
87.Pa /usr/lib/libkafs.so.6.0
88.Pa /usr/lib/libkafs.so.6
89.It
90.Pa /usr/lib/libkdb.so.5.0
91.Pa /usr/lib/libkdb.so.5
92.It
93.Pa /usr/lib/libkrb5.so.19.1
94.Pa /usr/lib/libkrb5.so.19
95.It
96.Pa /usr/lib/libkrb.so.6.0
97.Pa /usr/lib/libkrb.so.6
98.It
99.Pa /usr/lib/libkstream.so.2.0
100.Pa /usr/lib/libkstream.so.2
101.It
102.Pa /usr/lib/libmagic.so.0.1
103.Pa /usr/lib/libmagic.so.0
104.It
105.Pa /usr/lib/libpcap.so.1.4
106.Pa /usr/lib/libpcap.so.1
107.It
108.Pa /lib/libradius.so.0.0
109.Pa /lib/libradius.so.0
110.It
111.Pa /usr/lib/libradius.so.0.0
112.Pa /usr/lib/libradius.so.0
113.It
114.Pa /usr/lib/libssh.so.1.0
115.Pa /usr/lib/libssh.so.1
116.It
117.Pa /usr/lib/libssl.so.3.0
118.Pa /usr/lib/libssl.so.3
119.It
120.Pa /usr/lib/libstdc++.so.5.0
121.Pa /usr/lib/libstdc++.so.5
122.\" .It
123.\" .Pa libtelnet lives where?
124.It
125.Pa /lib/libz.so.0.4
126.Pa /lib/libz.so.0
127.It
128.Pa /usr/lib/libz.so.0.4
129.Pa /usr/lib/libz.so.0
130.It
131.Pa /usr/lib/libamu.so.2.1
132.Pa /usr/lib/libamu.so.2
133.El
134.Sh IMPLEMENTATION NOTES
135.Dv COMPAT_30
136enables the
137.Nx 3.0
138versions of the following system calls, whose syscall numbers and
139argument structures were changed after the 3.0 release to accommodate
14064-bit filesystems:
141.Xr fhstat 2 ,
142.Xr fstat 2 ,
143.Xr getdents 2 ,
144.Xr lstat 2 ,
145.Xr stat 2 .
146.Pp
147The filehandle structure (formerly
148.Vt fhandle_t )
149was made opaque to userland and variable-sized.
150A
151.Fa fh_size
152argument was added to related syscalls:
153.Xr fhstat 2 ,
154.Xr fhstatvfs 2 ,
155.Xr fhstatvfs1 2 ,
156.Xr fhopen 2 ,
157.Xr getfh 2 .
158This changes the API and ABI of those syscalls,
159.Dv COMPAT_30
160enables binary compatibility with the old ABI.
161Source compatibility is not provided, as use of those syscalls is
162supposed to be rare.
163.Pp
164The error code from the
165.Xr socket 2
166syscall changed from
167.Er EPROTONOSUPPORT
168to
169.Er EAFNOSUPPORT
170in the case of an unsupported address family.
171.Dv COMPAT_30
172enables binary compatibility with the old ABI.
173Source compatiblility is not provided.
174.Pp
175The
176.Vt struct ntptimeval
177used by
178.Xr ntp_gettime 2
179changed with the implementation of timecounters.
180.Sh SEE ALSO
181.Xr config 1 ,
182.Xr fhstat 2 ,
183.Xr fstat 2 ,
184.Xr getdents 2 ,
185.Xr lstat 2 ,
186.Xr stat 2 ,
187.Xr options 4
188.Sh HISTORY
189.Nx
190offers back-compatibility options back to
191.Nx 0.9 ,
192but the first to be documented with a manual page is
193.Nm .
194.Sh BUGS
195The compatible
196.Xr getdents 2
197is unable to see directory entries beneath the top layer of a union,
198even though the real 3.0
199.Fn getdents
200did not have that problem.
201.Sh SECURITY CONSIDERATIONS
202Programs with security impact that receive incorrect directory contents
203from
204.Fn getdents
205may behave improperly, as when they are unable to find, or find the wrong
206versions of, important files.
207