From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Cc: emacs-devel@gnu.org
Subject: Re: auth-source patch for secure logging
Date: Thu, 16 Jul 2009 09:33:02 -0500 [thread overview]
Message-ID: <87my74r941.fsf@lifelogs.com> (raw)
In-Reply-To: 87vdlsr9jy.fsf@lifelogs.com
[-- Attachment #1: Type: text/plain, Size: 198 bytes --]
On Thu, 16 Jul 2009 09:23:29 -0500 Ted Zlatanov <tzz@lifelogs.com> wrote:
TZ> Attached is a patch to auth-source.el that:
Of course, the actual patch file is optional on the first message.
Ted
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: auth-source.patch --]
[-- Type: text/x-diff, Size: 2802 bytes --]
Index: auth-source.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/auth-source.el,v
retrieving revision 7.16
diff -r7.16 auth-source.el
102a77,100
> (defcustom auth-source-debug nil
> "Whether auth-source should log debug messages.
> Also see `auth-source-hide-passwords'.
>
> Can be t, which means to use `message'. Be careful, your
> authentication data will be in the clear (except for passwords,
> which are always cleared)..
>
> Can also be a function, in which case the function should take
> the same parameters as `message'."
> :group 'auth-source
> :version "23.1" ;; No Gnus
> :type `(choice
> :tag "auth-source debugging mode"
> (const :tag "Log using `message' to the *Messages* buffer" t)
> (function :tag "Function that takes arguments like `message'")
> (const :tag "Don't log anything" nil)))
>
> (defcustom auth-source-hide-passwords t
> "Whether auth-source should hide passwords in log messages."
> :group 'auth-source
> :version "23.1" ;; No Gnus
> :type `boolean)
>
139a138,150
> ;; (let ((auth-source-debug 'debug)) (auth-source-debug "hello"))
> ;; (let ((auth-source-debug t)) (auth-source-debug "hello"))
> ;; (let ((auth-source-debug nil)) (auth-source-debug "hello"))
> (defun auth-source-do-debug (&rest msg)
> ;; set logger to either the function in auth-source-debug or 'message
> ;; note that it will be 'message if auth-source-debug is nil, so
> ;; we also check the value
> (let ((logger (if (functionp auth-source-debug)
> auth-source-debug
> 'message)))
> (when auth-source-debug
> (apply logger msg))))
>
174,176c185,187
< (gnus-message 9
< "auth-source-user-or-password: get %s for %s (%s)"
< mode host protocol)
---
> (auth-source-do-debug
> "auth-source-user-or-password: get %s for %s (%s)"
> mode host protocol)
183,188c194,199
< (gnus-message 9
< "auth-source-user-or-password: cached %s=%s for %s (%s)"
< mode
< ;; don't show the password
< (if (member "password" mode) "SECRET" found)
< host protocol)
---
> (auth-source-do-debug
> "auth-source-user-or-password: cached %s=%s for %s (%s)"
> mode
> ;; don't show the password
> (if (and (member "password" mode) auth-source-hide-passwords) "SECRET" found)
> host protocol)
198,203c209,214
< (gnus-message 9
< "auth-source-user-or-password: found %s=%s for %s (%s)"
< mode
< ;; don't show the password
< (if (member "password" mode) "SECRET" found)
< host protocol)
---
> (auth-source-do-debug
> "auth-source-user-or-password: found %s=%s for %s (%s)"
> mode
> ;; don't show the password
> (if (and (member "password" mode) auth-source-hide-passwords) "SECRET" found)
> host protocol)
next prev parent reply other threads:[~2009-07-16 14:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 14:23 auth-source patch for secure logging Ted Zlatanov
2009-07-16 14:33 ` Ted Zlatanov [this message]
2009-07-16 15:55 ` Davis Herring
2009-07-16 16:21 ` Ted Zlatanov
2009-07-16 15:32 ` Chong Yidong
2009-07-16 16:15 ` Ted Zlatanov
2009-07-16 18:09 ` Ted Zlatanov
2009-07-17 17:31 ` Glenn Morris
2009-07-17 17:53 ` Ted Zlatanov
2009-07-17 18:01 ` Glenn Morris
2009-07-17 18:09 ` Ted Zlatanov
2009-07-17 18:35 ` Chong Yidong
2009-07-18 17:21 ` Chong Yidong
2009-07-17 19:42 ` Sven Joachim
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87my74r941.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).