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

Broken in BSDs (including macOS) due to lack of sha1sum #53

Closed
rspeed opened this issue Jan 3, 2017 · 0 comments
Closed

Broken in BSDs (including macOS) due to lack of sha1sum #53

rspeed opened this issue Jan 3, 2017 · 0 comments

Comments

@rspeed
Copy link
Contributor

rspeed commented Jan 3, 2017

As noted by @jasisk in #52, _autoenv_hash_pair is broken due to the fact that sha1sum is only present in GNU. As a result, permission is requested every time an autoenv script is run.

blueyed added a commit to blueyed/zsh-autoenv that referenced this issue Jan 4, 2017
blueyed added a commit that referenced this issue Jan 5, 2017
This provides better performance, but requires you to re-authenticate all files.

Fixes #53.
rspeed added a commit to rspeed/contrib-zsh-autoenv that referenced this issue Jan 5, 2017
Adds a new whitelist file hashing algorithm using `cksum`, which is very fast and identical between BSD and GNU.
A new parameter is added to `_autoenv_hash_pair` to specify the version, defaulting to the latest (2). It outputs a `cksum`-based hash for version 2 and `shasum`-based for version 1.
Moves logic to check for an entry in `$AUTOENV_AUTH_FILE` into its own function (`_autoenv_authorized_pair`), as it may need to be called twice.
Modifies `_autoenv_authorized_env_file` to check for v1 entries when v2 fails.

Fixes Tarrasch#53. Alternative implementation to Tarrasch#54.
rspeed added a commit to rspeed/contrib-zsh-autoenv that referenced this issue Jan 10, 2017
Adds a new whitelist file hashing algorithm using `cksum`, which is very fast and identical between BSD and GNU.
A new parameter is added to `_autoenv_hash_pair` to specify the version, defaulting to the latest (2). It outputs a `cksum`-based hash for version 2 and `shasum`-based for version 1.
Moves logic to check for an entry in `$AUTOENV_AUTH_FILE` into its own function (`_autoenv_authorized_pair`), as it may need to be called twice.
Modifies `_autoenv_authorized_env_file` to check for v1 entries when v2 fails.

Fixes Tarrasch#53. Alternative implementation to Tarrasch#54.
blueyed pushed a commit that referenced this issue Jan 10, 2017
A new parameter is added to `_autoenv_hash_pair` to specify the version, defaulting to the latest (2). It outputs a `cksum`-based hash for version 2 and `shasum`-based for version 1.
Moves logic to check for an entry in `$AUTOENV_AUTH_FILE` into its own function (`_autoenv_authorized_pair`), as it may need to be called twice.
Modifies `_autoenv_authorized_env_file` to check for v1 entries when v2 fails.

Fixes #53. Alternative implementation to #54.
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

1 participant