X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2FWINNT%2Fbosctlsvc%2Fbosctlsvc.c;h=475d7acc71a91f90a31ce1492d76ec7da9a8c6f9;hp=6188cbc4fe03ae8ff64f8435484b90a29aa051c7;hb=48e326372d89b0d778420f268dbe59236758eba8;hpb=fb5bcd00fc6f1560d7d02115a0b5beaa3014a0e7 diff --git a/src/WINNT/bosctlsvc/bosctlsvc.c b/src/WINNT/bosctlsvc/bosctlsvc.c index 6188cbc..475d7ac 100644 --- a/src/WINNT/bosctlsvc/bosctlsvc.c +++ b/src/WINNT/bosctlsvc/bosctlsvc.c @@ -1,7 +1,7 @@ /* * Copyright 2000, International Business Machines Corporation and others. * All Rights Reserved. - * + * * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -30,13 +29,13 @@ #include #include #include - +#include /* Define globals */ #define BOSSERVER_STARTMSG_EXE "afslegal.exe" -#define BOSSERVER_RESTART_ARG_MAX 2 /* "-noauth", "-log" */ +#define BOSSERVER_RESTART_ARG_MAX 3 /* "-noauth", "-log", "-rxbind" */ #define BOSSERVER_WAIT_TIME_HINT 60 /* seconds */ #define BOSSERVER_STOP_TIME_MAX (FSSDTIME + 60) /* seconds */ @@ -233,14 +232,14 @@ BosCtlMain(DWORD argc, LPTSTR *argv) if ((bosCtlEvent[BOS_STOP_EVENT] = CreateEvent(NULL, FALSE /* manual reset */, FALSE /* initial state */, - NULL)) == NULL) { + TEXT("BosCtlSvc Stop Event"))) == NULL) { status = GetLastError(); } if ((bosCtlEvent[BOS_EXIT_EVENT] = CreateEvent(NULL, FALSE /* manual reset */, FALSE /* initial state */, - NULL)) == NULL) { + TEXT("BosCtlSvc Exit Event"))) == NULL) { status = GetLastError(); } @@ -273,6 +272,9 @@ BosCtlMain(DWORD argc, LPTSTR *argv) return; } + /* For XP SP2 and above, open required ports */ + icf_CheckAndAddAFSPorts(AFS_PORTSET_SERVER); + /* Initialize the dirpath package so can access local bosserver binary */ if (!(initAFSDirPath() & AFSDIR_SERVER_PATHS_OK)) { /* sw install directory probably not in registry; can not continue */ @@ -415,6 +417,11 @@ BosserverDoExitEvent(pid_t cpid, restartArgv[i] = "-log"; i++; } + if (exitCode & BOSEXIT_RXBIND_FLAG) { + /* pass "-rxbind" to new bosserver */ + restartArgv[i] = "-rxbind"; + i++; + } restartArgv[i] = NULL; } } @@ -452,7 +459,7 @@ BosserverRun(DWORD argc, char **spawn_argv; /* Display bosserver startup (legal) message; first start only */ - BosserverStartupMsgDisplay(); + /* BosserverStartupMsgDisplay(); */ /* Set env variable forcing process mgmt lib to spawn processes detached */ (void)putenv(PMGT_SPAWN_DETACHED_ENV_NAME "=1");