]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix androidsu's `make-process' file name handler
authorPo Lu <luangruo@yahoo.com>
Mon, 1 Apr 2024 06:04:56 +0000 (14:04 +0800)
committerEshel Yaron <me@eshelyaron.com>
Tue, 2 Apr 2024 13:22:58 +0000 (15:22 +0200)
* 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

index 09bee323f5ee7072e7855dba7dfea0496cf47edb..1ec9247cf3c2df352def4bbfea594698aba84f64 100644 (file)
@@ -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.