]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/host.c
xnu-6153.41.3.tar.gz
[apple/xnu.git] / osfmk / kern / host.c
index e336fcc09f1f6edaa183ede2bb0e087ce4c9d439..a4a617d32c7d55e046b1088332d3aae01c77670b 100644 (file)
@@ -1278,6 +1278,10 @@ kernel_set_special_port(host_priv_t host_priv, int id, ipc_port_t port)
 
        host_lock(host_priv);
        old_port = host_priv->special[id];
+       if ((id == HOST_AMFID_PORT) && (task_pid(current_task()) != 1)) {
+               host_unlock(host_priv);
+               return KERN_NO_ACCESS;
+       }
        host_priv->special[id] = port;
        host_unlock(host_priv);