]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-init-20060306
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 6 Mar 2006 20:07:08 +0000 (20:07 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 6 Mar 2006 20:07:08 +0000 (20:07 +0000)
fix sysname string on amd64

add registry configurable CallBackPort to allow for forcing the
client to use different ports when talking with the file server.

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

add registry configurable CallBackPort to allow for forcing the
client to use different ports when talking with the file server.

Add UAE errors to cm_Analyze debug output

src/WINNT/afsd/afsd_init.c
src/WINNT/afsd/cm.h
src/WINNT/afsd/cm_conn.c

index 859448c0f308a7c4f776ec75549067b41d040387..0e41b16e51a3199c3dec7bff590b4facbfde8ee7 100644 (file)
@@ -38,6 +38,7 @@ extern int RXAFSCB_ExecuteRequest(struct rx_call *z_call);
 extern int RXSTATS_ExecuteRequest(struct rx_call *z_call);
 
 extern afs_int32 cryptall;
+extern int cm_enableServerLocks;
 
 osi_log_t *afsd_logp;
 
@@ -66,6 +67,7 @@ int logReady = 0;
 
 char cm_HostName[200];
 long cm_HostAddr;
+unsigned short cm_callbackport = CM_DEFAULT_CALLBACKPORT;
 
 char cm_NetbiosName[MAX_NB_NAME_LENGTH] = "";
 
@@ -852,8 +854,8 @@ int afsd_InitCM(char **reasonP)
     if (code != ERROR_SUCCESS || !buf[0]) {
 #if defined(_IA64_)
         StringCbCopyA(buf, sizeof(buf), "ia64_win64");
-#elif defined(_AMD64)
-        StringCbCopyA(buf, sizeof(buf), "amd64_win64");
+#elif defined(_AMD64_)
+        StringCbCopyA(buf, sizeof(buf), "amd64_win64 x86_win32 i386_w2k");
 #else /* assume x86 32-bit */
         StringCbCopyA(buf, sizeof(buf), "x86_win32 i386_w2k i386_nt40");
 #endif
@@ -1047,6 +1049,32 @@ int afsd_InitCM(char **reasonP)
        cm_daemonTokenCheckInterval = dwValue;
     afsi_log("daemonCheckTokenInterval is %d", cm_daemonTokenCheckInterval);
 
+    dummyLen = sizeof(DWORD);
+    code = RegQueryValueEx(parmKey, "CallBackPort", NULL, NULL,
+                           (BYTE *) &dwValue, &dummyLen);
+    if (code == ERROR_SUCCESS) {
+        cm_callbackport = (unsigned short) dwValue;
+    }
+    afsi_log("CM CallBackPort is %u", cm_callbackport);
+
+    dummyLen = sizeof(DWORD);
+    code = RegQueryValueEx(parmKey, "EnableServerLocks", NULL, NULL,
+                           (BYTE *) &dwValue, &dummyLen);
+    if (code == ERROR_SUCCESS) {
+        cm_enableServerLocks = (unsigned short) dwValue;
+    } 
+    switch (cm_enableServerLocks) {
+    case 0:
+       afsi_log("EnableServerLocks: never");
+       break;
+    case 2:
+       afsi_log("EnableServerLocks: always");
+       break;
+    case 1:
+    default:
+       afsi_log("EnableServerLocks: server requested");
+       break;
+    }
     RegCloseKey (parmKey);
 
     /* Call lanahelper to get Netbios name, lan adapter number and gateway flag */
@@ -1137,10 +1165,10 @@ int afsd_InitCM(char **reasonP)
         afsi_log("rx_SetMaxMTU %d successful", rx_mtu);
     }
 
-    /* initialize RX, and tell it to listen to port 7001, which is used for
-     * callback RPC messages.
+    /* initialize RX, and tell it to listen to the callbackport, 
+     * which is used for callback RPC messages.
      */
-    code = rx_Init(htons(7001));
+    code = rx_Init(htons(cm_callbackport));
     afsi_log("rx_Init code %x", code);
     if (code != 0) {
         *reasonP = "afsd: failed to init rx client on port 7001";
index 700cb90a42f56951ad83b7561a18a790a6f6f04d..ca52252149790ef561316146869d10fad4303163 100644 (file)
@@ -231,6 +231,8 @@ int RXAFS_Lookup (struct rx_connection *,
        struct AFSCallBack *CallBack,
        struct AFSVolSync *Sync);
 
+#define CM_DEFAULT_CALLBACKPORT         7001
+
 /* common flags to many procedures */
 #define CM_FLAG_CREATE         1               /* create entry */
 #define CM_FLAG_CASEFOLD       2               /* fold case in namei, lookup, etc. */
index 5863ee8b1be589f6b9a771e45883381765c9f7f6..d9c5e428f61c697a88d56b3ee9a7379470649778 100644 (file)
@@ -18,6 +18,7 @@
 #include <osi.h>
 #include <rx/rx.h>
 #include <rx/rxkad.h>
+#include <afs/unified_afs.h>
 #include "afsd.h"
 
 osi_rwlock_t cm_connLock;
@@ -510,7 +511,11 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
             case VRESTARTING       : s = "VRESTARTING";        break;
             case VREADONLY         : s = "VREADONLY";          break;
             case EAGAIN            : s = "EAGAIN";             break;
+           case UAEAGAIN          : s = "UAEAGAIN";           break;
+            case EINVAL            : s = "EINVAL";             break;
+           case UAEINVAL          : s = "UAEINVAL";           break;
             case EACCES            : s = "EACCES";             break;
+           case UAEACCES          : s = "UAECCES";            break;
             }
             osi_Log2(afsd_logp, "cm_Analyze: ignoring error code 0x%x (%s)", 
                      errorCode, s);