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

I am unable to use encryption when the output is STDOUT #161

Closed
Konstantinusz opened this issue Jun 10, 2020 · 2 comments
Closed

I am unable to use encryption when the output is STDOUT #161

Konstantinusz opened this issue Jun 10, 2020 · 2 comments

Comments

@Konstantinusz
Copy link

I have tried the following command:
echo $'123\n123'|lrzip -o - -e file.txt|pv > archive.lrz

I get an error message:

Read of length 25 failed - Bad file descriptor                                                                                                        
Failed to read_buf buf in rewrite_encrypted
Fatal error - exiting
@pete4abw
Copy link
Contributor

1, echoing a password is very insecure
2. the -o option is not for special files
3. if you must, use -o archive.lrz
4. -e can't be used with STDIN for input files and if you output using > won't prompt for a password.
5. use this: echo $'123\n123'|lrzip -o archive.lrz -e file.txt and add -vv for greater verbosity, not pv
6. The bad file descriptor error is due to the fact that -o - is not a real file and lrzip is trying to seek to a position in the file to begin writing the stream data header. Probably could be checked for on program init, i.e. -o - is illegal, but IMO not worth the time.
7. don't echo passwords.

@ckolivas
Copy link
Owner

Encryption is not possible with any stdio. Fixed with appropriate warning in git master.

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

3 participants