Windows: Panic if RDR_Initialize SERVICE_DISABLED
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 26 Nov 2012 04:56:47 +0000 (23:56 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Mon, 26 Nov 2012 21:24:12 +0000 (13:24 -0800)
If RDR_Initialize() fails with ERROR_SERVICE_DISABLED it means that
the AFSRedir.sys driver loaded but the AFSRedirLib.sys driver library
cannot be loaded.  In this situation neither the RDR nor SMB interfaces
can successfully be used.  Panic!

Change-Id: I09d30a86b9d72b9077d4c7578dab52314cce559a
Reviewed-on: http://gerrit.openafs.org/8514
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/afsd_service.c

index e4d8f64..067ec99 100644 (file)
@@ -1387,8 +1387,13 @@ afsd_Main(DWORD argc, LPTSTR *argv)
         cm_VolStatus_Service_Started();
 
         code = RDR_Initialize();
-        RDR_Initialized = !code;
-        afsi_log("RDR_Initialize returned: (code = %d)", code);
+        if ( code == ERROR_SERVICE_DISABLED) {
+            afsi_log("RDR_Initialize failed: 1058 (Unable to load AFSRedirLib.sys)");
+            osi_panic(reason, __FILE__, __LINE__);
+        } else {
+            RDR_Initialized = !code;
+            afsi_log("RDR_Initialize returned: (code = %d)", code);
+        }
 
         if (RDR_Initialized) {
             if (cm_sysNameCount)