summaryrefslogtreecommitdiffstats
path: root/sys/kern/p1003_1b.c
diff options
context:
space:
mode:
authordufault <dufault@FreeBSD.org>1998-05-18 12:53:45 +0000
committerdufault <dufault@FreeBSD.org>1998-05-18 12:53:45 +0000
commit3620341ce9b1059b839e53c1dd529116f970a036 (patch)
tree4e4d73ef870c2317f328144b404185fe43a59c10 /sys/kern/p1003_1b.c
parentae01f21aeda17715d364ab633a05a417ec81ff0d (diff)
downloadFreeBSD-src-3620341ce9b1059b839e53c1dd529116f970a036.zip
FreeBSD-src-3620341ce9b1059b839e53c1dd529116f970a036.tar.gz
1. Don't use "nosys" and generate coredumps for unconfigured
system calls - return ENOSYS per the spec. 2. Fix interface stub to set priority properly.
Diffstat (limited to 'sys/kern/p1003_1b.c')
-rw-r--r--sys/kern/p1003_1b.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/p1003_1b.c b/sys/kern/p1003_1b.c
index ccbee6b..c23d6a1 100644
--- a/sys/kern/p1003_1b.c
+++ b/sys/kern/p1003_1b.c
@@ -106,12 +106,20 @@ int p31b_proc(struct proc *p, pid_t pid, struct proc **pp)
return ret;
}
+/* The system calls return ENOSYS if an entry is called that is
+ * not run-time supported. I am also logging since some programs
+ * start to use this when they shouldn't. That will be removed if annoying.
+ */
int
syscall_not_present(struct proc *p, const char *s, struct nosys_args *uap)
{
log(LOG_ERR, "cmd %s pid %d tried to use non-present %s\n",
p->p_comm, p->p_pid, s);
- return nosys(p, uap);
+
+ /* a " return nosys(p, uap); " here causes a core dump.
+ */
+
+ return ENOSYS;
}
#if !defined(_KPOSIX_PRIORITY_SCHEDULING)
OpenPOWER on IntegriCloud