]> Zhao Yanbai Git Server - minix.git/commitdiff
Separate permissions for sendrec. Actually initialize send/sendrec permissions
authorPhilip Homburg <philip@cs.vu.nl>
Mon, 23 Apr 2007 13:30:04 +0000 (13:30 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Mon, 23 Apr 2007 13:30:04 +0000 (13:30 +0000)
for data supplied by rs.

kernel/system/do_privctl.c

index f8acdcb51433d8a89a0945abfef0da03fceb68c7..a28d3c128a19e3803eb6379cb2162ac4ec612b58 100644 (file)
@@ -81,6 +81,11 @@ message *m_ptr;                      /* pointer to request message */
            }
        }
 
+       for (i=0; i<BITMAP_CHUNKS(NR_SYS_PROCS); i++) {
+               rp->p_priv->s_ipc_sendrec.chunk[i] = FILLED_MASK;
+       }
+       unset_sys_bit(rp->p_priv->s_ipc_sendrec, USER_PRIV_ID);
+
        /* No I/O resources, no memory resources, no IRQs, no grant table */
        priv(rp)->s_nr_io_range= 0;
        priv(rp)->s_nr_mem_range= 0;
@@ -137,6 +142,10 @@ message *m_ptr;                    /* pointer to request message */
 
                memcpy(priv(rp)->s_k_call_mask, priv.s_k_call_mask,
                        sizeof(priv(rp)->s_k_call_mask));
+               memcpy(&priv(rp)->s_ipc_to, &priv.s_ipc_to,
+                       sizeof(priv(rp)->s_ipc_to));
+               memcpy(&priv(rp)->s_ipc_sendrec, &priv.s_ipc_sendrec,
+                       sizeof(priv(rp)->s_ipc_sendrec));
        }
 
        /* Done. Privileges have been set. Allow process to run again. */