Function: tramp-crypt-send-command
tramp-crypt-send-command is a byte-compiled function defined in
tramp-crypt.el.gz.
Signature
(tramp-crypt-send-command VEC &rest ARGS)
Documentation
Send encfsctl command to connection VEC.
ARGS are the arguments. It returns t if ran successful, and nil otherwise.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-crypt.el.gz
(defun tramp-crypt-send-command (vec &rest args)
"Send encfsctl command to connection VEC.
ARGS are the arguments. It returns t if ran successful, and nil otherwise."
(tramp-crypt-maybe-open-connection vec)
(with-current-buffer (tramp-get-connection-buffer vec)
(erase-buffer)
(set-buffer-multibyte nil))
(with-temp-buffer
(let* (;; Don't check for a proper method.
(non-essential t)
(default-directory tramp-compat-temporary-file-directory)
;; We cannot add it to `process-environment', because
;; `tramp-call-process-region' doesn't use it.
(encfs-config
(format "ENCFS6_CONFIG=%s" (tramp-crypt-config-file-name vec)))
(args (delq nil args)))
;; Enable `auth-source', unless "emacs -Q" has been called.
(tramp-set-connection-property
vec " first-password-request" tramp-cache-read-persistent-data)
(insert
(tramp-read-passwd
(tramp-get-connection-process vec)
(format "EncFS Password for %s " (tramp-crypt-get-remote-dir vec))))
(when (zerop
(apply
#'tramp-call-process-region vec (point-min) (point-max)
"env" nil (tramp-get-connection-buffer vec)
nil encfs-config tramp-crypt-encfsctl-program
(car args) "--extpass=cat" (cdr args)))
;; Save the password.
(ignore-errors
(and (functionp tramp-password-save-function)
(funcall tramp-password-save-function)))
t))))