1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 11:25:35 +02:00

Bug 313991 - [terminal] [ssh] cannot programatically pass password to SshConnector

This commit is contained in:
Martin Oberhuber 2010-05-27 10:32:25 +00:00
parent d139960708
commit 79b4a3cf94
4 changed files with 14 additions and 6 deletions

View file

@ -1,5 +1,5 @@
################################################################################ ################################################################################
# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others. # Copyright (c) 2006, 2010 Wind River Systems, Inc. and others.
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0 # are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at # which accompanies this distribution, and is available at
@ -21,5 +21,5 @@ blurb=Target Management Terminal SSH Connector Source\n\
Version: {featureVersion}\n\ Version: {featureVersion}\n\
Build id: {0}\n\ Build id: {0}\n\
\n\ \n\
(c) Copyright Wind River Systems, Inc. and others 2000, 2009. All rights reserved.\n\ (c) Copyright Wind River Systems, Inc. and others 2000, 2010. All rights reserved.\n\
Visit http://www.eclipse.org/dsdp/tm Visit http://www.eclipse.org/dsdp/tm

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: %pluginName Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.ssh;singleton:=true Bundle-SymbolicName: org.eclipse.tm.terminal.ssh;singleton:=true
Bundle-Version: 2.0.100.qualifier Bundle-Version: 2.0.200.qualifier
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Bundle-Localization: plugin Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui, Require-Bundle: org.eclipse.ui,

View file

@ -1,5 +1,5 @@
################################################################################ ################################################################################
# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others. # Copyright (c) 2006, 2010 Wind River Systems, Inc. and others.
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0 # are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at # which accompanies this distribution, and is available at
@ -21,5 +21,5 @@ blurb=Target Management Terminal SSH Connector\n\
Version: {featureVersion}\n\ Version: {featureVersion}\n\
Build id: {0}\n\ Build id: {0}\n\
\n\ \n\
(c) Copyright Wind River Systems, Inc. and others 2000, 2009. All rights reserved.\n\ (c) Copyright Wind River Systems, Inc. and others 2000, 2010. All rights reserved.\n\
Visit http://www.eclipse.org/dsdp/tm Visit http://www.eclipse.org/dsdp/tm

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. * Copyright (c) 2006, 2010 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -10,6 +10,7 @@
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
* Mikhail Kalugin <fourdman@xored.com> - [201867] Improve Terminal SSH connection summary string * Mikhail Kalugin <fourdman@xored.com> - [201867] Improve Terminal SSH connection summary string
* Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
* Bryan Hunt - [313991] cannot programatically pass password to SshConnector
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.ssh; package org.eclipse.tm.internal.terminal.ssh;
@ -41,6 +42,10 @@ public class SshSettings implements ISshSettings {
public void load(ISettingsStore store) { public void load(ISettingsStore store) {
fHost = store.get("Host");//$NON-NLS-1$ fHost = store.get("Host");//$NON-NLS-1$
fUser = store.get("User");//$NON-NLS-1$ fUser = store.get("User");//$NON-NLS-1$
// ISettingsStore providers have to make sure that
// the password is not saved in some as plain text
// on disk. [bug 313991]
fPassword = store.get("Password");//$NON-NLS-1$
fPort = store.get("Port");//$NON-NLS-1$ fPort = store.get("Port");//$NON-NLS-1$
fTimeout = store.get("Timeout");//$NON-NLS-1$ fTimeout = store.get("Timeout");//$NON-NLS-1$
fKeepalive = store.get("Keepalive");//$NON-NLS-1$ fKeepalive = store.get("Keepalive");//$NON-NLS-1$
@ -51,6 +56,9 @@ public class SshSettings implements ISshSettings {
store.put("Host", fHost);//$NON-NLS-1$ store.put("Host", fHost);//$NON-NLS-1$
store.put("User", fUser);//$NON-NLS-1$ store.put("User", fUser);//$NON-NLS-1$
store.put("Port", fPort);//$NON-NLS-1$ store.put("Port", fPort);//$NON-NLS-1$
// We do *not* store the password in the settings because
// this can cause the password to be stored as plain text
// in some settings file
store.put("Timeout", fTimeout);//$NON-NLS-1$ store.put("Timeout", fTimeout);//$NON-NLS-1$
store.put("Keepalive", fKeepalive);//$NON-NLS-1$ store.put("Keepalive", fKeepalive);//$NON-NLS-1$
} }