From 92239dafb601d2ee5da1554d19631267c81fe57c Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 13 Nov 2011 09:27:52 +0100 Subject: Imported nxcomp-3.2.0-6.tar.gz Summary: Imported nxcomp-3.2.0-6.tar.gz Keywords: Imported nxcomp-3.2.0-6.tar.gz into Git repository --- nxcomp/Auth.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nxcomp/Auth.cpp') diff --git a/nxcomp/Auth.cpp b/nxcomp/Auth.cpp index 57e2070ec..78f93a013 100755 --- a/nxcomp/Auth.cpp +++ b/nxcomp/Auth.cpp @@ -55,6 +55,8 @@ Auth::Auth(char *display, char *cookie) dataSize_ = 0; + generatedCookie_ = 0; + if (display == NULL || *display == '\0' || cookie == NULL || *cookie == '\0' || strlen(cookie) != 32) { @@ -316,16 +318,20 @@ int Auth::getCookie() << "auth command.\n" << logofs_flush; #endif + #ifdef TEST cerr << "Warning" << ": Failed to read data from the X " << "auth command.\n"; + #endif #ifdef PANIC *logofs << "Auth: WARNING! Generating a fake cookie for " << "X authentication.\n" << logofs_flush; #endif + #ifdef TEST cerr << "Warning" << ": Generating a fake cookie for " << "X authentication.\n"; + #endif generateCookie(realCookie_); } @@ -621,6 +627,8 @@ void Auth::generateCookie(char *cookie) data >>= 8; } + generatedCookie_ = 1; + #ifdef TEST *logofs << "Auth: Generated X cookie string '" << cookie << "'.\n" << logofs_flush; -- cgit v1.2.3