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

encfsctl cat outputs debug information and prompts to stdout #42

Closed
RunasSudo opened this issue May 31, 2016 · 5 comments
Closed

encfsctl cat outputs debug information and prompts to stdout #42

RunasSudo opened this issue May 31, 2016 · 5 comments

Comments

@RunasSudo
Copy link

RunasSudo commented May 31, 2016

Environment

  • Windows version: Windows 7, wine
  • Processor architecture: x86, x64
  • Encfs4win version: 1.10.1-RC6
  • Dokan version (legacy, modern): modern

Description

encfsctl cat outputs debug information and prompts to stdout, along with the decrypted data.

Expected behavior

encfsctl cat should output debug information and prompts to stderr, with only decrypted data printed to stdout. This is the behaviour of the Linux version.

Steps to reproduce problem

  1. Run encfsctl -v cat [dir] [file] > out.txt.
  2. No output will be displayed at all, while all data (including debug messages and the EncFS Password: prompt) is stored in out.txt.

Not-at-all-robust workaround:

encfsctl cat [dir] [file] | tail -c+17 > out.txt
@jetwhiz jetwhiz added the bug label Jun 3, 2016
@jetwhiz jetwhiz self-assigned this Jun 3, 2016
@jetwhiz jetwhiz added this to the 1.10.1 milestone Jun 3, 2016
@jetwhiz
Copy link
Owner

jetwhiz commented Jun 3, 2016

When you mention the LInux version, are you referring to the version from the official Linux repositories, or the version directly from https://github.com/vgough/encfs (the latest commit)?

I'm thinking this is an issue due to easylogging++, which appears to support "To_Standard_Output" but not sending to standard error. If that's the case, than the latest from vgough/encfs should also have this issue.

@jetwhiz
Copy link
Owner

jetwhiz commented Jun 3, 2016

I'm not sure if we can fix the "prompts to stdout" issue, since this is the correct behavior (the prompt goes to stdout as it should, but you're redirecting stdout to a file). In this case, it is best to use -S to retrieve the password without prompts.

@RunasSudo
Copy link
Author

RunasSudo commented Jun 4, 2016

I'm using encfs official release 1.8.1 on Arch Linux. Prompts in that version are written to stderr, so even if stdout is redirected, password prompts are visible. I'm not sure about debug information.

@jetwhiz
Copy link
Owner

jetwhiz commented Jun 4, 2016

Ok, I can fix the prompts (by sending them to stderr), but the issue of verbose debugging info going to stdout also exist in encfs upstream. I'm going to open an issue upstream so this can be fixed at the source.

@jetwhiz jetwhiz added the fixed label Jun 5, 2016
jetwhiz added a commit that referenced this issue Jun 9, 2016
Partial fix -- prompts to stderr now instead of stdout (as per upstream)
jetwhiz added a commit that referenced this issue Jun 9, 2016
Force easylogging++ to output to std::cerr instead of (stdout)
@jetwhiz
Copy link
Owner

jetwhiz commented Jun 9, 2016

This should be fixed as of -RC7

@jetwhiz jetwhiz closed this as completed Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants