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