io-revoke.lisp 618 B

12345678910111213141516171819
  1. (in-package :hurd-translator)
  2. (def-io-interface :io-revoke ((file port))
  3. (with-lookup protid file
  4. (let ((this-node (get-node protid))
  5. (bucket (port-bucket *translator*)))
  6. (cond
  7. ((is-owner-p this-node (get-user protid))
  8. (bucket-iterate bucket
  9. (lambda (port)
  10. (when (and (typep port 'protid)
  11. (eq this-node (get-node port)))
  12. (unless (eq port protid)
  13. (bucket-remove-port bucket port)))))
  14. t)
  15. (t :not-permitted)))))