]> Zhao Yanbai Git Server - minix.git/commitdiff
Make sys_umap on grants check grantee
authorErik van der Kouwe <erik@minix3.org>
Thu, 9 Jun 2011 05:05:20 +0000 (05:05 +0000)
committerErik van der Kouwe <erik@minix3.org>
Thu, 9 Jun 2011 05:05:20 +0000 (05:05 +0000)
kernel/system/do_umap.c

index a19f191d0006ecad9a2ee2c3aec8a2f767825f33..eb83db7d9bc408fcbf6a63015711d654ac3508b2 100644 (file)
@@ -53,8 +53,8 @@ PUBLIC int do_umap(struct proc * caller, message * m_ptr)
        int new_proc_nr;
        cp_grant_id_t grant = (cp_grant_id_t) offset;
 
-        if(verify_grant(targetpr->p_endpoint, ANY, grant, count, 0, 0,
-                &newoffset, &newep) != OK) {
+        if(verify_grant(targetpr->p_endpoint, caller->p_endpoint, grant, count,
+                0, 0, &newoffset, &newep) != OK) {
                 printf("SYSTEM: do_umap: verify_grant in %s, grant %d, bytes 0x%lx, failed, caller %s\n", targetpr->p_name, offset, count, caller->p_name);
                proc_stacktrace(caller);
                 return EFAULT;