Skip to content

Commit

Permalink
nassh: mark sftp mounts as non-persistent across logouts
Browse files Browse the repository at this point in the history
Since the current sftp code has no way of resuming mounts, mark it as
disabled using the new "persistent" field in Chrome 64.  Maybe some day
we'll have a way of trying to auto-resume (either using saved keys or
autoprompting for credentials), but until then, the user doesn't have
to go through every mount and explicitly unmount it on login.

Change-Id: If77415d79f92139fe277ad5cfb510440b63e3ebe
Reviewed-on: https://chromium-review.googlesource.com/822776
Reviewed-by: Brandon Gilmore <[email protected]>
Tested-by: Mike Frysinger <[email protected]>
  • Loading branch information
vapier committed Dec 13, 2017
1 parent 6bea8c7 commit a0dba72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nassh/js/nassh_command_instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,10 @@ function isSftpInitResponse(data) {
* SFTP Initialization handler. Mounts the SFTP connection as a file system.
*/
nassh.CommandInstance.prototype.onSftpInitialised = function() {
// Newer versions of Chrome support this API, but olders will error out.
if (lib.f.getChromeMilestone() >= 64)
this.mountOptions['persistent'] = false;

// Mount file system.
chrome.fileSystemProvider.mount(this.mountOptions);

Expand Down

0 comments on commit a0dba72

Please sign in to comment.