Gnus development mailing list
 help / color / mirror / Atom feed
From: Michael Welsh Duggan <md5i@md5i.com>
To: ding@gnus.org
Subject: sieve-manage no longer works without authinfo
Date: Mon, 07 Mar 2011 01:04:25 -0500	[thread overview]
Message-ID: <878vwr5uvq.fsf@maru.md5i.com> (raw)

If an entry does not exists for a server in .authinfo, `sieve-manage' is
failing like this:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  fillarray(nil 0)
  sasl-digest-md5-response-value(nil "maru" "Kl93DxIqWEE4iqoNYz5qdoljslNK1/qkjIvYk8HQ/c4=" "4o7fa2m639mza2m6" 1 "auth" "sieve/localhost" nil)
  sasl-digest-md5-response([["DIGEST-MD5" (ignore sasl-digest-md5-response ignore)] nil "sieve" "localhost" sasl-client-properties] [ignore "nonce=\"Kl93DxIqWEE4iqoNYz5qdoljslNK1/qkjIvYk8HQ/c4=\",realm=\"maru\",qop=\"auth,auth-int,auth-conf\",cipher=\"rc4-40,rc4-56,rc4,des,3des\",maxbuf=4096,charset=utf-8,algorithm=md5-sess"])
  sasl-next-step([["DIGEST-MD5" (ignore sasl-digest-md5-response ignore)] nil "sieve" "localhost" sasl-client-properties] [ignore "nonce=\"Kl93DxIqWEE4iqoNYz5qdoljslNK1/qkjIvYk8HQ/c4=\",realm=\"maru\",qop=\"auth,auth-int,auth-conf\",cipher=\"rc4-40,rc4-56,rc4,des,3des\",maxbuf=4096,charset=utf-8,algorithm=md5-sess"])
  (setq step (sasl-next-step client step))
  (while t (setq rsp nil) (goto-char (point-min)) (while (null (or (progn (setq rsp (sieve-manage-is-string)) (if (not (and rsp ...)) (setq rsp nil) (goto-char (match-end 0)) rsp)) (setq rsp (sieve-manage-is-okno)))) (accept-process-output sieve-manage-process 1) (goto-char (point-min))) (sieve-manage-erase) (when (sieve-manage-ok-p rsp) (when (and (cadr rsp) (string-match "^SASL \"\\([^\"]+\\)\"" (cadr rsp))) (sasl-step-set-data step (base64-decode-string (match-string 1 (cadr rsp))))) (if (and (setq step (sasl-next-step client step)) (setq data (sasl-step-data step))) (error "Server not ready for SASL data: %s" data) (throw (quote done) t))) (unless (stringp rsp) (error "Server aborted SASL authentication: %s" (caddr rsp))) (sasl-step-set-data step (base64-decode-string rsp)) (setq step (sasl-next-step client step)) (sieve-manage-send (if (sasl-step-data step) (concat "\"" (base64-encode-string (sasl-step-data step) (quote no-line-break)) "\"") "")))
  (catch (quote done) (while t (setq rsp nil) (goto-char (point-min)) (while (null (or (progn (setq rsp (sieve-manage-is-string)) (if (not ...) (setq rsp nil) (goto-char ...) rsp)) (setq rsp (sieve-manage-is-okno)))) (accept-process-output sieve-manage-process 1) (goto-char (point-min))) (sieve-manage-erase) (when (sieve-manage-ok-p rsp) (when (and (cadr rsp) (string-match "^SASL \"\\([^\"]+\\)\"" (cadr rsp))) (sasl-step-set-data step (base64-decode-string (match-string 1 (cadr rsp))))) (if (and (setq step (sasl-next-step client step)) (setq data (sasl-step-data step))) (error "Server not ready for SASL data: %s" data) (throw (quote done) t))) (unless (stringp rsp) (error "Server aborted SASL authentication: %s" (caddr rsp))) (sasl-step-set-data step (base64-decode-string rsp)) (setq step (sasl-next-step client step)) (sieve-manage-send (if (sasl-step-data step) (concat "\"" (base64-encode-string (sasl-step-data step) (quote no-line-break)) "\"") ""))))
  (let* ((auth-info (auth-source-search :host sieve-manage-server :port "sieve" :max 1)) (user-name (plist-get (nth 0 auth-info) :user)) (user-password (plist-get (nth 0 auth-info) :secret)) (user-password (if (functionp user-password) (funcall user-password) user-password)) (client (sasl-make-client (sasl-find-mechanism (list mech)) user-name "sieve" sieve-manage-server)) (sasl-read-passphrase (\` (lambda (prompt) (\, (copy-sequence user-password))))) (step (sasl-next-step client nil)) (tag (sieve-manage-send (concat "AUTHENTICATE \"" mech "\"" (and (sasl-step-data step) (concat " \"" (base64-encode-string ... ...) "\""))))) data rsp) (catch (quote done) (while t (setq rsp nil) (goto-char (point-min)) (while (null (or (progn (setq rsp ...) (if ... ... ... rsp)) (setq rsp (sieve-manage-is-okno)))) (accept-process-output sieve-manage-process 1) (goto-char (point-min))) (sieve-manage-erase) (when (sieve-manage-ok-p rsp) (when (and (cadr rsp) (string-match "^SASL \"\\([^\"]+\\)\"" (cadr rsp))) (sasl-step-set-data step (base64-decode-string (match-string 1 ...)))) (if (and (setq step (sasl-next-step client step)) (setq data (sasl-step-data step))) (error "Server not ready for SASL data: %s" data) (throw (quote done) t))) (unless (stringp rsp) (error "Server aborted SASL authentication: %s" (caddr rsp))) (sasl-step-set-data step (base64-decode-string rsp)) (setq step (sasl-next-step client step)) (sieve-manage-send (if (sasl-step-data step) (concat "\"" (base64-encode-string (sasl-step-data step) (quote no-line-break)) "\"") "")))) (message "sieve: Login using %s...done" mech))
  (save-current-buffer (set-buffer buffer) (let* ((auth-info (auth-source-search :host sieve-manage-server :port "sieve" :max 1)) (user-name (plist-get (nth 0 auth-info) :user)) (user-password (plist-get (nth 0 auth-info) :secret)) (user-password (if (functionp user-password) (funcall user-password) user-password)) (client (sasl-make-client (sasl-find-mechanism (list mech)) user-name "sieve" sieve-manage-server)) (sasl-read-passphrase (\` (lambda (prompt) (\, (copy-sequence user-password))))) (step (sasl-next-step client nil)) (tag (sieve-manage-send (concat "AUTHENTICATE \"" mech "\"" (and (sasl-step-data step) (concat " \"" ... "\""))))) data rsp) (catch (quote done) (while t (setq rsp nil) (goto-char (point-min)) (while (null (or (progn ... ...) (setq rsp ...))) (accept-process-output sieve-manage-process 1) (goto-char (point-min))) (sieve-manage-erase) (when (sieve-manage-ok-p rsp) (when (and (cadr rsp) (string-match "^SASL \"\\([^\"]+\\)\"" ...)) (sasl-step-set-data step (base64-decode-string ...))) (if (and (setq step ...) (setq data ...)) (error "Server not ready for SASL data: %s" data) (throw (quote done) t))) (unless (stringp rsp) (error "Server aborted SASL authentication: %s" (caddr rsp))) (sasl-step-set-data step (base64-decode-string rsp)) (setq step (sasl-next-step client step)) (sieve-manage-send (if (sasl-step-data step) (concat "\"" (base64-encode-string ... ...) "\"") "")))) (message "sieve: Login using %s...done" mech)))
  (with-current-buffer buffer (let* ((auth-info (auth-source-search :host sieve-manage-server :port "sieve" :max 1)) (user-name (plist-get (nth 0 auth-info) :user)) (user-password (plist-get (nth 0 auth-info) :secret)) (user-password (if (functionp user-password) (funcall user-password) user-password)) (client (sasl-make-client (sasl-find-mechanism (list mech)) user-name "sieve" sieve-manage-server)) (sasl-read-passphrase (\` (lambda (prompt) (\, (copy-sequence user-password))))) (step (sasl-next-step client nil)) (tag (sieve-manage-send (concat "AUTHENTICATE \"" mech "\"" (and (sasl-step-data step) (concat " \"" ... "\""))))) data rsp) (catch (quote done) (while t (setq rsp nil) (goto-char (point-min)) (while (null (or (progn ... ...) (setq rsp ...))) (accept-process-output sieve-manage-process 1) (goto-char (point-min))) (sieve-manage-erase) (when (sieve-manage-ok-p rsp) (when (and (cadr rsp) (string-match "^SASL \"\\([^\"]+\\)\"" ...)) (sasl-step-set-data step (base64-decode-string ...))) (if (and (setq step ...) (setq data ...)) (error "Server not ready for SASL data: %s" data) (throw (quote done) t))) (unless (stringp rsp) (error "Server aborted SASL authentication: %s" (caddr rsp))) (sasl-step-set-data step (base64-decode-string rsp)) (setq step (sasl-next-step client step)) (sieve-manage-send (if (sasl-step-data step) (concat "\"" (base64-encode-string ... ...) "\"") "")))) (message "sieve: Login using %s...done" mech)))
  sieve-sasl-auth(#<buffer  *sieve* localhost:sieve> "DIGEST-MD5")
  sieve-manage-digest-md5-auth(#<buffer  *sieve* localhost:sieve>)
  funcall(sieve-manage-digest-md5-auth #<buffer  *sieve* localhost:sieve>)
  (if (funcall (nth 2 (assq sieve-manage-auth sieve-manage-authenticator-alist)) (current-buffer)) (progn (setq sieve-manage-state (quote auth))))
  (when (funcall (nth 2 (assq sieve-manage-auth sieve-manage-authenticator-alist)) (current-buffer)) (setq sieve-manage-state (quote auth)))
  (if (eq sieve-manage-state (quote nonauth)) (when (funcall (nth 2 (assq sieve-manage-auth sieve-manage-authenticator-alist)) (current-buffer)) (setq sieve-manage-state (quote auth))) sieve-manage-state)
  (save-current-buffer (set-buffer (or buffer (current-buffer))) (if (eq sieve-manage-state (quote nonauth)) (when (funcall (nth 2 (assq sieve-manage-auth sieve-manage-authenticator-alist)) (current-buffer)) (setq sieve-manage-state (quote auth))) sieve-manage-state))
  (with-current-buffer (or buffer (current-buffer)) (if (eq sieve-manage-state (quote nonauth)) (when (funcall (nth 2 (assq sieve-manage-auth sieve-manage-authenticator-alist)) (current-buffer)) (setq sieve-manage-state (quote auth))) sieve-manage-state))
  sieve-manage-authenticate()
  sieve-open-server("localhost" nil)
  sieve-manage("localhost")
  call-interactively(sieve-manage t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

-- 
Michael Welsh Duggan
(md5i@md5i.com)



             reply	other threads:[~2011-03-07  6:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07  6:04 Michael Welsh Duggan [this message]
2011-03-07 11:16 ` Ted Zlatanov
2011-03-07 14:33   ` Julien Danjou
2011-03-07 15:30     ` Ted Zlatanov
2011-03-07 15:42       ` Julien Danjou
2011-03-07 15:46         ` Ted Zlatanov
2011-03-08  1:36         ` Michael Welsh Duggan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878vwr5uvq.fsf@maru.md5i.com \
    --to=md5i@md5i.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).