caller_ptr = proc_addr(who_p);
/* See if the caller made a valid request and try to handle it. */
- if (!GET_BIT(priv(caller_ptr)->s_k_call_mask, call_nr)) {
-#if DEBUG_ENABLE_IPC_WARNINGS
- kprintf("SYSTEM: request %d from %d denied.\n",
- call_nr,m.m_source);
-#endif
- result = ECALLDENIED; /* illegal message type */
- } /* else */
- if (call_nr >= NR_SYS_CALLS) { /* check call number */
+ if (call_nr < 0 || call_nr >= NR_SYS_CALLS) { /* check call number */
#if DEBUG_ENABLE_IPC_WARNINGS
kprintf("SYSTEM: illegal request %d from %d.\n",
call_nr,m.m_source);
#endif
result = EBADREQUEST; /* illegal message type */
}
+ else if (!GET_BIT(priv(caller_ptr)->s_k_call_mask, call_nr)) {
+#if DEBUG_ENABLE_IPC_WARNINGS
+ kprintf("SYSTEM: request %d from %d denied.\n",
+ call_nr,m.m_source);
+#endif
+ result = ECALLDENIED; /* illegal message type */
+ }
else {
result = (*call_vec[call_nr])(&m); /* handle the system call */
}
*/
#define FS_C SYS_KILL, SYS_VIRCOPY, SYS_SAFECOPYFROM, SYS_SAFECOPYTO, \
SYS_VIRVCOPY, SYS_UMAP, SYS_GETINFO, SYS_EXIT, SYS_TIMES, SYS_SETALARM, \
- SYS_PRIVCTL, SYS_TRACE
+ SYS_PRIVCTL, SYS_TRACE , SYS_SETGRANT
#define DRV_C FS_C, SYS_SEGCTL, SYS_IRQCTL, SYS_INT86, SYS_DEVIO, \
- SYS_SDEVIO, SYS_VDEVIO
+ SYS_SDEVIO, SYS_VDEVIO, SYS_SETGRANT
PRIVATE int
fs_c[] = { FS_C },
rs_c[] = { SYS_ALL_CALLS },
ds_c[] = { SYS_ALL_CALLS },
drv_c[] = { DRV_C },
- tty_c[] = { DRV_C, SYS_ABORT, SYS_VM_MAP, SYS_IOPENABLE },
+ tty_c[] = { DRV_C, SYS_ABORT, SYS_VM_MAP, SYS_IOPENABLE, SYS_READBIOS },
mem_c[] = { DRV_C, SYS_PHYSCOPY, SYS_PHYSVCOPY, SYS_VM_MAP, SYS_IOPENABLE };
/* The system image table lists all programs that are part of the boot image.