From 9b77421d8628dbf433dc7491c7c325cf718f7263 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 1 Apr 2024 14:04:56 +0800 Subject: [PATCH] Fix androidsu's `make-process' file name handler * lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process): Disable exec loader around call to setuid su binary. (cherry picked from commit 9caf5cb55a3889fea019c73d6a3040204d77bf39) --- lisp/net/tramp-androidsu.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lisp/net/tramp-androidsu.el b/lisp/net/tramp-androidsu.el index 09bee323f5e..1ec9247cf3c 100644 --- a/lisp/net/tramp-androidsu.el +++ b/lisp/net/tramp-androidsu.el @@ -366,13 +366,19 @@ FUNCTION." ;; suitable options for specifying the mount namespace and ;; suchlike. (setq - p (make-process - :name name :buffer buffer - :command (if (tramp-get-connection-property v "remote-namespace") - (append (list "su" "-mm" "-" user "-c") command) - (append (list "su" "-" user "-c") command)) - :coding coding :noquery noquery :connection-type connection-type - :sentinel sentinel :stderr stderr)) + p (let ((android-use-exec-loader nil)) + (make-process + :name name + :buffer buffer + :command + (if (tramp-get-connection-property v "remote-namespace") + (append (list "su" "-mm" "-" user "-c") command) + (append (list "su" "-" user "-c") command)) + :coding coding + :noquery noquery + :connection-type connection-type + :sentinel sentinel + :stderr stderr))) ;; Set filter. Prior Emacs 29.1, it doesn't work reliably ;; to provide it as `make-process' argument when filter is ;; t. See Bug#51177. -- 2.39.5