• Joel Hockey's avatar
    Use username from cicerone when doing sshfs for crostini mount · 681e82b3
    Joel Hockey authored
    Chrome creates the container with default username derived from
    the email address of the current logged in profile.
    E.g. test.user@gmail.com gets username 'testuser'.
    
    It is possible for users to change the username inside the container.
    As long as the user keeps uid=1000, this does not cause issues
    except for the sshfs mount where FilesApp connects to the container
    using 'sshfs://username@hostname'.
    
    Cicerone is now updated to return the container username in
    ContainerStartedSignal and in SetUpLxdContainerUser.  CrostiniManager
    can now use this for the sshfs mount.
    
    Removed crostini_util ContainerHomeDirectoryForProfile which was
    using the default username.  The container homedir is now available
    in CrostiniManager::GetContainerInfo.
    
    Bug: 916297
    Change-Id: I27f41647c3b8809170521d741867a8ed430e5476
    Reviewed-on: https://chromium-review.googlesource.com/c/1388124
    Commit-Queue: Joel Hockey <joelhockey@chromium.org>
    Reviewed-by: default avatarTimothy Loh <timloh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#619897}
    681e82b3
crostini_util.cc 15.9 KB