Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use append_file in Redhat6xOSUtil.openssl_to_openssh() #1349

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

szarkos
Copy link
Contributor

@szarkos szarkos commented Sep 28, 2018

The ARM osprofile supports multiple SSH keys to embed into the user'ss
authorized_keys file. In DefaultOSUtil.openssl_to_openssh() we simply
run ssh-keygen and append ('>>') any public keys to the authorized_keys
file.

However, in older RHEL6 we did not have the PKCS8 module available with
ssh-keygen, so we wrote a different routine to handle this conversion
manually, Redhat6xOSUtil.openssl_to_openssh(). This function has a bug
that uses the write_file() utility function instead of append_file().
This fixes the bug.

Description

Issue #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing.

Quality of Code and Contribution Guidelines

The ARM osprofile supports multiple SSH keys to embed into the user'ss
authorized_keys file. In DefaultOSUtil.openssl_to_openssh() we simply
run ssh-keygen and append ('>>') any public keys to the authorized_keys
file.

However, in older RHEL6 we did not have the PKCS8 module available with
ssh-keygen, so we wrote a different routine to handle this conversion
manually, Redhat6xOSUtil.openssl_to_openssh(). This function has a bug
that uses the write_file() utility function instead of append_file().
This fixes the bug.
Copy link
Member

@narrieta narrieta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thank you for your contribution

@narrieta
Copy link
Member

narrieta commented Oct 8, 2018

BVTs OK

@vrdmr vrdmr added this to the Release v2.2.33 milestone Oct 15, 2018
@narrieta narrieta merged commit 8903e92 into Azure:master Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants