From: Philip Homburg Date: Mon, 23 Apr 2007 13:30:04 +0000 (+0000) Subject: Separate permissions for sendrec. Actually initialize send/sendrec permissions X-Git-Tag: v3.1.4~425 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/nslookup.html?a=commitdiff_plain;h=7541e0753bd308f86d310017bdb94487eaabec4b;p=minix.git Separate permissions for sendrec. Actually initialize send/sendrec permissions for data supplied by rs. --- diff --git a/kernel/system/do_privctl.c b/kernel/system/do_privctl.c index f8acdcb51..a28d3c128 100644 --- a/kernel/system/do_privctl.c +++ b/kernel/system/do_privctl.c @@ -81,6 +81,11 @@ message *m_ptr; /* pointer to request message */ } } + for (i=0; ip_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. */