(gulp!) reran makesyscalls..
sysv_ipc.c: add stub functions that either simply return (for the hooks in kern_fork/kern_exit) or log() a messgae and call enosys() (for the syscalls). sysv_ipc.c will become "standard" in conf/files and has #ifs for all the permutations.
This commit is contained in:
parent
8f195de8e4
commit
cc3a066a29
@ -2,7 +2,7 @@
|
||||
* System call switch table.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from Id: syscalls.master,v 1.21 1996/01/03 21:42:20 wollman Exp
|
||||
* created from Id: syscalls.master,v 1.23 1996/01/08 04:13:25 peter Exp
|
||||
*/
|
||||
|
||||
#include "opt_sysvipc.h"
|
||||
@ -197,21 +197,9 @@ struct sysent sysent[] = {
|
||||
{ 3, (sy_call_t *)rtprio }, /* 166 = rtprio */
|
||||
{ 0, (sy_call_t *)nosys }, /* 167 = nosys */
|
||||
{ 0, (sy_call_t *)nosys }, /* 168 = nosys */
|
||||
#ifdef SYSVSEM
|
||||
{ 5, (sy_call_t *)semsys }, /* 169 = semsys */
|
||||
#else
|
||||
{ 0, (sy_call_t *)nosys }, /* 169 = nosys */
|
||||
#endif
|
||||
#ifdef SYSVMSG
|
||||
{ 6, (sy_call_t *)msgsys }, /* 170 = msgsys */
|
||||
#else
|
||||
{ 0, (sy_call_t *)nosys }, /* 170 = nosys */
|
||||
#endif
|
||||
#ifdef SYSVSHM
|
||||
{ 4, (sy_call_t *)shmsys }, /* 171 = shmsys */
|
||||
#else
|
||||
{ 0, (sy_call_t *)nosys }, /* 171 = nosys */
|
||||
#endif
|
||||
{ 0, (sy_call_t *)nosys }, /* 172 = nosys */
|
||||
{ 0, (sy_call_t *)nosys }, /* 173 = nosys */
|
||||
{ 0, (sy_call_t *)nosys }, /* 174 = nosys */
|
||||
@ -267,39 +255,18 @@ struct sysent sysent[] = {
|
||||
{ 0, (sy_call_t *)lkmnosys }, /* 217 = lkmnosys */
|
||||
{ 0, (sy_call_t *)lkmnosys }, /* 218 = lkmnosys */
|
||||
{ 0, (sy_call_t *)lkmnosys }, /* 219 = lkmnosys */
|
||||
#ifdef SYSVSEM
|
||||
{ 4, (sy_call_t *)__semctl }, /* 220 = __semctl */
|
||||
{ 3, (sy_call_t *)semget }, /* 221 = semget */
|
||||
{ 3, (sy_call_t *)semop }, /* 222 = semop */
|
||||
{ 1, (sy_call_t *)semconfig }, /* 223 = semconfig */
|
||||
#else
|
||||
{ 0, (sy_call_t *)nosys }, /* 220 = semctl */
|
||||
{ 0, (sy_call_t *)nosys }, /* 221 = semget */
|
||||
{ 0, (sy_call_t *)nosys }, /* 222 = semop */
|
||||
{ 0, (sy_call_t *)nosys }, /* 223 = semconfig */
|
||||
#endif
|
||||
#ifdef SYSVMSG
|
||||
{ 3, (sy_call_t *)msgctl }, /* 224 = msgctl */
|
||||
{ 2, (sy_call_t *)msgget }, /* 225 = msgget */
|
||||
{ 4, (sy_call_t *)msgsnd }, /* 226 = msgsnd */
|
||||
{ 5, (sy_call_t *)msgrcv }, /* 227 = msgrcv */
|
||||
#else
|
||||
{ 0, (sy_call_t *)nosys }, /* 224 = msgctl */
|
||||
{ 0, (sy_call_t *)nosys }, /* 225 = msgget */
|
||||
{ 0, (sy_call_t *)nosys }, /* 226 = msgsnd */
|
||||
{ 0, (sy_call_t *)nosys }, /* 227 = msgrcv */
|
||||
#endif
|
||||
#ifdef SYSVSHM
|
||||
{ 3, (sy_call_t *)shmat }, /* 228 = shmat */
|
||||
{ 3, (sy_call_t *)shmctl }, /* 229 = shmctl */
|
||||
{ 1, (sy_call_t *)shmdt }, /* 230 = shmdt */
|
||||
{ 3, (sy_call_t *)shmget }, /* 231 = shmget */
|
||||
#else
|
||||
{ 0, (sy_call_t *)nosys }, /* 228 = shmat */
|
||||
{ 0, (sy_call_t *)nosys }, /* 229 = shmctl */
|
||||
{ 0, (sy_call_t *)nosys }, /* 230 = shmdt */
|
||||
{ 0, (sy_call_t *)nosys }, /* 231 = shmget */
|
||||
#endif
|
||||
};
|
||||
|
||||
struct sysentvec aout_sysvec = {
|
||||
|
@ -28,7 +28,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: kern_exec.c,v 1.30 1995/12/14 08:31:20 phk Exp $
|
||||
* $Id: kern_exec.c,v 1.31 1996/01/04 20:28:45 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "opt_sysvipc.h"
|
||||
@ -356,10 +356,8 @@ exec_new_vmspace(imgp)
|
||||
imgp->vmspace_destroyed = 1;
|
||||
|
||||
/* Blow away entire process VM */
|
||||
#ifdef SYSVSHM
|
||||
if (vmspace->vm_shm)
|
||||
shmexit(imgp->proc);
|
||||
#endif
|
||||
vm_map_remove(&vmspace->vm_map, 0, USRSTACK);
|
||||
|
||||
/* Allocate a new stack */
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
|
||||
* $Id: kern_exit.c,v 1.24 1996/01/03 21:42:00 wollman Exp $
|
||||
* $Id: kern_exit.c,v 1.25 1996/01/04 20:28:46 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
@ -62,13 +62,8 @@
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/filedesc.h>
|
||||
|
||||
#ifdef SYSVSHM
|
||||
#include <sys/shm.h>
|
||||
#endif
|
||||
#ifdef SYSVSEM
|
||||
#include <sys/sem.h>
|
||||
#endif
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#ifdef COMPAT_43
|
||||
@ -145,16 +140,15 @@ exit1(p, rv)
|
||||
*/
|
||||
fdfree(p);
|
||||
|
||||
#ifdef SYSVSEM
|
||||
/*
|
||||
* XXX Shutdown SYSV semaphores
|
||||
*/
|
||||
semexit(p);
|
||||
#endif
|
||||
|
||||
/* The next two chunks should probably be moved to vmspace_exit. */
|
||||
vm = p->p_vmspace;
|
||||
#ifdef SYSVSHM
|
||||
if (vm->vm_shm)
|
||||
shmexit(p);
|
||||
#endif
|
||||
/*
|
||||
* Release user portion of address space.
|
||||
* This releases references to vnodes,
|
||||
|
@ -2,7 +2,7 @@
|
||||
* System call names.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from Id: syscalls.master,v 1.21 1996/01/03 21:42:20 wollman Exp
|
||||
* created from Id: syscalls.master,v 1.23 1996/01/08 04:13:25 peter Exp
|
||||
*/
|
||||
|
||||
char *syscallnames[] = {
|
||||
@ -183,21 +183,9 @@ char *syscallnames[] = {
|
||||
"rtprio", /* 166 = rtprio */
|
||||
"#167", /* 167 = nosys */
|
||||
"#168", /* 168 = nosys */
|
||||
#ifdef SYSVSEM
|
||||
"semsys", /* 169 = semsys */
|
||||
#else
|
||||
"#169", /* 169 = nosys */
|
||||
#endif
|
||||
#ifdef SYSVMSG
|
||||
"msgsys", /* 170 = msgsys */
|
||||
#else
|
||||
"#170", /* 170 = nosys */
|
||||
#endif
|
||||
#ifdef SYSVSHM
|
||||
"shmsys", /* 171 = shmsys */
|
||||
#else
|
||||
"#171", /* 171 = nosys */
|
||||
#endif
|
||||
"#172", /* 172 = nosys */
|
||||
"#173", /* 173 = nosys */
|
||||
"#174", /* 174 = nosys */
|
||||
@ -253,37 +241,16 @@ char *syscallnames[] = {
|
||||
"lkmnosys", /* 217 = lkmnosys */
|
||||
"lkmnosys", /* 218 = lkmnosys */
|
||||
"lkmnosys", /* 219 = lkmnosys */
|
||||
#ifdef SYSVSEM
|
||||
"__semctl", /* 220 = __semctl */
|
||||
"semget", /* 221 = semget */
|
||||
"semop", /* 222 = semop */
|
||||
"semconfig", /* 223 = semconfig */
|
||||
#else
|
||||
"#220", /* 220 = semctl */
|
||||
"#221", /* 221 = semget */
|
||||
"#222", /* 222 = semop */
|
||||
"#223", /* 223 = semconfig */
|
||||
#endif
|
||||
#ifdef SYSVMSG
|
||||
"msgctl", /* 224 = msgctl */
|
||||
"msgget", /* 225 = msgget */
|
||||
"msgsnd", /* 226 = msgsnd */
|
||||
"msgrcv", /* 227 = msgrcv */
|
||||
#else
|
||||
"#224", /* 224 = msgctl */
|
||||
"#225", /* 225 = msgget */
|
||||
"#226", /* 226 = msgsnd */
|
||||
"#227", /* 227 = msgrcv */
|
||||
#endif
|
||||
#ifdef SYSVSHM
|
||||
"shmat", /* 228 = shmat */
|
||||
"shmctl", /* 229 = shmctl */
|
||||
"shmdt", /* 230 = shmdt */
|
||||
"shmget", /* 231 = shmget */
|
||||
#else
|
||||
"#228", /* 228 = shmat */
|
||||
"#229", /* 229 = shmctl */
|
||||
"#230", /* 230 = shmdt */
|
||||
"#231", /* 231 = shmget */
|
||||
#endif
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: sysv_ipc.c,v 1.1 1994/09/13 14:46:55 dfr Exp $ */
|
||||
/* $Id: sysv_ipc.c,v 1.2 1996/01/05 16:37:52 wollman Exp $ */
|
||||
/* $NetBSD: sysv_ipc.c,v 1.7 1994/06/29 06:33:11 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -36,8 +36,14 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include <sys/sem.h>
|
||||
|
||||
#if defined(SYSVSEM) || defined(SYSVSHM) || defined(SYSVMSG)
|
||||
|
||||
/*
|
||||
* Check for ipc permission
|
||||
@ -69,3 +75,224 @@ ipcperm(cred, perm, mode)
|
||||
return (0);
|
||||
return ((mode & perm->mode) == mode ? 0 : EACCES);
|
||||
}
|
||||
|
||||
#endif /* defined(SYSVSEM) || defined(SYSVSHM) || defined(SYSVMSG) */
|
||||
|
||||
|
||||
#if !defined(SYSVSEM) || !defined(SYSVSHM) || !defined(SYSVMSG)
|
||||
|
||||
static void sysv_nosys __P((struct proc *p, char *s));
|
||||
|
||||
static void
|
||||
sysv_nosys(p, s)
|
||||
struct proc *p;
|
||||
char *s;
|
||||
{
|
||||
log(LOG_ERR, "cmd %s pid %d tried to use non-present %s\n",
|
||||
p->p_comm, p->p_pid, s);
|
||||
}
|
||||
|
||||
#if !defined(SYSVSEM)
|
||||
|
||||
/*
|
||||
* SYSVSEM stubs
|
||||
*/
|
||||
|
||||
int
|
||||
semsys(p, uap, retval)
|
||||
struct proc *p;
|
||||
struct semsys_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSEM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
semconfig(p, uap, retval)
|
||||
struct proc *p;
|
||||
struct semconfig_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSEM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
__semctl(p, uap, retval)
|
||||
struct proc *p;
|
||||
register struct __semctl_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSEM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
semget(p, uap, retval)
|
||||
struct proc *p;
|
||||
register struct semget_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSEM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
semop(p, uap, retval)
|
||||
struct proc *p;
|
||||
register struct semop_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSEM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
/* called from kern_exit.c */
|
||||
void
|
||||
semexit(p)
|
||||
struct proc *p;
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* !defined(SYSVSEM) */
|
||||
|
||||
|
||||
#if !defined(SYSVMSG)
|
||||
|
||||
/*
|
||||
* SYSVMSG stubs
|
||||
*/
|
||||
|
||||
int
|
||||
msgsys(p, uap, retval)
|
||||
struct proc *p;
|
||||
/* XXX actually varargs. */
|
||||
struct msgsys_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVMSG");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
msgctl(p, uap, retval)
|
||||
struct proc *p;
|
||||
register struct msgctl_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVMSG");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
msgget(p, uap, retval)
|
||||
struct proc *p;
|
||||
register struct msgget_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVMSG");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
msgsnd(p, uap, retval)
|
||||
struct proc *p;
|
||||
register struct msgsnd_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVMSG");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
msgrcv(p, uap, retval)
|
||||
struct proc *p;
|
||||
register struct msgrcv_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVMSG");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
#endif /* !defined(SYSVMSG) */
|
||||
|
||||
|
||||
#if !defined(SYSVSHM)
|
||||
|
||||
/*
|
||||
* SYSVSHM stubs
|
||||
*/
|
||||
|
||||
int
|
||||
shmdt(p, uap, retval)
|
||||
struct proc *p;
|
||||
struct shmdt_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSHM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
shmat(p, uap, retval)
|
||||
struct proc *p;
|
||||
struct shmat_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSHM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
shmctl(p, uap, retval)
|
||||
struct proc *p;
|
||||
struct shmctl_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSHM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
shmget(p, uap, retval)
|
||||
struct proc *p;
|
||||
struct shmget_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSHM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
int
|
||||
shmsys(p, uap, retval)
|
||||
struct proc *p;
|
||||
/* XXX actually varargs. */
|
||||
struct shmsys_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
sysv_nosys(p, "SYSVSHM");
|
||||
return nosys(p, (struct nosys_args *)uap, retval);
|
||||
};
|
||||
|
||||
/* called from kern_fork.c */
|
||||
void
|
||||
shmfork(p1, p2, isvfork)
|
||||
struct proc *p1, *p2;
|
||||
int isvfork;
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* called from kern_exit.c */
|
||||
void
|
||||
shmexit(p)
|
||||
struct proc *p;
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* !defined(SYSVSHM) */
|
||||
|
||||
#endif /* !defined(SYSVSEM) || !defined(SYSVSHM) || !defined(SYSVMSG) */
|
||||
|
Loading…
x
Reference in New Issue
Block a user