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

BSD/POSIXish compatibility #62

Closed
MakeItGreatAgain opened this issue Sep 18, 2017 · 3 comments
Closed

BSD/POSIXish compatibility #62

MakeItGreatAgain opened this issue Sep 18, 2017 · 3 comments

Comments

@MakeItGreatAgain
Copy link

MakeItGreatAgain commented Sep 18, 2017

I have ported et to OpenBSD (which needed a few changes), but noticed some Linuxisms in the et launcher client script which break POSIX compatibility can easily be worked around by using standardized options (rather than GNU extensions), in particular, the launcher script uses "head -c" and "/bin/bash" on the remote, which are not UNIX standards.

This is easily fixed by replacing "/bin/bash" with "/bin/sh" (tested to be fine with OpenBSD ksh, at least) on line 114 (which sets SSH_OUTPUT) and by replacing head -c with "dd bs=1 count=N 2>/dev/null" in the PASSKEY_GENERATOR and ID_GENERATOR assignments.

Also, the UNIX standards only seem to require "/dev/null and /dev/console" so you cannot rely on the presence of /dev/urandom, and it is my understanding that using tr to strip non-printable characters may result in weakening the keys. It may be be safer and certainly more portable to include a CSPRNG and use a hash of the output or offer a fallback to egd. I've not done this as all systems I have available to me have /dev/urandom available.

I will clean up my changes soon and provide you the OpenBSD diff later.

@MisterTea
Copy link
Owner

Cool! Looking forward to seeing the pull request.

@MisterTea
Copy link
Owner

@MakeItGreatAgain Any update?

@MakeItGreatAgain
Copy link
Author

Sorry - I have been busy and you update quickly :) I will try to get you proper port in a week or two - I am still using it myself

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

No branches or pull requests

2 participants