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

Upgrade openssh #26

Merged
merged 10 commits into from Sep 14, 2018
Merged

Upgrade openssh #26

merged 10 commits into from Sep 14, 2018

Conversation

alebabai
Copy link
Contributor

@alebabai alebabai commented Sep 12, 2018

what

  • update openssh-portable version
  • update own patches (original-command.diff and obfuscate-version.diff)
  • sync patches from alpine (delete old, pull new)

why

closes #19
closes #16

references

@alebabai
Copy link
Contributor Author

Compilation still fails for all of these cases:

  • completely without patches
  • with old alpine patches and updated own patches
  • only with updated alpine patches
  • with update alpine patches and updated own patches

@alebabai
Copy link
Contributor Author

The problem is in realpath function.
this patch bsd-compatible-realpath.diff should be updated too

@osterman
Copy link
Member

@alebabai should we add a Makefile target to download the current patches the way we did for the helm charts?

@osterman
Copy link
Member

osterman commented Sep 12, 2018

@alebabai if it makes it easier to maintain, you can put the patches into vendor folders so we know what's upstream and our own.

E.g. wget —mirror

Copy link
Member

@osterman osterman left a comment

Choose a reason for hiding this comment

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

See inline comments

@alebabai
Copy link
Contributor Author

should we add a Makefile target to download the current patches the way we did for the helm charts?

I don't think so, because some patches could require to be updated (e.g. bsd-compatible-realpath).

if it makes it easier to maintain, you can put the patches into vendor folders so we know what's upstream and our own.

yeap, it's good idea

@@ -0,0 +1,197 @@
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Move to appropriate vendor folder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeap, but i modified it - now it differs significantly from alpine one

Copy link
Member

@osterman osterman left a comment

Choose a reason for hiding this comment

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

Move patch to appropriate vendor folder

@osterman
Copy link
Member

osterman commented Sep 13, 2018

Please add a README.md to the patches folder that reads something like this:

OpenSSH will not compile out-of-the-box on alpine. For this reason, we use the official patches found here:
- https://git.alpinelinux.org/cgit/aports/tree/main/openssh

We also add a couple of our own patches. 

One patch ensures we have `SSH_ORIGINAL_COMMAND` available during pam auth so we can send slack notifications.
https://github.com/cloudposse/bastion/blob/master/patches/openssh/original-command.diff

The other patch obscures the version of OpenSSH. We use this to hide the SSH version so it's not announced to port-scanners.
https://github.com/cloudposse/bastion/blob/master/patches/openssh/obfuscate-version.diff

When upgrading version of OpenSSH, the patches might need to be regenerated. 


This closes #16

@osterman
Copy link
Member

Good job!

@osterman osterman merged commit b132d52 into master Sep 14, 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.

Upgrade OpenSSH to Latest Release Document openssh patches
2 participants