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

ctlsock: bind: address already in use after interrupted password input #776

Open
indev29 opened this issue Jul 31, 2023 · 0 comments
Open

Comments

@indev29
Copy link

indev29 commented Jul 31, 2023

Current behaviour

When mounting with -ctlsock option is interrupted via SIGINT (CTRL+C), ctlsock is created but not removed, which leads to bind: address already in use error on the next try.

> gocryptfs -ctlsock /run/user/$(id -u)/gocryptfs-lm.sock ~/cloud/lm ~/ws/lm
Password: ^C

> gocryptfs -ctlsock /run/user/$(id -u)/gocryptfs-lm.sock ~/cloud/lm ~/ws/lm
ctlsock: listen unix /run/user/1000/gocryptfs-lm.sock: bind: address already in use

I sometimes get this because I have a habit of interrupting the password input on a typo. For me, it is easier to retype the whole thing.

Expected behaviour

Interrupting password input should not affect the next try.

> gocryptfs -ctlsock /run/user/$(id -u)/gocryptfs-lm.sock ~/cloud/lm ~/ws/lm
Password: ^C

> gocryptfs -ctlsock /run/user/$(id -u)/gocryptfs-lm.sock ~/cloud/lm ~/ws/lm
Password: 
Decrypting master key
Filesystem mounted and ready.

Possible solution

Remove ctlsock if password input was interrupted.

Version

gocryptfs v2.4.0; go-fuse [vendored]; 2023-06-15 go1.20.5 linux/amd64
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