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

No error displayed when failing to connect due to CredSSP #6

Open
KevinAdams05 opened this issue Jul 17, 2018 · 2 comments
Open

No error displayed when failing to connect due to CredSSP #6

KevinAdams05 opened this issue Jul 17, 2018 · 2 comments

Comments

@KevinAdams05
Copy link
Contributor

When BeRDP is unable to connect to a server without CredSSP, no error message is display via the GUI.

If you run from the command line, an error message will be written "Failed to connect, CredSSP is required by the server."

@KevinAdams05
Copy link
Contributor Author

berdp credssp

@KevinAdams05
Copy link
Contributor Author

I am trying to use popen to read back the output from the rdesktop command, in the hopes that I can grab that last error line and pass it to a BAlert for the user.

Unfortunately when I try to do that, it only grabs the first 2 lines and the third line still gets written to the terminal.

Am I using popen incorrectly? Or perhaps there is a better way to be doing this?

// Execute RDesktop
//system(cmdline.String());

char buffer[2048];
std::string result = "";

FILE* pipe = popen(cmdline.String(), "r");

if (!pipe) throw std::runtime_error("popen() failed!");

while (fgets(buffer, 2048, pipe) != NULL) result += buffer;

pclose(pipe);

BAlert* alert = new BAlert("Title goes here", result.c_str(),
"Aww darn", NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
B_STOP_ALERT);
alert->SetShortcut(0, B_ESCAPE);
int32 button_index = alert->Go();

popen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant