X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=2.4 required=5.0 tests=AWL,BAYES_00,BOTNET X-Spam-Check-By: sourceware.org Message-id: <4B7DAAF8.6050804@cygwin.com> Date: Thu, 18 Feb 2010 16:02:48 -0500 From: "Larry Hall (Cygwin)" Reply-to: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 MIME-version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: ssh + patch + $TMP References: <1266525566 DOT 7752 DOT 1360709921 AT webmail DOT messagingengine DOT com> <20100218205202 DOT GY5683 AT calimero DOT vinschen DOT de> In-reply-to: <20100218205202.GY5683@calimero.vinschen.de> Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 02/18/2010 03:52 PM, Corinna Vinschen wrote: > On Feb 18 15:39, Charles Wilson wrote: >> I ran across an interesting "feature" of remote access today. I was >> ssh'ed in to my cygwin computer, under my normal windows/cygwin account >> name, and tried to run 'patch': >> >> $ patch -p1 -R --dry-run< ../some-patch.patch >> patch: **** Can't create file >> /c/Users/CYG_SE~1/AppData/Local/Temp/poFOD7WH : Not a directory >> >> $ echo $TMP >> /c/Users/CYG_SE~1/AppData/Local/Temp >> >> $ echo $TEMP >> /c/Users/CYG_SE~1/AppData/Local/Temp >> >> $ echo $TMPDIR >> >> >> Obviously, my regular user doesn't have access to cyg_server's AppData >> directory. This is easily fixed, of course, by setting $TMP=/tmp (or >> /c/Users//AppData/Local/Temp, if you like). The question is, should >> this be something that is done by default in /etc/profile (e.g. part of >> the base-files package)? > > In contrast to other systems, sshd for Cygwin preserves a couple of > environment variables from the parent sshd process running under the > cyg_server account. The list of preserved variables is: > > ALLUSERSPROFILE > COMMONPROGRAMFILES > COMPUTERNAME > COMSPEC > CYGWIN > NUMBER_OF_PROCESSORS > OS > PATH > PATHEXT > PROCESSOR_ARCHITECTURE > PROCESSOR_IDENTIFIER > PROCESSOR_LEVEL > PROCESSOR_REVISION > PROGRAMFILES > SYSTEMDRIVE > SYSTEMROOT > TMP > TEMP > WINDIR > > Is it time to reduce this list? Should sshd remove TMP and TEMP? > Anything else? I agree that TMP and TEMP should go. PATH and PATHEXT might be nice to jettison. PATH might be problematic and is probably overwritten typically, so if it has to stay, that may not be a big deal. PATHEXT is likely in the same boat as PATH though far less important. Everything else looks to me like stuff that would be the same for all users anyway. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple