Closed Bug 409545 Opened 18 years ago Closed 18 years ago

profile-sshagent.sh chokes on spaces in $HOME

Categories

(Firefox Build System :: MozillaBuild, task)

x86
Windows 2000
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: swsnyder, Assigned: swsnyder)

References

Details

Attachments

(2 files)

In MozillaBuild v1.2 the environment variable SSH_ENV is mis-interpreted due to the HOME env var being mishandled earlier in the script. Example, user's perspective: $ sh /c/mozilla-build/msys/etc/profile.d/profile-sshagent.sh /c/mozilla-build/msys/etc/profile.d/profile-sshagent.sh.original: /c/Documents and Settings/Steve Snyder/.ssh/environment: No such file or directory chmod: cannot access `/c/Documents': No such file or directory chmod: cannot access `and': No such file or directory chmod: cannot access `Settings/Steve': No such file or directory chmod: cannot access `Snyder/.ssh/environment': No such file or directory /c/mozilla-build/msys/etc/profile.d/profile-sshagent.sh.original: /c/Documents: No such file or directory Example, what it's actually doing:
Oops! Forgot to paste that last section of text. Example, what it's actually doing: $ sh -x /c/mozilla-build/msys/etc/profile.d/profile-sshagent.sh + SSH_ENV=/c/Documents and Settings/Steve Snyder/.ssh/environment + '[' -f '/c/Documents and Settings/Steve Snyder/.ssh/environment' ']' + start_agent + ssh-agent + sed 's/^echo/#echo/' /c/mozilla-build/msys/etc/profile.d/profile-sshagent.sh: /c/Documents and Settings/Steve Snyder/.ssh/environment: No such file or directory + chmod 600 /c/Documents and Settings/Steve Snyder/.ssh/environment chmod: cannot access `/c/Documents': No such file or directory chmod: cannot access `and': No such file or directory chmod: cannot access `Settings/Steve': No such file or directory chmod: cannot access `Snyder/.ssh/environment': No such file or directory + . /c/Documents and Settings/Steve Snyder/.ssh/environment /c/mozilla-build/msys/etc/profile.d/profile-sshagent.sh: /c/Documents: No such file or directory
Comment on attachment 294363 [details] [diff] [review] [checked in] Add quotes to ensure that env vars are handled correctly Thanks for the fix Steve, we appreciate it. AFAIK the default ~/ for MozillaBuild is, ex, c:\mozilla-build\msys\home, so I think we'll leave this for MozillaBuild 1.3.
Attachment #294363 - Flags: review+
Checking in profile-sshagent.sh; /cvsroot/mozilla/tools/build-environment/win32/profile-sshagent.sh,v <-- profile-sshagent.sh new revision: 1.2; previous revision: 1.1 done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
A quoting of $SSH_ENV was missed in this patch; and there's other error handling to be done. Patch upcoming.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #294363 - Attachment description: Add quotes to ensure that env vars are handled correctly → [checked in] Add quotes to ensure that env vars are handled correctly
Attachment #295239 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 295239 [details] [diff] [review] [checked in] quote the last ${SSH_ENV}, don't try to start if ~/.ssh doesn't exist Checking in profile-sshagent.sh; /cvsroot/mozilla/tools/build-environment/win32/profile-sshagent.sh,v <-- profile-sshagent.sh new revision: 1.3; previous revision: 1.2 done
Attachment #295239 - Attachment description: quote the last ${SSH_ENV}, don't try to start if ~/.ssh doesn't exist → [checked in] quote the last ${SSH_ENV}, don't try to start if ~/.ssh doesn't exist
Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → FIXED
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: