Minor changes
authorVictor Kirhenshtein <victor@netxms.org>
Tue, 28 Sep 2004 18:01:43 +0000 (18:01 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Tue, 28 Sep 2004 18:01:43 +0000 (18:01 +0000)
src/server/core/config.cpp
src/server/core/nms_core.h
src/server/core/users.cpp

index e4ea429..e21caca 100644 (file)
@@ -42,7 +42,7 @@ static char help_text[]="NetXMS Server Version " NETXMS_VERSION_STRING "\n"
                         "   --debug-events      : Print events to console.\n"
                         "   --debug-housekeeper : Print debug information for housekeeping thread.\n"
                         "   --debug-locks       : Print debug information about component locking.\n"
-                        "   --debug-sql         : Print all SQL queries.\n"
+                        "   --dump-sql          : Dump all SQL queries to log.\n"
                         "\n"
                         "Valid commands are:\n"
                         "   check-config        : Check configuration file syntax\n"
@@ -161,6 +161,10 @@ BOOL ParseCommandLine(int argc, char *argv[])
       {
          g_dwFlags |= AF_DEBUG_ACTIONS;
       }
+      else if (!strcmp(argv[i], "--dump-sql"))
+      {
+         g_dwFlags |= AF_DEBUG_SQL;
+      }
       else if (!strcmp(argv[i], "check-config"))
       {
          g_dwFlags |= AF_STANDALONE;
index 5965102..cfdb2cf 100644 (file)
@@ -146,7 +146,7 @@ typedef void * HSNMPSESSION;
 #define AF_DEBUG_ACTIONS                  0x00004000
 #define AF_DEBUG_MISC                     0x00008000
 #define AF_DEBUG_SQL                      0x00010000
-#define AF_DEBUG_ALL                      0x0001FF00
+#define AF_DEBUG_ALL                      0x0000FF00
 #define AF_DB_LOCKED                      0x01000000
 #define AF_SHUTDOWN                       0x80000000
 
index f629ceb..09173c5 100644 (file)
@@ -301,17 +301,9 @@ BOOL AuthenticateUser(char *szName, BYTE *szPassword, DWORD *pdwId, DWORD *pdwSy
    DWORD i;
    BOOL bResult = FALSE;
 
-char temp[256];
-BinToStr(szPassword, SHA1_DIGEST_SIZE, temp);
-printf("login='%s' hash='%s'\n",szName,temp);
    MutexLock(m_hMutexUserAccess, INFINITE);
    for(i = 0; i < g_dwNumUsers; i++)
    {
-BinToStr(g_pUserList[i].szPassword, SHA1_DIGEST_SIZE, temp);
-printf("checking: '%s' '%s' %d %d %d\n",g_pUserList[i].szName,temp,g_pUserList[i].wFlags,UF_DISABLED,g_pUserList[i].wFlags & UF_DISABLED);      
-printf("expr: %d\n",(!strcmp(szName, g_pUserList[i].szName) &&
-                   !memcmp(szPassword, g_pUserList[i].szPassword, SHA1_DIGEST_SIZE) &&
-                             !(g_pUserList[i].wFlags & UF_DELETED) && !(g_pUserList[i].wFlags & UF_DISABLED)));
       if (!strcmp(szName, g_pUserList[i].szName) &&
           !memcmp(szPassword, g_pUserList[i].szPassword, SHA1_DIGEST_SIZE) &&
           !(g_pUserList[i].wFlags & UF_DELETED) && !(g_pUserList[i].wFlags & UF_DISABLED))