From 39c6437e472a155414085b1ee57cf499b518aa57 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 19 Dec 2022 10:23:14 +0100 Subject: [PATCH] Ignore some handlers in ange-ftp.el * lisp/net/ange-ftp.el: Return nil for `file-acl', `file-notify-add-watch', `file-notify-rm-watch', `file-notify-valid-p', `file-system-info', `list-system-processes', `memory-info', `process-attributes', `set-file-acl', `set-file-selinux-context'. --- lisp/net/ange-ftp.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 6e17e417ea3..9781ebf863a 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -4498,6 +4498,25 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") (put 'process-file 'ange-ftp 'ange-ftp-process-file) (put 'start-file-process 'ange-ftp 'ignore) (put 'shell-command 'ange-ftp 'ange-ftp-shell-command) + +;; Do not execute system information functions. +(put 'file-system-info 'ange-ftp 'ignore) +(put 'list-system-processes 'ange-ftp 'ignore) +(put 'memory-info 'ange-ftp 'ignore) +(put 'process-attributes 'ange-ftp 'ignore) + +;; There aren't ACLs. `file-selinux-context' shall return '(nil nil +;; nil nil) if the file is nonexistent, so we let the default file +;; name handler do the job. +(put 'file-acl 'ange-ftp 'ignore) +;; (put 'file-selinux-context 'ange-ftp 'ignore) +(put 'set-file-acl 'ange-ftp 'ignore) +(put 'set-file-selinux-context 'ange-ftp 'ignore) + +;; There aren't file notifications. +(put 'file-notify-add-watch 'ange-ftp 'ignore) +(put 'file-notify-rm-watch 'ange-ftp 'ignore) +(put 'file-notify-valid-p 'ange-ftp 'ignore) ;;; Define ways of getting at unmodified Emacs primitives, ;;; turning off our handler. -- 2.39.2