]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: afslogon network provider debug registry value
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 28 Aug 2011 16:03:53 +0000 (12:03 -0400)
committerDerrick Brashear <shadow@dementix.org>
Sun, 26 Feb 2012 06:30:24 +0000 (22:30 -0800)
create a new TransarcAFSDaemon\NetworkProvider "Debug" value
to be used for activating the network provider debugging.
The overlapping use of TransarcAFSDaemon\Parameters "TraceOption"
is just too confusing.

Permit both methods to be used.

Reviewed-on: http://gerrit.openafs.org/5316
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 3d4e111dd6c4201476e7447fdfaa27ed630032c5)

Change-Id: Ibc8b56d64aa843076b191afa42c4a3e93cf7a26f
Reviewed-on: http://gerrit.openafs.org/6802
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/WINNT/afsd/afslogon.c
src/WINNT/afsd/afslogon.h

index 0ced1bbd5a527aabcd990937d8c4e7b208282a4f..a536117cbc6c467a78bb77e9fb4b63f934ebd14a 100644 (file)
@@ -37,6 +37,7 @@
 #include <WINNT\afsreg.h>
 
 DWORD TraceOption = 0;
+DWORD Debug = 0;
 
 HANDLE hDLL;
 
@@ -46,7 +47,7 @@ void DebugEvent0(char *a)
 {
     HANDLE h; char *ptbuf[1];
 
-    if (!ISLOGONTRACE(TraceOption))
+    if (!Debug && !ISLOGONTRACE(TraceOption))
         return;
 
     h = RegisterEventSource(NULL, AFS_LOGON_EVENT_NAME);
@@ -63,7 +64,7 @@ void DebugEvent(char *b,...)
     HANDLE h; char *ptbuf[1],buf[MAXBUF_+1];
     va_list marker;
 
-    if (!ISLOGONTRACE(TraceOption))
+    if (!Debug && !ISLOGONTRACE(TraceOption))
         return;
 
     h = RegisterEventSource(NULL, AFS_LOGON_EVENT_NAME);
@@ -863,6 +864,14 @@ DWORD APIENTRY NPLogonNotify(
 
     RegCloseKey (NPKey);
 
+    (void) RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PROVIDER_SUBKEY,
+                         0, KEY_QUERY_VALUE, &NPKey);
+    LSPsize=sizeof(Debug);
+    RegQueryValueEx(NPKey, REG_CLIENT_DEBUG_PARM, NULL,
+                     &LSPtype, (LPBYTE)&Debug, &LSPsize);
+
+    RegCloseKey (NPKey);
+
     DebugEvent("NPLogonNotify - LoginId(%d,%d)", lpLogonId->HighPart, lpLogonId->LowPart);
 
     /* Make sure the AFS Libraries are initialized */
index 25590aaecdd9a771e14c19b16aa131e76cae2252..44a0baec537aa869f3749407ab01af2f39bd9e3a 100644 (file)
@@ -45,6 +45,7 @@ SOFTWARE.
 #define REG_CLIENT_TRACE_OPTION_PARM   "TraceOption"
 #define REG_CLIENT_LOGON_OPTION_PARM   "LogonOptions"
 #define REG_CLIENT_LOGON_SCRIPT_PARMW  L"LogonScript"
+#define REG_CLIENT_DEBUG_PARM           "Debug"
 #define REG_CLIENT_REALM_PARM           "Realm"
 #define REG_CLIENT_THESE_CELLS_PARM     "TheseCells"
 #define REG_CLIENT_LOGOFF_TOKENS_PARM  "LogoffPreserveTokens"