Your message dated Fri, 08 Jul 2005 22:45:02 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Bugs closed in previous upstream versions
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 27 Oct 2004 17:55:32 +0000
>From [EMAIL PROTECTED] Wed Oct 27 10:55:32 2004
Return-path: <[EMAIL PROTECTED]>
Received: from (lonximss01.eu.citrix.com) [195.153.38.121]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1CMs1D-0006pq-00; Wed, 27 Oct 2004 10:55:31 -0700
Received: from LONPEXCH5IM01.eu.citrix.com ([10.30.224.191]) by
lonximss01.eu.citrix.com with InterScan Messaging Security Suite; Wed, 27 Oct
2004 18:24:37 +0100
Received: from canisp.cam.eu.citrix.com ([10.70.129.117]) by
LONPEXCH5IM01.eu.citrix.com with SMTP (Microsoft Exchange Internet Mail Service
Version 5.5.2656.59)
id VVPN9DXJ; Wed, 27 Oct 2004 18:24:27 +0100
From: Toby Speight <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: tramp: Dangerous fset of substitute-in-file-name
X-Debbugs-CC: Toby Speight <[EMAIL PROTECTED]>,
[email protected]
Date: Wed, 27 Oct 2004 18:24:27 +0100
Message-ID: <[EMAIL PROTECTED]>
Lines: 83
Organization: Citrix Systems <URL:http://citrix.com/>
X-Face:
T,QK^R4['}UwA"]bf:YD$2mZF\1%}\FEd/]Io%5T3[|~HUaR:!WOLCic7XE4H`cdc{f|][4bL}yxhypxGygoO0nTK1(t-~7!uKq?qf+U<I#D76MmTC%,]&?1JK0<$75:?
=?M>qf;eq,jx!\!s'e/@$a6CKI>M8-
Sender: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
X_DEBBUGS_CC autolearn=ham version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level:
Package: tramp
Version: 1:2.0.45-1
Severity: normal
File: /usr/share/emacs/site-lisp/tramp/tramp-smb.el
I recently discovered problems with code that used substitute-in-file-name
to expand environment variables in file names. It turned out that the name
in question was not having its environment variables expanded correctly.
Subsequent investigation showed that substitute-in-file-name is fbound
to 'identity.
Grepping through all my emacs-lisp for code that could change the binding
of substitute-in-file-name turned up this snippet in tramp-smb.el:
/--------
| ;; Do `PC-do-completion' without substitution
| (let* (save)
| (fset 'save (symbol-function 'substitute-in-file-name))
| (fset 'substitute-in-file-name (symbol-function 'identity))
| ad-do-it
| (fset 'substitute-in-file-name (symbol-function 'save)))
\--------
which has no unwind-protect at all to ensure that substitute-in-file-name
is restored afterwards, even in the face of errors.
Also, it does not do what you think in the recursive case. Creating a
dynamic variable with `let' does not affect function lookup using that
name:
/--------
| (let* (save)
| (fset 'save (symbol-function 'identity))
| (let* (save)
| (fset 'save (symbol-function 'ignore)))
| (save t))
| nil
\--------
/--------
| (let* ((save (symbol-function 'identity)))
| (let* ((save (symbol-function 'ignore))))
| (funcall save t))
| t
\--------
As well as being neater and easier to read, the version that stores
the value in a variable slot rather than a function slot actually
works correctly in more cases.
I don't know if the above is the source of my problem (I didn't
knowingly ask for SMB resources), but there is definitely an issue:
* Use unwind-protect to restore the binding
* Use the variable slot rather than the function slot to save it
Untested code:
/--------
| ;; Do `PC-do-completion' without substitution
| (let (save (symbol-function 'substitute-in-file-name))
| (fset 'substitute-in-file-name (symbol-function 'identity))
| (unwind-protect
| ad-do-it
| (fset 'substitute-in-file-name save)))
\--------
--
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (990, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8
Locale: LANG=en_GB, LC_CTYPE=en_GB
Versions of packages tramp depends on:
ii emacs21 [emacsen] 21.3+1-8 The GNU Emacs editor
-- no debconf information
---------------------------------------
Received: (at 278550-done) by bugs.debian.org; 8 Jul 2005 20:44:59 +0000
>From [EMAIL PROTECTED] Fri Jul 08 13:44:58 2005
Return-path: <[EMAIL PROTECTED]>
Received: from yeast.orebokech.com [82.67.41.165] (romain)
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1DqziT-0001Ib-00; Fri, 08 Jul 2005 13:44:57 -0700
Received: from pacem.orebokech.com (pacem.orebokech.com [192.168.1.3])
by yeast.orebokech.com (Postfix) with ESMTP id 2F7F412F5F;
Fri, 8 Jul 2005 22:44:56 +0200 (CEST)
Received: by pacem.orebokech.com (Postfix, from userid 1000)
id 5733A52A50; Fri, 8 Jul 2005 22:45:02 +0200 (CEST)
From: Romain Francoise <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED]
Subject: Bugs closed in previous upstream versions
Organization: The Debian Project
Mail-Copies-To: nobody
Date: Fri, 08 Jul 2005 22:45:02 +0200
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no
version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
These bugs were closed in previous upstream versions (the package is now
at Tramp 2.0.49). I am now closing them, please reopen if the bug is
still present in tramp 2.0.49-1 or newer.
--
,''`.
: :' : Romain Francoise <[EMAIL PROTECTED]>
`. `' http://people.debian.org/~rfrancoise/
`-
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]