You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a user testagent with SSH keys in project/instance metadata.
Wait for agent to create user & provision.
Create a user agent with SSH keys in project/instance metadata.
Observe keys for user agent written into /home/testagent/.ssh/authorized_keys
This occurs because the code for getPasswd only checks that the entry in /etc/passwdcontains the username followed by :. Of course, it only occurs if the longer username is first in /etc/passwd and the shorter username is 2nd in the project/instance metadata.
I'll send a PR with a fix shortly.
The text was updated successfully, but these errors were encountered:
Matir
added a commit
to Matir/guest-agent
that referenced
this issue
Sep 30, 2020
This fixesGoogleCloudPlatform#80 where the username is checked with Contains, resulting in improper parsing when a username is a suffix of another username.
Steps to reproduce:
testagent
with SSH keys in project/instance metadata.agent
with SSH keys in project/instance metadata.agent
written into/home/testagent/.ssh/authorized_keys
This occurs because the code for
getPasswd
only checks that the entry in/etc/passwd
contains the username followed by:
. Of course, it only occurs if the longer username is first in/etc/passwd
and the shorter username is 2nd in the project/instance metadata.I'll send a PR with a fix shortly.
The text was updated successfully, but these errors were encountered: