Changed vnodep -> vp for consistency with the rest of the kernel, and
changed iparams -> imgp for brevity.
kern_exec.c:
Explicitly initialized some additional parts of the image_params struct
to avoid bzeroing it. Rewrote the set-id code to reduce the number of
logical tests. The rewrite exposed a mostly benign bug in the algorithm:
traced set-id images would get ktracing disabled even if the set-id didn't
happen for other reasons.
handler (remove SA_NODEFER).
On the other hand, signal() case should set sa_flags to SA_NODEFER as
in previous change.
In addition, added #ifdef'd code for signal() to or in SA_RESETHAND
flag for when that compatability is implemented.
This is truly a hack. The idea is taken from the Linux ibcs2 emulator.
To use this feature, you must use the option,
options SPX_HACK
in your config.
Also, in /compat/ibcs2/dev, you must do:
lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 X0R@ -> /dev/null
lrwxr-xr-x 1 root wheel 7 Oct 15 22:20 nfsd@ -> socksys
lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 socksys@ -> /dev/null
crw-rw-rw- 1 root wheel 41, 1 Oct 15 22:14 spx
Do NOT use old socksys driver as that has been removed.
This hack needs /compat/ibcs2/dev/spx to be any device that does NOT
exist/configured (so the now non-existant spx major/minor works fine).
When an open() is called, the error ENXIO is checked and then the
path is checked. If spx open detected, then a unix socket is opened
to the hardcoded path "/tmp/.X11-unix/X0".
As the Linux hacker author mentioned, the real way would be to detect
the getmsg/putmsg through /dev/X0R and /dev/spx. Until this true
solution is implemented (if ever), I think this hack is important
enough to be put into the tree, even though I don't like it dirtying
up my clean code (which is what #ifdef SPX_HACK is for).
Currently, the emulator defaults to returning "FreeBSD" as the system
name, release "3.2", and version "2.0". Some programs want to make
sure they are on a SYSV 3.2 system and check for 3.X release number.
Use the following defines to override the defaults:
IBCS2_UNAME_SYSNAME
IBCS2_UNAME_RELEASE
IBCS2_UNAME_VERSION
(should be string)
for system name, release, and version, respectively. This allows
someone to compile the emulator into the kernel so it can pretend
to be a specific system if needed.
in line with linux alt space of /compat/linux.
This was pointed out by Stefan Esser.
In cheching alt space for libraries in imgact_coff.c, use const
ibcs2_emul_path instead of its own local string. Also do a proper
malloc of temp name according to MAXPATHLEN.
Add new files created for emulator.
Modify NetBSD import to work with FreeBSD and add new features and
code. The complete emulator is essentially a combination of work/code
implemented by Sean Eric Fagan, Soren Schmidt, Scott Bartram, and myself,
Steven Wallace.
Features of this new emulator system include:
o "clean" code, including strict prototyping.
o Auto-generation of ibcs2 system calls, xenix system calls, isc system
calls. Generation includes system tables, structure definitions,
and prototyping of function calls.
o ibcs2 emulator does not rely on any COMPAT_43 system calls.
o embedded socksys support
o ibcs2 msgsys, semsys, shmsys calls supported if supported in kernel
o alternate /emul/ibcs2 namespace searched first for files in ibcs2
system. Usefull to keep sysv libraries, binaries in /emul/ibcs2.
o many other finer details and functions fixed or implemented.
which is used as a basis for a more complete and cleaner ibcs2 emulator.
(snapshot about May 1995 with a few files from September 1995)
Some files and code from old emulator still remains.
New files, features, and changes have been implemented by myself,
which will be shown in following commits.
Submitted by: terry (terry lambert)
This is a composite of 3 patch sets submitted by terry.
they are:
New low-level init code that supports loadbal modules better
some cleanups in the namei code to help terry in 16-bit character support
some changes to the mount-root code to make it a little more
modular..
NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able
to test those cases..
certainly mounting root of disk still works just fine..
mfs should work but is untested. (tomorrows task)
The low level init stuff includes a total rewrite of init_main.c
to make it possible for new modules to have an init phase by simply
adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can
be added to the kernel without editing any other files other than the
'files' file.
warnings and are cosmetic only. Poul once requested them, but neither
Sean nor Søren commented on them, so i commit it now before it's
getting lost some day.
This is the main files for the iBCS2 emulator. It can be use
compiled into the kernel by using:
options IBCS2
options COMPAT_IBCS2
or as a lkm module using:
options COMPAT_IBCS2
and then loading it via the ibcs2 script in /usr/bin
REMEMBER: this code is still experimental ! NO WARRENTY !
Submitted by: sef@kithrup.com, mostyn@mrl.com, sos@kmd-ac.dk