From dcac002bf44ff09df975ff4e23b41efb868c7a02 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Fri, 6 Mar 1998 21:58:11 +0000 Subject: Make NCR rdebug behaviour dependent on p_os field --- sys/compat/svr4/svr4_misc.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'sys/compat/svr4/svr4_misc.c') diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 74cc6a818b3..0cb46da13df 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_misc.c,v 1.19 1997/12/12 06:22:51 deraadt Exp $ */ +/* $OpenBSD: svr4_misc.c,v 1.20 1998/03/06 21:58:09 niklas Exp $ */ /* $NetBSD: svr4_misc.c,v 1.42 1996/12/06 03:22:34 christos Exp $ */ /* @@ -37,6 +37,8 @@ #include #include +#include +#include #include #include #include @@ -1364,6 +1366,7 @@ svr4_sys_setegid(p, v, retval) extern struct emul emul_linux_elf; p->p_emul = &emul_linux_elf; + p->p_os = OOS_LINUX; #ifdef KTRACE if (KTRPOINT(p, KTR_EMUL)) ktremul(p->p_tracep, p->p_emul->e_name); @@ -1371,7 +1374,20 @@ svr4_sys_setegid(p, v, retval) return (0); } #else - (void) uap; + (void)uap; +#endif + return (sys_setegid(p, v, retval)); +} + +int +svr4_sys_rdebug(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ +#ifdef SVR4_COMPAT_NCR + return (ENXIO); +#else + return (p->p_os == OOS_NCR ? ENXIO : sys_nosys(p, v, retval)); #endif - return sys_setegid(p, v, retval); } -- cgit v1.2.3