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
Thanks for the useful (and well thought out) tool.
Key files are named per the originating script. If the user has named that script as a dot file, encpass.sh will name the key file as such. When using the lock and unlock function, they do not match dot files. A quick fix that worked for me was to add shopt -s dotglob to the top of the encpass.sh script. There are probably better ways to do this.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue @aniqueta and I'm glad you are finding encpass.sh useful.
The main problem around supporting dot files will be trying to do it in a POSIX compliant way and supporting as many legacy shell versions as possible. The shopt solution, while a good one for Bash, unfortunately is not available in other shells. The other thing to note is that this affects not just the locking or unlocking of the key files, but other commands such as listing the buckets/secrets.
One solution may be to introduce the -A option in places where encpass.sh reads the contents of the "keys" and "secrets" directories. I'm exploring this option, but it does not work as I would expect with the -d option (listing just directories), which means that additional changes would need to be introduced in places where that option is currently used. Also, I'm not entirely certain "ls" is the most robust way to handle the reading of these directories. It may be better to switch to the find command. Find apparently was introduced in Version 5 of Unix (https://en.wikipedia.org/wiki/Find_(Unix)#History), so while not as old as "ls" I doubt anyone using encpass.sh is probably using a Unix older than version 5.
In any case, it will take a bit of time to think through the proper solution and weigh potential trade offs with various approaches, but I think supporting hidden scripts for use with encpass.sh should be implemented.
Makes sense. In one of my cases, I'm using macOS with zsh, and shopt -s dotglob normally does not work. Since encpass.sh starts with #!/bin/sh the shell interpreter changes and shopt -s dotglob does work. For zsh, there are also other ways to mimic the shopt command, such as: Zshopt
Thanks for the useful (and well thought out) tool.
Key files are named per the originating script. If the user has named that script as a dot file,
encpass.sh
will name the key file as such. When using the lock and unlock function, they do not match dot files. A quick fix that worked for me was to addshopt -s dotglob
to the top of theencpass.sh
script. There are probably better ways to do this.The text was updated successfully, but these errors were encountered: