xref: /netbsd-src/share/man/man8/compat_30.8 (revision ce2c90c7c172d95d2402a5b3d96d8f8e6d138a21)
1.\" $NetBSD: compat_30.8,v 1.5 2006/09/02 23:44:38 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.\" 3. All advertising materials mentioning features or use of this software
18.\"    must display the following acknowledgement:
19.\"        This product includes software developed by the NetBSD
20.\"        Foundation, Inc. and its contributors.
21.\" 4. Neither the name of The NetBSD Foundation nor the names of its
22.\"    contributors may be used to endorse or promote products derived
23.\"    from this software without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35.\" POSSIBILITY OF SUCH DAMAGE.
36.\"
37.Dd August 26, 2006
38.Dt COMPAT_30 8
39.Os
40.Sh NAME
41.Nm compat_30
42.Nd setup procedure for backward compatibility on post-3.0 release
43.Sh SYNOPSIS
44.Cd "options COMPAT_30"
45.Sh DESCRIPTION
46The
47.Nm
48module allows
49.Nx
50to run
51.Nx 3.0
52executables.
53.Pp
54The support is present if the kernel was built with option
55.Dv COMPAT_30 .
56It is not available as a loadable module.
57.Pp
58Static executables typically need no additional setup.
59Dynamic binaries may require shared libraries whose major version
60number changed since
61.Nx 3.0 ,
62which are listed below.
63A shadow directory under
64.Pa /emul
65is not used; the libraries can be obtained from a
66.Nx 3.0
67distribution and installed in the original directories shown,
68as the major version number in the file name will prevent conflicts.
69If an upgrade installation from
70.Nx 3.0
71has been done and these libraries are still present, nothing more need
72be done.
73.Ss Libraries needed from 3.0
74.Bl -item
75.It
76.Pa /lib/libcrypto.so.2.1
77.Pa /lib/libcrypto.so.2
78.It
79.Pa /lib/libevent.so.0.2
80.Pa /lib/libevent.so.0
81.It
82.Pa /usr/lib/libkafs.so.6.0
83.Pa /usr/lib/libkafs.so.6
84.It
85.Pa /usr/lib/libkrb5.so.19.1
86.Pa /usr/lib/libkrb5.so.19
87.It
88.Pa /lib/libradius.so.0.0
89.Pa /lib/libradius.so.0
90.It
91.Pa /usr/lib/libssh.so.1.0
92.Pa /usr/lib/libssh.so.1
93.It
94.Pa /usr/lib/libssl.so.3.0
95.Pa /usr/lib/libssl.so.3
96.\" .It
97.\" .Pa libtelnet lives where?
98.It
99.Pa /lib/libz.so.0.4
100.Pa /lib/libz.so.0
101.It
102.Pa /usr/lib/libamu.so.2.1
103.Pa /usr/lib/libamu.so.2
104.El
105.Sh IMPLEMENTATION NOTES
106.Dv COMPAT_30
107enables the
108.Nx 3.0
109versions of the following system calls, whose syscall numbers and
110argument structures were changed after the 3.0 release to accommodate
11164-bit filesystems:
112.Xr fhstat 2 ,
113.Xr fstat 2 ,
114.Xr getdents 2 ,
115.Xr lstat 2 ,
116.Xr stat 2 .
117.Pp
118The filehandle structure (formerly
119.Vt fhandle_t )
120was made opaque to userland and variable-sized.
121A
122.Fa fh_size
123argument was added to related syscalls:
124.Xr fhstat 2 ,
125.Xr fhstatvfs 2 ,
126.Xr fhstatvfs1 2 ,
127.Xr fhopen 2 ,
128.Xr getfh 2 .
129This changes the API and ABI of those syscalls,
130.Dv COMPAT_30
131enables binary compatibility with the old ABI.
132Source compatibility is not provided, as use of those syscalls is
133supposed to be rare.
134.Pp
135The
136.Vt struct ntptimeval
137used by
138.Xr ntp_gettime 2
139changed with the implementation of timecounters.
140.Sh SEE ALSO
141.Xr config 1 ,
142.Xr fhstat 2 ,
143.Xr fstat 2 ,
144.Xr getdents 2 ,
145.Xr lstat 2 ,
146.Xr stat 2 ,
147.Xr options 4
148.Sh HISTORY
149.Nx
150offers back-compatibility options back to
151.Nx 0.9 ,
152but the first to be documented with a manual page is
153.Nm .
154.Sh BUGS
155The compatible
156.Xr getdents 2
157is unable to see directory entries beneath the top layer of a union,
158even though the real 3.0
159.Fn getdents
160did not have that problem.
161.Sh SECURITY CONSIDERATIONS
162Programs with security impact that receive incorrect directory contents
163from
164.Fn getdents
165may behave improperly, as when they are unable to find, or find the wrong
166versions of, important files.
167