1.\" $NetBSD: compat_30.8,v 1.7 2007/12/15 16:25:46 pavel 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 December 15, 2007 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 /usr/lib/libcrypto.so.2.1 80.Pa /usr/lib/libcrypto.so.2 81.It 82.Pa /lib/libevent.so.0.2 83.Pa /lib/libevent.so.0 84.It 85.Pa /usr/lib/libevent.so.0.2 86.Pa /usr/lib/libevent.so.0 87.It 88.Pa /usr/lib/libg2c.so.2.0 89.Pa /usr/lib/libg2c.so.2 90.It 91.Pa /usr/lib/libkadm.so.5.0 92.Pa /usr/lib/libkadm.so.5 93.It 94.Pa /usr/lib/libkafs.so.6.0 95.Pa /usr/lib/libkafs.so.6 96.It 97.Pa /usr/lib/libkdb.so.5.0 98.Pa /usr/lib/libkdb.so.5 99.It 100.Pa /usr/lib/libkrb5.so.19.1 101.Pa /usr/lib/libkrb5.so.19 102.It 103.Pa /usr/lib/libkrb.so.6.0 104.Pa /usr/lib/libkrb.so.6 105.It 106.Pa /usr/lib/libkstream.so.2.0 107.Pa /usr/lib/libkstream.so.2 108.It 109.Pa /usr/lib/libmagic.so.0.1 110.Pa /usr/lib/libmagic.so.0 111.It 112.Pa /usr/lib/libpcap.so.1.4 113.Pa /usr/lib/libpcap.so.1 114.It 115.Pa /lib/libradius.so.0.0 116.Pa /lib/libradius.so.0 117.It 118.Pa /usr/lib/libradius.so.0.0 119.Pa /usr/lib/libradius.so.0 120.It 121.Pa /usr/lib/libssh.so.1.0 122.Pa /usr/lib/libssh.so.1 123.It 124.Pa /usr/lib/libssl.so.3.0 125.Pa /usr/lib/libssl.so.3 126.It 127.Pa /usr/lib/libstdc++.so.5.0 128.Pa /usr/lib/libstdc++.so.5 129.\" .It 130.\" .Pa libtelnet lives where? 131.It 132.Pa /lib/libz.so.0.4 133.Pa /lib/libz.so.0 134.It 135.Pa /usr/lib/libz.so.0.4 136.Pa /usr/lib/libz.so.0 137.It 138.Pa /usr/lib/libamu.so.2.1 139.Pa /usr/lib/libamu.so.2 140.El 141.Sh IMPLEMENTATION NOTES 142.Dv COMPAT_30 143enables the 144.Nx 3.0 145versions of the following system calls, whose syscall numbers and 146argument structures were changed after the 3.0 release to accommodate 14764-bit filesystems: 148.Xr fhstat 2 , 149.Xr fstat 2 , 150.Xr getdents 2 , 151.Xr lstat 2 , 152.Xr stat 2 . 153.Pp 154The filehandle structure (formerly 155.Vt fhandle_t ) 156was made opaque to userland and variable-sized. 157A 158.Fa fh_size 159argument was added to related syscalls: 160.Xr fhstat 2 , 161.Xr fhstatvfs 2 , 162.Xr fhstatvfs1 2 , 163.Xr fhopen 2 , 164.Xr getfh 2 . 165This changes the API and ABI of those syscalls, 166.Dv COMPAT_30 167enables binary compatibility with the old ABI. 168Source compatibility is not provided, as use of those syscalls is 169supposed to be rare. 170.Pp 171The error code from the 172.Xr socket 2 173syscall changed from 174.Er EPROTONOSUPPORT 175to 176.Er EAFNOSUPPORT 177in the case of an unsupported address family. 178.Dv COMPAT_30 179enables binary compatibility with the old ABI. 180Source compatiblility is not provided. 181.Pp 182The 183.Vt struct ntptimeval 184used by 185.Xr ntp_gettime 2 186changed with the implementation of timecounters. 187.Sh SEE ALSO 188.Xr config 1 , 189.Xr fhstat 2 , 190.Xr fstat 2 , 191.Xr getdents 2 , 192.Xr lstat 2 , 193.Xr stat 2 , 194.Xr options 4 195.Sh HISTORY 196.Nx 197offers back-compatibility options back to 198.Nx 0.9 , 199but the first to be documented with a manual page is 200.Nm . 201.Sh BUGS 202The compatible 203.Xr getdents 2 204is unable to see directory entries beneath the top layer of a union, 205even though the real 3.0 206.Fn getdents 207did not have that problem. 208.Sh SECURITY CONSIDERATIONS 209Programs with security impact that receive incorrect directory contents 210from 211.Fn getdents 212may behave improperly, as when they are unable to find, or find the wrong 213versions of, important files. 214