From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68735 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: auth-source patch for secure logging Date: Thu, 16 Jul 2009 09:33:02 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87my74r941.fsf@lifelogs.com> References: <87vdlsr9jy.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1247755221 9794 80.91.229.12 (16 Jul 2009 14:40:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jul 2009 14:40:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: ding@gnus.org Original-X-From: ding-owner+M17159@lists.math.uh.edu Thu Jul 16 16:40:14 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1MRS85-0004wi-SQ for ding-account@gmane.org; Thu, 16 Jul 2009 16:40:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1MRS7z-0001VE-5y; Thu, 16 Jul 2009 09:40:07 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1MRS7x-0001Uy-B8 for ding@lists.math.uh.edu; Thu, 16 Jul 2009 09:40:05 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1MRS7w-0007zY-28 for ding@lists.math.uh.edu; Thu, 16 Jul 2009 09:40:05 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1MRS8T-0002eJ-00 for ; Thu, 16 Jul 2009 16:40:37 +0200 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1MRS7u-0003Vq-Dp for ding@gnus.org; Thu, 16 Jul 2009 14:40:02 +0000 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Jul 2009 14:40:02 +0000 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Jul 2009 14:40:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 97 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:wMU/oj5hvYS/Xl+LJLVbWqAVtEg= X-Spam-Score: -1.5 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68735 gmane.emacs.devel:112533 Archived-At: --=-=-= On Thu, 16 Jul 2009 09:23:29 -0500 Ted Zlatanov wrote: TZ> Attached is a patch to auth-source.el that: Of course, the actual patch file is optional on the first message. Ted --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=auth-source.patch 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) --=-=-=--