]> Zhao Yanbai Git Server - minix.git/commitdiff
Enforce system call bitmask
authorBen Gras <ben@minix3.org>
Tue, 20 Sep 2005 12:24:19 +0000 (12:24 +0000)
committerBen Gras <ben@minix3.org>
Tue, 20 Sep 2005 12:24:19 +0000 (12:24 +0000)
kernel/system.c

index 132cd157be1b20a5adbc5be2a09f5e365dc1c19a..5019dd94ea36e88d086499be9369a2d94580363c 100755 (executable)
@@ -78,8 +78,7 @@ PUBLIC void sys_task()
       if (! (priv(caller_ptr)->s_call_mask & (1<<call_nr))) {
          kprintf("SYSTEM: request %d from %d denied.\n", call_nr,m.m_source);
          result = ECALLDENIED;                 /* illegal message type */
-      }
-      if (call_nr >= NR_SYS_CALLS) {           /* check call number */
+      } else if (call_nr >= NR_SYS_CALLS) {            /* check call number */
          kprintf("SYSTEM: illegal request %d from %d.\n", call_nr,m.m_source);
          result = EBADREQUEST;                 /* illegal message type */
       }