mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
windows-updates-including-dont-lose-tokens-20011110
Win2k tokens association problems are fixed. details are in doc/txt/winnotes in the 1.2.2a updates file
This commit is contained in:
parent
9d8b844b3e
commit
de99fc23d4
@ -22,6 +22,7 @@ NTMAKE = nmake /nologo /f ntmakefile install9x
|
||||
NTMAKELANG = nmake /nologo /f ntmakefile en_install
|
||||
NTMAKE_HEADERS = nmake /nologo /f ntmakefile install_headers
|
||||
NTMAKE_LIBUTILS = nmake /nologo /f ntmakefile install_libutils
|
||||
NTMAKE_OBJS = nmake /nologo /f ntmakefile install_objs
|
||||
MKDIR = mkdir
|
||||
OBJ = src
|
||||
|
||||
@ -306,7 +307,7 @@ Win9x::
|
||||
$(CD) $(OBJ)\WINNT\install\Win9x
|
||||
nmake /nologo /f NTMakefile isinstall
|
||||
$(CD) ..\..\..\..
|
||||
eho **** End of Install Scripts
|
||||
echo **** End of Install Scripts
|
||||
|
||||
media: Win9x
|
||||
|
||||
|
@ -476,7 +476,7 @@ install: start finale
|
||||
|
||||
# InstallShield dependencies
|
||||
|
||||
InstallShield5: install
|
||||
InstallShield5:
|
||||
echo ***** afs_setup_utils
|
||||
$(CD) $(OBJ)\WINNT\afs_setup_utils
|
||||
$(NTMAKE)
|
||||
|
@ -90,8 +90,6 @@ DIRLANG= ZH_TW ZH_CN PT_BR KO_KR JA_JP ES_ES EN_US DE_DE
|
||||
|
||||
install : $(INSTALL_UTILS_DLLFILE) $(SERVER_UNINST_DLLFILE) $(CLIENT_UNINST_DLLFILE) \
|
||||
$(CC_UNINST_DLLFILE) $(LIGHT_CLIENT_UNINST_DLLFILE) $(DOCS_UNINST_DLLFILE) \
|
||||
|
||||
media : install
|
||||
$(AFSRM_EXEFILE) $(DIRLANG)
|
||||
cd _isuser
|
||||
nmake -fntmakefile install
|
||||
|
@ -908,6 +908,10 @@ static int InstallService(char *pszName, char *pszDependOn, char *pszDisplayName
|
||||
SC_HANDLE hServer = 0, hSCM;
|
||||
BOOL bRestoreOldConfig = FALSE;
|
||||
|
||||
if (!AddToProviderOrder(AFSREG_CLT_SVC_NAME)) {
|
||||
ShowError(ERROR_FILE_NOT_FOUND, GetLastError());
|
||||
return -1;
|
||||
}
|
||||
hSCM = OpenSCManager(0, 0, SC_MANAGER_CREATE_SERVICE);
|
||||
if (!hSCM) {
|
||||
ShowError(IDS_SCM_OPEN_FAILED, GetLastError());
|
||||
@ -976,6 +980,10 @@ static int UninstallService(struct APPINFO *pAppInfo)
|
||||
BOOL bServer = FALSE;
|
||||
BOOL bShowingProgressDlg = FALSE;
|
||||
|
||||
if (!RemoveFromProviderOrder(AFSREG_CLT_SVC_NAME)) {
|
||||
ShowError(ERROR_FILE_NOT_FOUND, GetLastError());
|
||||
return -1;
|
||||
}
|
||||
hSCM = OpenSCManager(0, 0, SC_MANAGER_CREATE_SERVICE);
|
||||
if (!hSCM) {
|
||||
ShowError(IDS_SCM_OPEN_FAILED, GetLastError());
|
||||
|
@ -185,6 +185,7 @@ void afsd_Main()
|
||||
int jmpret;
|
||||
|
||||
osi_InitPanic(afsd_notifier);
|
||||
osi_InitTraceOption();
|
||||
|
||||
GlobalStatus = 0;
|
||||
|
||||
@ -250,7 +251,7 @@ void afsd_Main()
|
||||
CheckMountDrive();
|
||||
|
||||
WaitForSingleObject(WaitToTerminate, INFINITE);
|
||||
|
||||
|
||||
{
|
||||
HANDLE h; char *ptbuf[1];
|
||||
h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME);
|
||||
|
@ -19,20 +19,30 @@
|
||||
#include "cm_config.h"
|
||||
#include "krb.h"
|
||||
|
||||
#include <io.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
DWORD LogonOption,TraceOption;
|
||||
|
||||
HANDLE hDLL;
|
||||
|
||||
WSADATA WSAjunk;
|
||||
|
||||
char NPName[] = "System\\CurrentControlSet\\Services\\TransarcAFSDaemon\\NetworkProvider";
|
||||
|
||||
#define REG_CLIENT_PARMS_KEY "SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters"
|
||||
#define REG_CLIENT_PROVIDER_KEY "SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\NetworkProvider"
|
||||
#define REG_CLIENT_RETRY_INTERVAL_PARM "LoginRetryInterval"
|
||||
#define REG_CLIENT_FAIL_SILENTLY_PARM "FailLoginsSilently"
|
||||
#define DEFAULT_RETRY_INTERVAL 30 // seconds
|
||||
#define DEFAULT_RETRY_INTERVAL 30 /* seconds*/
|
||||
#define DEFAULT_FAIL_SILENTLY FALSE
|
||||
#define DEFAULT_SLEEP_INTERVAL 5 // seconds
|
||||
#define DEFAULT_SLEEP_INTERVAL 5 /* seconds*/
|
||||
|
||||
#define ISLOGONINTEGRATED(v) ( ((v) & LOGON_OPTION_INTEGRATED)==LOGON_OPTION_INTEGRATED)
|
||||
#define ISHIGHSECURITY(v) ( ((v) & LOGON_OPTION_HIGHSECURITY)==LOGON_OPTION_HIGHSECURITY)
|
||||
|
||||
#define TRACE_OPTION_EVENT 1
|
||||
#define ISLOGONTRACE(v) ( ((v) & TRACE_OPTION_EVENT)==TRACE_OPTION_EVENT)
|
||||
|
||||
/* Structure def copied from DDK (NTDEF.H) */
|
||||
typedef struct UNICODE_STRING {
|
||||
@ -57,24 +67,65 @@ typedef struct _MSV1_0_INTERACTIVE_LOGON {
|
||||
*
|
||||
* Returns NULL on failure.
|
||||
*/
|
||||
WCHAR *GetLogonScript(void)
|
||||
|
||||
|
||||
void DebugEvent0(char *a)
|
||||
{
|
||||
WCHAR *script;
|
||||
HANDLE h; char *ptbuf[1];
|
||||
if (!ISLOGONTRACE(TraceOption))
|
||||
return;
|
||||
h = RegisterEventSource(NULL, a);
|
||||
ptbuf[0] = a;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
|
||||
#define MAXBUF_ 131
|
||||
void DebugEvent(char *a,char *b,...)
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[MAXBUF_+1];
|
||||
va_list marker;
|
||||
if (!ISLOGONTRACE(TraceOption))
|
||||
return;
|
||||
h = RegisterEventSource(NULL, a);
|
||||
va_start(marker,b);
|
||||
_vsnprintf(buf,MAXBUF_,b,marker);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)ptbuf, NULL);\
|
||||
DeregisterEventSource(h);
|
||||
va_end(marker);
|
||||
}
|
||||
|
||||
CHAR *GenRandomName(CHAR *pbuf)
|
||||
{
|
||||
int i;
|
||||
srand( (unsigned)time( NULL ) );
|
||||
for (i=0;i<MAXRANDOMNAMELEN-1;i++)
|
||||
pbuf[i]='a'+(rand() % 26);
|
||||
pbuf[MAXRANDOMNAMELEN-1]=0;
|
||||
return pbuf;
|
||||
}
|
||||
|
||||
WCHAR *GetLogonScript(CHAR *pname)
|
||||
{
|
||||
WCHAR *script,*buf;
|
||||
DWORD code;
|
||||
DWORD LSPtype, LSPsize;
|
||||
HKEY NPKey;
|
||||
WCHAR randomName[MAXRANDOMNAMELEN];
|
||||
|
||||
/*
|
||||
* Get Network Provider key.
|
||||
* Assume this works or we wouldn't be here.
|
||||
*/
|
||||
(void) RegOpenKeyEx(HKEY_LOCAL_MACHINE, NPName,
|
||||
(void) RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_CLIENT_PROVIDER_KEY,
|
||||
0, KEY_QUERY_VALUE, &NPKey);
|
||||
|
||||
/*
|
||||
* Get Logon Script pathname length
|
||||
*/
|
||||
code = RegQueryValueEx(NPKey, "LogonScript", NULL,
|
||||
|
||||
code = RegQueryValueExW(NPKey, L"LogonScript", NULL,
|
||||
&LSPtype, NULL, &LSPsize);
|
||||
|
||||
if (code) {
|
||||
@ -87,14 +138,29 @@ WCHAR *GetLogonScript(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
script = (WCHAR *)LocalAlloc(LMEM_FIXED, LSPsize);
|
||||
|
||||
buf=(WCHAR *)LocalAlloc(LMEM_FIXED, LSPsize);
|
||||
script=(WCHAR *)LocalAlloc(LMEM_FIXED,LSPsize+(MAXRANDOMNAMELEN)*sizeof(WCHAR));
|
||||
/*
|
||||
* Explicitly call UNICODE version
|
||||
* Assume it will succeed since it did before
|
||||
*/
|
||||
(void) RegQueryValueExW(NPKey, L"LogonScript", NULL,
|
||||
&LSPtype, (LPBYTE)script, &LSPsize);
|
||||
&LSPtype, (LPBYTE)buf, &LSPsize);
|
||||
MultiByteToWideChar(CP_ACP,0,pname,strlen(pname)+1,randomName,(strlen(pname)+1)*sizeof(WCHAR));
|
||||
swprintf(script,buf,randomName);
|
||||
free(buf);
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[132],tbuf[255];
|
||||
WideCharToMultiByte(CP_ACP,0,script,LSPsize,tbuf,255,NULL,NULL);
|
||||
h = RegisterEventSource(NULL, "AFS AfsLogon - GetLogonScript");
|
||||
sprintf(buf, "Script[%s,%d] Return Code[%x]",tbuf,LSPsize,code);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
#endif
|
||||
|
||||
RegCloseKey (NPKey);
|
||||
return script;
|
||||
@ -153,9 +219,12 @@ close_scm:
|
||||
DWORD MapAuthError(DWORD code)
|
||||
{
|
||||
switch (code) {
|
||||
case INTK_BADPW: return WN_BAD_PASSWORD;
|
||||
case KERB_ERR_PRINCIPAL_UNKNOWN: return WN_BAD_USER;
|
||||
default: return WN_NO_NETWORK;
|
||||
case KTC_NOCM:
|
||||
case KTC_NOCMRPC:
|
||||
return WN_NO_NETWORK;
|
||||
/* case INTK_BADPW: return WN_BAD_PASSWORD;*/
|
||||
/* case KERB_ERR_PRINCIPAL_UNKNOWN: return WN_BAD_USER;*/
|
||||
default: return WN_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,12 +281,34 @@ static void GetLoginBehavior(int *pRetryInterval, BOOLEAN *pFailSilently)
|
||||
if (result != ERROR_SUCCESS)
|
||||
*pFailSilently = DEFAULT_FAIL_SILENTLY;
|
||||
|
||||
// Make sure this is really a bool value in the strict sense
|
||||
/* Make sure this is really a bool value in the strict sense*/
|
||||
*pFailSilently = !!*pFailSilently;
|
||||
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
BOOL IsServiceRunning (void)
|
||||
{
|
||||
SERVICE_STATUS Status;
|
||||
SC_HANDLE hManager;
|
||||
memset (&Status, 0x00, sizeof(Status));
|
||||
Status.dwCurrentState = SERVICE_STOPPED;
|
||||
|
||||
if ((hManager = OpenSCManager (NULL, NULL, GENERIC_READ)) != NULL)
|
||||
{
|
||||
SC_HANDLE hService;
|
||||
if ((hService = OpenService (hManager, TEXT("TransarcAFSDaemon"), GENERIC_READ)) != NULL)
|
||||
{
|
||||
QueryServiceStatus (hService, &Status);
|
||||
CloseServiceHandle (hService);
|
||||
}
|
||||
|
||||
CloseServiceHandle (hManager);
|
||||
}
|
||||
DebugEvent("AFS AfsLogon - Test Service Running","Return Code[%x] ?Running[%d]",Status.dwCurrentState,(Status.dwCurrentState == SERVICE_RUNNING));
|
||||
return (Status.dwCurrentState == SERVICE_RUNNING);
|
||||
}
|
||||
|
||||
DWORD APIENTRY NPLogonNotify(
|
||||
PLUID lpLogonId,
|
||||
LPCWSTR lpAuthentInfoType,
|
||||
@ -237,11 +328,15 @@ DWORD APIENTRY NPLogonNotify(
|
||||
char *reason;
|
||||
BOOLEAN interactive;
|
||||
BOOLEAN flag;
|
||||
DWORD LSPtype, LSPsize;
|
||||
HKEY NPKey;
|
||||
HWND hwndOwner = (HWND)StationHandle;
|
||||
BOOLEAN failSilently;
|
||||
int retryInterval;
|
||||
int sleepInterval = DEFAULT_SLEEP_INTERVAL; // seconds
|
||||
BOOLEAN afsWillAutoStart;
|
||||
BOOLEAN failSilently;
|
||||
int retryInterval;
|
||||
int sleepInterval = DEFAULT_SLEEP_INTERVAL; /* seconds */
|
||||
BOOLEAN afsWillAutoStart;
|
||||
CHAR RandomName[MAXRANDOMNAMELEN];
|
||||
*lpLogonScript=NULL;
|
||||
|
||||
IL = (MSV1_0_INTERACTIVE_LOGON *) lpAuthentInfo;
|
||||
|
||||
@ -252,72 +347,128 @@ DWORD APIENTRY NPLogonNotify(
|
||||
wcstombs(uname, IL->UserName.Buffer, 256);
|
||||
wcstombs(password, IL->Password.Buffer, 256);
|
||||
|
||||
/* Check for zero length password */
|
||||
if (password[0] == 0) {
|
||||
(void) RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_CLIENT_PARMS_KEY,
|
||||
0, KEY_QUERY_VALUE, &NPKey);
|
||||
LSPsize=sizeof(TraceOption);
|
||||
RegQueryValueEx(NPKey, "TraceOption", NULL,
|
||||
&LSPtype, (LPBYTE)&TraceOption, &LSPsize);
|
||||
RegCloseKey (NPKey);
|
||||
|
||||
/*
|
||||
* Get Logon OPTIONS
|
||||
*/
|
||||
|
||||
(void) RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_CLIENT_PROVIDER_KEY,
|
||||
0, KEY_QUERY_VALUE, &NPKey);
|
||||
|
||||
LSPsize=sizeof(LogonOption);
|
||||
code = RegQueryValueEx(NPKey, "LogonOptions", NULL,
|
||||
&LSPtype, (LPBYTE)&LogonOption, &LSPsize);
|
||||
|
||||
RegCloseKey (NPKey);
|
||||
if ((code!=0) || (LSPtype!=REG_DWORD))
|
||||
LogonOption=LOGON_OPTION_INTEGRATED; /*default to integrated logon only*/
|
||||
DebugEvent("AFS AfsLogon - NPLogonNotify","LogonOption[%x], Service AutoStart[%d]",LogonOption,AFSWillAutoStart());
|
||||
/* Check for zero length password if integrated logon*/
|
||||
if ( ISLOGONINTEGRATED(LogonOption) && (password[0] == 0) ) {
|
||||
code = GT_PW_NULL;
|
||||
reason = "zero length password is illegal";
|
||||
goto checkauth;
|
||||
if (!ISHIGHSECURITY(LogonOption))
|
||||
goto checkauth; /*skip the rest if integrated logon and not high security*/
|
||||
code=0;
|
||||
}
|
||||
|
||||
/* Get cell name */
|
||||
code = cm_GetRootCellName(cell);
|
||||
if (code < 0) {
|
||||
code = KTC_NOCELL;
|
||||
reason = "unknown cell";
|
||||
goto checkauth;
|
||||
/* Get cell name if doing integrated logon */
|
||||
if (ISLOGONINTEGRATED(LogonOption))
|
||||
{
|
||||
code = cm_GetRootCellName(cell);
|
||||
if (code < 0) {
|
||||
code = KTC_NOCELL;
|
||||
reason = "unknown cell";
|
||||
if (!ISHIGHSECURITY(LogonOption))
|
||||
goto checkauth; /*skip the rest if integrated logon and not high security*/
|
||||
code=0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get user specified login behavior (or defaults) */
|
||||
GetLoginBehavior(&retryInterval, &failSilently);
|
||||
/* Get user specified login behavior (or defaults) */
|
||||
GetLoginBehavior(&retryInterval, &failSilently);
|
||||
|
||||
afsWillAutoStart = AFSWillAutoStart();
|
||||
afsWillAutoStart = AFSWillAutoStart();
|
||||
|
||||
/* Possibly loop until AFS is started. */
|
||||
while (1) {
|
||||
code = ka_UserAuthenticateGeneral(
|
||||
KA_USERAUTH_VERSION+KA_USERAUTH_AUTHENT_LOGON,
|
||||
uname, "", cell, password, 0, &pw_exp, 0,
|
||||
&reason);
|
||||
if ( ISHIGHSECURITY(LogonOption))
|
||||
*lpLogonScript = GetLogonScript(GenRandomName(RandomName)); /*only do if high security option is on*/
|
||||
|
||||
|
||||
/* Possibly loop until AFS is started. */
|
||||
while ( (ISHIGHSECURITY(LogonOption) || ISLOGONINTEGRATED(LogonOption))) {
|
||||
code=0;
|
||||
|
||||
/* is service started yet?*/
|
||||
|
||||
if (ISHIGHSECURITY(LogonOption) && !ISLOGONINTEGRATED(LogonOption)) /* if high security only then check for service started only*/
|
||||
{
|
||||
if (IsServiceRunning())
|
||||
break;
|
||||
code = KTC_NOCM;
|
||||
if (!afsWillAutoStart)
|
||||
break;
|
||||
} else if (ISLOGONINTEGRATED(LogonOption) && !ISHIGHSECURITY(LogonOption)) /* if Integrated Logon only */
|
||||
{
|
||||
DebugEvent("AFS AfsLogon - ka_UserAuthenticateGeneral2","Code[%x],uame[%s] Cell[%s]",code,uname,cell);
|
||||
code = ka_UserAuthenticateGeneral2(
|
||||
KA_USERAUTH_VERSION+KA_USERAUTH_AUTHENT_LOGON,
|
||||
uname, "", cell, password,uname, 0, &pw_exp, 0,
|
||||
&reason);
|
||||
DebugEvent("AFS AfsLogon - (INTEGERTED only)ka_UserAuthenticateGeneral2","Code[%x]",code);
|
||||
} else if (ISLOGONINTEGRATED(LogonOption) && ISHIGHSECURITY(LogonOption)) /* if Integrated Logon and High Security pass random generated name*/
|
||||
{
|
||||
code = ka_UserAuthenticateGeneral2(
|
||||
KA_USERAUTH_VERSION+KA_USERAUTH_AUTHENT_LOGON,
|
||||
uname, "", cell, password,RandomName, 0, &pw_exp, 0,
|
||||
&reason);
|
||||
DebugEvent("AFS AfsLogon - (Both)ka_UserAuthenticateGeneral2","Code[%x],RandomName[%s]",code,RandomName);
|
||||
} else {
|
||||
code = KTC_NOCM; /* we shouldn't ever get here*/
|
||||
}
|
||||
|
||||
/* If we've failed because the client isn't running yet and the
|
||||
* client is set to autostart (and therefore it makes sense for
|
||||
* us to wait for it to start) then sleep a while and try again.
|
||||
* If the error was something else, then give up. */
|
||||
if (code != KTC_NOCM && code != KTC_NOCMRPC || !afsWillAutoStart)
|
||||
break;
|
||||
break;
|
||||
|
||||
/* If the retry interval has expired and we still aren't
|
||||
* logged in, then just give up if we are not in interactive
|
||||
* mode or the failSilently flag is set, otherwise let the
|
||||
* user know we failed and give them a chance to try again. */
|
||||
if (retryInterval <= 0) {
|
||||
if (!interactive || failSilently)
|
||||
break;
|
||||
|
||||
if (retryInterval <= 0) {
|
||||
if (!interactive || failSilently)
|
||||
break;
|
||||
flag = MessageBox(hwndOwner,
|
||||
"AFS is still starting. Retry?",
|
||||
"AFS Logon",
|
||||
MB_ICONQUESTION | MB_RETRYCANCEL);
|
||||
if (flag == IDCANCEL)
|
||||
break;
|
||||
break;
|
||||
|
||||
/* Wait just a little while and try again */
|
||||
retryInterval = sleepInterval = DEFAULT_SLEEP_INTERVAL;
|
||||
}
|
||||
|
||||
if (retryInterval < sleepInterval)
|
||||
sleepInterval = retryInterval;
|
||||
|
||||
Sleep(sleepInterval * 1000);
|
||||
|
||||
retryInterval -= sleepInterval;
|
||||
retryInterval = sleepInterval = DEFAULT_SLEEP_INTERVAL;
|
||||
}
|
||||
|
||||
if (retryInterval < sleepInterval)
|
||||
sleepInterval = retryInterval;
|
||||
|
||||
Sleep(sleepInterval * 1000);
|
||||
|
||||
retryInterval -= sleepInterval;
|
||||
}
|
||||
|
||||
checkauth:
|
||||
if (code) {
|
||||
char msg[128];
|
||||
|
||||
sprintf(msg, "Integrated login failed: %s", reason);
|
||||
sprintf(msg, "Integrated login failed: %s", reason);
|
||||
|
||||
if (interactive && !failSilently)
|
||||
MessageBox(hwndOwner, msg, "AFS Logon", MB_OK);
|
||||
@ -331,17 +482,19 @@ checkauth:
|
||||
1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get logon script */
|
||||
if (interactive)
|
||||
*lpLogonScript = GetLogonScript();
|
||||
|
||||
if (code) {
|
||||
code = MapAuthError(code);
|
||||
code = MapAuthError(code);
|
||||
SetLastError(code);
|
||||
}
|
||||
if (ISHIGHSECURITY(LogonOption) && (code!=0))
|
||||
{
|
||||
if (*lpLogonScript)
|
||||
LocalFree(*lpLogonScript);
|
||||
*lpLogonScript = NULL;
|
||||
if (!(afsWillAutoStart || ISLOGONINTEGRATED(LogonOption))) // its not running, so if not autostart or integrated logon then just skip
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
DebugEvent("AFS AfsLogon - Exit","Return Code[%x]",code);
|
||||
return code;
|
||||
}
|
||||
|
||||
@ -354,6 +507,7 @@ DWORD APIENTRY NPPasswordChangeNotify(
|
||||
LPVOID StationHandle,
|
||||
DWORD dwChangeInfo)
|
||||
{
|
||||
DebugEvent0("AFS AfsLogon - NPPasswordChangeNotify");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ long cm_WriteConfigInt(char *labelp, long value)
|
||||
return -1;
|
||||
|
||||
code = RegSetValueEx(parmKey, labelp, 0, REG_DWORD,
|
||||
&value, sizeof(value));
|
||||
(LPBYTE)&value, sizeof(value));
|
||||
RegCloseKey (parmKey);
|
||||
if (code != ERROR_SUCCESS)
|
||||
return -1;
|
||||
@ -535,7 +535,7 @@ long cm_AppendNewCellLine(cm_configFile_t *filep, char *linep)
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern long cm_CloseCellFile(cm_configFile_t *filep)
|
||||
long cm_CloseCellFile(cm_configFile_t *filep)
|
||||
{
|
||||
char wdir[256];
|
||||
char sdir[256];
|
||||
|
@ -1754,7 +1754,7 @@ register struct cmd_syndesc *as; {
|
||||
tp = (char *)(space + sizeof(afs_int32));
|
||||
lp = (afs_int32 *)tp;
|
||||
*lp++ = 0x12345678;
|
||||
size == sizeof(afs_int32) + sizeof(afs_int32);
|
||||
size = sizeof(afs_int32) + sizeof(afs_int32);
|
||||
blob.out_size = MAXSIZE;
|
||||
blob.in_size = sizeof(afs_int32);
|
||||
blob.in = space;
|
||||
|
@ -778,16 +778,7 @@ smb_user_t *smb_FindUID(smb_vc_t *vcp, unsigned short uid, int flags)
|
||||
for(uidp = vcp->usersp; uidp; uidp = uidp->nextp) {
|
||||
if (uid == uidp->userID) {
|
||||
uidp->refCount++;
|
||||
#ifdef DEBUG_VERBOSE
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[132];
|
||||
h = RegisterEventSource(NULL, "AFS Service - smb_FindUID (Find by UID)");
|
||||
sprintf(buf, "VCP[%x] found-uid[%d] name[%s]",vcp,uidp->userID,(uidp->unp ? uidp->unp->name : ""));
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
#endif
|
||||
osi_LogEvent("AFS smb_FindUID (Find by UID)",NULL," VCP[%x] found-uid[%d] name[%s]",vcp,uidp->userID,(uidp->unp) ? uidp->unp->name : "");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -800,16 +791,7 @@ smb_user_t *smb_FindUID(smb_vc_t *vcp, unsigned short uid, int flags)
|
||||
vcp->usersp = uidp;
|
||||
lock_InitializeMutex(&uidp->mx, "uid_t mutex");
|
||||
uidp->userID = uid;
|
||||
#ifdef DEBUG_VERBOSE
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[132];
|
||||
h = RegisterEventSource(NULL, "AFS Service - smb_FindUID (Find by UID)");
|
||||
sprintf(buf, "VCP[%x] new-uid[%d] name[%s]",vcp,uidp->userID,(uidp->unp ? uidp->unp->name : ""));
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
#endif
|
||||
osi_LogEvent("AFS smb_FindUID (Find by UID)",NULL,"VCP[%x] new-uid[%d] name[%s]",vcp,uidp->userID,(uidp->unp ? uidp->unp->name : ""));
|
||||
}
|
||||
lock_ReleaseWrite(&smb_rctLock);
|
||||
return uidp;
|
||||
@ -850,16 +832,7 @@ smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, char *usern)
|
||||
continue;
|
||||
if (stricmp(uidp->unp->name, usern) == 0) {
|
||||
uidp->refCount++;
|
||||
#ifdef DEBUG_VERBOSE
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[132];
|
||||
h = RegisterEventSource(NULL, "AFS Service - smb_FindUserByNameThisSession");
|
||||
sprintf(buf, "VCP[%x] uid[%d] match-name[%s]",vcp,uidp->userID,usern);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
#endif
|
||||
osi_LogEvent("AFS smb_FindUserByNameThisSession",NULL,"VCP[%x] uid[%d] match-name[%s]",vcp,uidp->userID,usern);
|
||||
break;
|
||||
} else
|
||||
continue;
|
||||
@ -5391,27 +5364,11 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
|
||||
code = smb_ReceiveCoreWriteRaw (vcp, inp, outp,
|
||||
rwcp);
|
||||
else {
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
HANDLE h; char *ptbuf[1],buf[132];DWORD err;
|
||||
h = RegisterEventSource(NULL, "AFS Server - Dispatch");
|
||||
sprintf(buf,"%s vcp[%x] lana[%d] lsn[%d]",myCrt_Dispatch(inp->inCom),vcp,vcp->lana,vcp->lsn);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
#endif
|
||||
osi_LogEvent("AFS Dispatch %s",(myCrt_Dispatch(inp->inCom)),"vcp[%x] lana[%d] lsn[%d]",vcp,vcp->lana,vcp->lsn);
|
||||
osi_Log4(afsd_logp,"Dispatch %s vcp[%x] lana[%d] lsn[%d]",(myCrt_Dispatch(inp->inCom)),vcp,vcp->lana,vcp->lsn);
|
||||
code = (*(dp->procp)) (vcp, inp, outp);
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
h = RegisterEventSource(NULL, "AFS Server - Dispatch return ");
|
||||
sprintf(buf,"code[%d]",code-CM_ERROR_BASE);
|
||||
if (code)
|
||||
ptbuf[0] = buf;
|
||||
else
|
||||
ptbuf[0] = "code[0]";
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
#endif
|
||||
osi_LogEvent("AFS Dispatch return",NULL,"Code[%d]",(code==0)?0:code-CM_ERROR_BASE,"");
|
||||
osi_Log1(afsd_logp,"Dispatch return code[%d]",(code==0)?0:code-CM_ERROR_BASE);
|
||||
}
|
||||
|
||||
if (oldGen != sessionGen) {
|
||||
@ -5465,7 +5422,7 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
|
||||
1, ncbp->ncb_length, ptbuf, smbp);
|
||||
DeregisterEventSource(h);
|
||||
#else /* DJGPP */
|
||||
osi_Log1(afsd_logp, "Invalid SMB message, length %d",
|
||||
osi_Log1(afsd_logp, "Invalid SMB message, length %d",
|
||||
ncbp->ncb_length);
|
||||
#endif /* !DJGPP */
|
||||
|
||||
|
@ -139,24 +139,6 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
||||
pwd = smb_ParseString(tp, &tp);
|
||||
usern = smb_ParseString(tp, &tp);
|
||||
|
||||
if (strlen(usern)==0) {
|
||||
/*return CM_ERROR_NOACCESS;*/
|
||||
newUid = 0; /* always assign uid 0 for blank username */
|
||||
uidp = smb_FindUID(vcp, newUid, SMB_FLAG_CREATE);
|
||||
#ifdef DEBUG_VERBOSE
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[132];
|
||||
h = RegisterEventSource(NULL, "AFS Service - smb_ReceiveV3SessionSetupX");
|
||||
sprintf(buf, "VCP[%x] lsn[%d] anonymous, uid[%d]",vcp,vcp->lsn,uidp->userID);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
#endif
|
||||
smb_ReleaseUID(uidp);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* On Windows 2000, this function appears to be called more often than
|
||||
it is expected to be called. This resulted in multiple smb_user_t
|
||||
records existing all for the same user session which results in all
|
||||
@ -171,16 +153,8 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
||||
unp = uidp->unp;
|
||||
userp = unp->userp;
|
||||
newUid = (unsigned short)uidp->userID; /* For some reason these are different types!*/
|
||||
#ifdef DEBUG_VERBOSE
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[132];
|
||||
h = RegisterEventSource(NULL, "AFS Service - smb_ReceiveV3SessionSetupX");
|
||||
sprintf(buf,"FindUserByName:VCP[%x],Lana[%d],lsn[%d],userid[%d],name[%s]",vcp,vcp->lana,vcp->lsn,newUid,usern);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
#endif
|
||||
osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"FindUserByName:Lana[%d],lsn[%d],userid[%d],name[%s]",vcp->lana,vcp->lsn,newUid,usern);
|
||||
osi_Log3(afsd_logp,"smb_ReceiveV3SessionSetupX FindUserByName:Lana[%d],lsn[%d],userid[%d]",vcp->lana,vcp->lsn,newUid);
|
||||
smb_ReleaseUID(uidp);
|
||||
}
|
||||
else {
|
||||
@ -192,7 +166,7 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
||||
if (!userp)
|
||||
userp = cm_NewUser();
|
||||
lock_ObtainMutex(&vcp->mx);
|
||||
newUid = vcp->uidCounter++;
|
||||
newUid = (strlen(usern)==0)?0:vcp->uidCounter++;
|
||||
lock_ReleaseMutex(&vcp->mx);
|
||||
|
||||
/* Create a new smb_user_t structure and connect them up */
|
||||
@ -203,21 +177,12 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
|
||||
uidp = smb_FindUID(vcp, newUid, SMB_FLAG_CREATE);
|
||||
lock_ObtainMutex(&uidp->mx);
|
||||
uidp->unp = unp;
|
||||
#ifdef DEBUG_VERBOSE
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[132];
|
||||
h = RegisterEventSource(NULL, "AFS Service - smb_ReceiveV3SessionSetupX");
|
||||
sprintf(buf,"NewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d],name[%s]",vcp,vcp->lana,vcp->lsn,newUid,usern);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
#endif
|
||||
osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d],TicketKTCName[%s]",vcp,vcp->lana,vcp->lsn,newUid,usern);
|
||||
osi_Log4(afsd_logp,"smb_ReceiveV3SessionSetupX MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d]",vcp,vcp->lana,vcp->lsn,newUid);
|
||||
lock_ReleaseMutex(&uidp->mx);
|
||||
smb_ReleaseUID(uidp);
|
||||
}
|
||||
|
||||
done:
|
||||
/* Return UID to the client */
|
||||
((smb_t *)outp)->uid = newUid;
|
||||
/* Also to the next chained message */
|
||||
@ -619,6 +584,8 @@ long smb_ReceiveV3Tran2A(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
||||
lock_ReleaseWrite(&smb_globalLock);
|
||||
|
||||
/* now dispatch it */
|
||||
osi_LogEvent("AFS-Dispatch-2[%s]",myCrt_2Dispatch(asp->opcode),"vcp[%x] lana[%d] lsn[%d]",vcp,vcp->lana,vcp->lsn);
|
||||
osi_Log4(afsd_logp,"AFS Server - Dispatch-2 %s vcp[%x] lana[%d] lsn[%d]",myCrt_2Dispatch(asp->opcode),vcp,vcp->lana,vcp->lsn);
|
||||
code = (*smb_tran2DispatchTable[asp->opcode].procp)(vcp, asp, outp);
|
||||
|
||||
/* if an error is returned, we're supposed to send an error packet,
|
||||
@ -4137,7 +4104,6 @@ cm_user_t *smb_FindCMUserByName(/*smb_vc_t *vcp,*/ char *usern, char *machine)
|
||||
{
|
||||
cm_user_t *userp;
|
||||
/*int newUid;*/
|
||||
smb_user_t *uidp;
|
||||
smb_username_t *unp;
|
||||
|
||||
unp = smb_FindUserByName(usern, machine, SMB_FLAG_CREATE);
|
||||
@ -4145,27 +4111,10 @@ cm_user_t *smb_FindCMUserByName(/*smb_vc_t *vcp,*/ char *usern, char *machine)
|
||||
lock_ObtainMutex(&unp->mx);
|
||||
unp->userp = cm_NewUser();
|
||||
lock_ReleaseMutex(&unp->mx);
|
||||
#ifdef DEBUG_VERBOSE
|
||||
{ //jimpeter
|
||||
HANDLE h; char *ptbuf[1],buf[132];
|
||||
h = RegisterEventSource(NULL, "AFS Service - smb_FindCMUserByName");
|
||||
sprintf(buf,"New User name[%s] machine[%s]",usern,machine);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef DEBUG_VERBOSE
|
||||
else { //jimpeter
|
||||
HANDLE h; char *ptbuf[1],buf[132];
|
||||
h = RegisterEventSource(NULL, "AFS Service - smb_FindCMUserByName");
|
||||
sprintf(buf,"Found-name[%s] machine[%s]",usern,machine);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
#endif
|
||||
osi_LogEvent("AFS smb_FindCMUserByName New User",NULL,"name[%s] machine[%s]",usern,machine);
|
||||
} else {
|
||||
osi_LogEvent("AFS smb_FindCMUserByName Found",NULL,"name[%s] machine[%s]",usern,machine);
|
||||
}
|
||||
return unp->userp;
|
||||
}
|
||||
|
||||
|
@ -283,9 +283,14 @@ long smb_IoctlV3Read(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp, smb_pack
|
||||
osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
|
||||
uidp->userID, userp,
|
||||
osi_LogSaveString(afsd_logp, uidp->unp->name));
|
||||
else
|
||||
else {
|
||||
if (uidp)
|
||||
osi_Log2(afsd_logp, "Ioctl uid %d user %x no name",
|
||||
uidp->userID, userp);
|
||||
else
|
||||
osi_Log1(afsd_logp, "Ioctl no uid user %x no name",
|
||||
userp);
|
||||
}
|
||||
smb_ReleaseUID(uidp);
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,15 @@ BOOL Config_SetCellName (LPCTSTR pszName, ULONG *pStatus)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* These two functions are not needed as of the 1.2.2a updates.
|
||||
The old implementation used to 'bind' afslogon.dll to the credentials manager
|
||||
when the Integrated Logon was selected.
|
||||
|
||||
With version 1.2.2a afslogon.dll is always 'bound' to the credentials manager; therefore,
|
||||
the binding operation is done during installation. Note: the Integrated Logon is
|
||||
selected by an entry in the registry (LogonOptions).
|
||||
*/
|
||||
void Config_GetAuthentFlag (BOOL *pfFlag)
|
||||
{
|
||||
*pfFlag = FALSE;
|
||||
@ -335,7 +343,7 @@ BOOL Config_SetAuthentFlag (BOOL fFlag, ULONG *pStatus)
|
||||
Message (MB_ICONHAND, GetErrorTitle(), IDS_FAILCONFIG_AUTHENT, TEXT("%ld"), status);
|
||||
return rc;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void Config_GetTrayIconFlag (BOOL *pfFlag)
|
||||
{
|
||||
@ -811,7 +819,7 @@ BOOL Config_SetCachePath(LPCTSTR pszPath, ULONG *pStatus)
|
||||
void Config_GetLanAdapter (ULONG *pnLanAdapter)
|
||||
{
|
||||
if (!Config_ReadNum (TEXT("LANadapter"), (DWORD*)pnLanAdapter))
|
||||
*pnLanAdapter = 0;
|
||||
*pnLanAdapter = -1;
|
||||
}
|
||||
|
||||
BOOL Config_SetLanAdapter (ULONG nLanAdapter, ULONG *pStatus)
|
||||
|
@ -57,9 +57,6 @@ BOOL Config_SetGatewayName (LPCTSTR pszName, ULONG *pStatus = NULL);
|
||||
BOOL Config_ContactGateway (LPTSTR pszGateway, LPTSTR pszCell);
|
||||
void Config_FixGatewayDrives (void);
|
||||
|
||||
void Config_GetAuthentFlag (BOOL *pfFlag);
|
||||
BOOL Config_SetAuthentFlag (BOOL fFlag, ULONG *pStatus = NULL);
|
||||
|
||||
void Config_GetTrayIconFlag (BOOL *pfFlag);
|
||||
BOOL Config_SetTrayIconFlag (BOOL fFlag, ULONG *pStatus = NULL);
|
||||
|
||||
|
@ -95,6 +95,13 @@ BOOL CALLBACK Misc_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
|
||||
case IDCANCEL:
|
||||
Misc_OnCancel(hDlg);
|
||||
break;
|
||||
case IDC_AUTOLANA:
|
||||
if (IsDlgButtonChecked(hDlg,IDC_AUTOLANA))
|
||||
nLanAdapter=-1;
|
||||
else
|
||||
nLanAdapter=0;
|
||||
SP_SetPos (GetDlgItem (hDlg, IDC_LAN_ADAPTER),nLanAdapter);
|
||||
EnableWindow(GetDlgItem(hDlg,IDC_LAN_ADAPTER),(nLanAdapter!=-1));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -129,7 +136,7 @@ void Misc_OnInitDialog (HWND hDlg)
|
||||
fFirstTime = FALSE;
|
||||
}
|
||||
|
||||
CreateSpinner (GetDlgItem (hDlg, IDC_LAN_ADAPTER), 10, FALSE, nLANA_MIN, nLanAdapter, nLANA_MAX);
|
||||
CreateSpinner (GetDlgItem (hDlg, IDC_LAN_ADAPTER), 99, FALSE, nLANA_MIN, nLanAdapter, nLANA_MAX);
|
||||
CreateSpinner (GetDlgItem (hDlg, IDC_PROBE), 10, FALSE, csecPROBE_MIN, csecProbe, csecPROBE_MAX);
|
||||
CreateSpinner (GetDlgItem (hDlg, IDC_THREADS), 10, FALSE, cTHREADS_MIN, nThreads, cTHREADS_MAX);
|
||||
CreateSpinner (GetDlgItem (hDlg, IDC_DAEMONS), 10, FALSE, cDAEMONS_MIN, nDaemons, cDAEMONS_MAX);
|
||||
@ -137,11 +144,14 @@ void Misc_OnInitDialog (HWND hDlg)
|
||||
SetDlgItemText (hDlg, IDC_SYSNAME, szSysName);
|
||||
SetDlgItemText (hDlg, IDC_ROOTVOLUME, szRootVolume);
|
||||
SetDlgItemText (hDlg, IDC_MOUNTDIR, szMountDir);
|
||||
CheckDlgButton (hDlg, IDC_AUTOLANA, (nLanAdapter==-1));
|
||||
EnableWindow(GetDlgItem(hDlg,IDC_LAN_ADAPTER),(nLanAdapter!=-1));
|
||||
}
|
||||
|
||||
void Misc_OnOK (HWND hDlg)
|
||||
{
|
||||
nLanAdapter = SP_GetPos (GetDlgItem (hDlg, IDC_LAN_ADAPTER));
|
||||
nLanAdapter = (IsDlgButtonChecked(hDlg,IDC_AUTOLANA))?-1
|
||||
:SP_GetPos (GetDlgItem (hDlg, IDC_LAN_ADAPTER));
|
||||
|
||||
csecProbe = SP_GetPos (GetDlgItem (hDlg, IDC_PROBE));
|
||||
|
||||
@ -161,7 +171,7 @@ BOOL Misc_OnApply()
|
||||
{
|
||||
if (fFirstTime)
|
||||
return TRUE;
|
||||
|
||||
|
||||
if (nLanAdapter != g.Configuration.nLanAdapter) {
|
||||
if (!Config_SetLanAdapter (nLanAdapter))
|
||||
return FALSE;
|
||||
|
@ -10,21 +10,24 @@
|
||||
extern "C" {
|
||||
#include <afs/param.h>
|
||||
#include <afs/stds.h>
|
||||
#include <rx/rxkad.h>
|
||||
}
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <WINNT/TaLocale.h>
|
||||
#include "drivemap.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <adssts.h>
|
||||
#include <osilog.h>
|
||||
|
||||
/*
|
||||
* REGISTRY ___________________________________________________________________
|
||||
*
|
||||
*/
|
||||
|
||||
static const TCHAR AFSConfigKeyName[] = TEXT("SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters");
|
||||
#undef AFSConfigKeyName
|
||||
const TCHAR sAFSConfigKeyName[] = TEXT("SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters");
|
||||
|
||||
|
||||
/*
|
||||
@ -452,7 +455,7 @@ BOOL DriveIsGlobalAfsDrive(TCHAR chDrive)
|
||||
TCHAR szValue[128];
|
||||
HKEY hKey;
|
||||
|
||||
_stprintf(szKeyName, TEXT("%s\\GlobalAutoMapper"), AFSConfigKeyName);
|
||||
_stprintf(szKeyName, TEXT("%s\\GlobalAutoMapper"), sAFSConfigKeyName);
|
||||
|
||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, szKeyName, 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
@ -745,8 +748,11 @@ BOOL GetDriveSubmount (TCHAR chDrive, LPTSTR pszSubmountNow)
|
||||
pszSubmount = &szMapping[ lstrlen(cszLANMANDEVICE) ];
|
||||
|
||||
if (IsWindows2000())
|
||||
{
|
||||
if (*(pszSubmount) != TEXT(';'))
|
||||
return FALSE;
|
||||
} else
|
||||
--pszSubmount;
|
||||
|
||||
if (toupper(*(++pszSubmount)) != chDrive)
|
||||
return FALSE;
|
||||
@ -791,3 +797,300 @@ BOOL GetDriveSubmount (TCHAR chDrive, LPTSTR pszSubmountNow)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Generate Random User name random acording to time*/
|
||||
DWORD dwOldState=0;
|
||||
TCHAR pUserName[MAXRANDOMNAMELEN];
|
||||
BOOL fUserName=FALSE;
|
||||
#define AFSLogonOptionName TEXT("System\\CurrentControlSet\\Services\\TransarcAFSDaemon\\NetworkProvider")
|
||||
|
||||
void SetBitLogonOption(BOOL set,DWORD value)
|
||||
{
|
||||
|
||||
RWLogonOption(FALSE,((set)?value | RWLogonOption(TRUE,0):RWLogonOption(TRUE,0) & ~value) );
|
||||
}
|
||||
|
||||
DWORD RWLogonOption(BOOL read,DWORD value)
|
||||
{
|
||||
// if read is true then if value==0 return registry value
|
||||
// if read and value!=0 then use value to test registry, return TRUE if value bits match value read
|
||||
HKEY hk;
|
||||
DWORD dwDisp;
|
||||
DWORD LSPtype, LSPsize;
|
||||
DWORD rval;
|
||||
if (read)
|
||||
{
|
||||
rval=0;
|
||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSLogonOptionName,0, KEY_QUERY_VALUE, &hk)==ERROR_SUCCESS)
|
||||
{
|
||||
LSPsize=sizeof(rval);
|
||||
RegQueryValueEx(hk, "LogonOptions", NULL,
|
||||
&LSPtype, (LPBYTE)&rval, &LSPsize);
|
||||
RegCloseKey (hk);
|
||||
}
|
||||
return (value==0)?rval:((rval & value)==value);
|
||||
|
||||
} else { //write
|
||||
if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, AFSLogonOptionName, 0, NULL, 0, KEY_SET_VALUE, NULL, &hk, &dwDisp) == ERROR_SUCCESS)
|
||||
{
|
||||
RegSetValueEx(hk,TEXT("LogonOptions"),NULL,REG_DWORD,(LPBYTE)&value,sizeof(value));
|
||||
RegCloseKey (hk);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void MapShareName(char *pszCmdLineA)
|
||||
{
|
||||
fUserName = TRUE;
|
||||
TCHAR *p=pUserName;
|
||||
pszCmdLineA++;
|
||||
while (*pszCmdLineA && (*pszCmdLineA != ' '))
|
||||
{
|
||||
*p++=*pszCmdLineA++;
|
||||
}
|
||||
}
|
||||
|
||||
void GenRandomName(TCHAR *pname,int len)
|
||||
{
|
||||
if (fUserName)
|
||||
{ //user name was passed through command line, use once
|
||||
fUserName=FALSE;
|
||||
return;
|
||||
}
|
||||
srand( (unsigned)time( NULL ) );
|
||||
for (int i=0;i<len;i++)
|
||||
pname[i]='a'+(rand() % 26);
|
||||
pname[len]=0;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
Make a connection using users name
|
||||
if fUserName then force a connection
|
||||
*/
|
||||
|
||||
BOOL TestAndDoMapShare(DWORD dwState)
|
||||
{
|
||||
if ((dwState!=SERVICE_RUNNING) || (dwOldState!=SERVICE_START_PENDING)
|
||||
|| (!RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY)))
|
||||
{
|
||||
dwOldState=dwState;
|
||||
return TRUE;
|
||||
}
|
||||
dwOldState=SERVICE_RUNNING;
|
||||
return DoMapShare();
|
||||
}
|
||||
|
||||
BOOL IsServiceActive()
|
||||
{
|
||||
SC_HANDLE hManager;
|
||||
SERVICE_STATUS Status;
|
||||
if ((hManager = OpenSCManager (NULL, NULL, GENERIC_READ)) != NULL)
|
||||
{
|
||||
SC_HANDLE hService;
|
||||
if ((hService = OpenService (hManager, TEXT("TransarcAFSDaemon"), GENERIC_READ)) != NULL)
|
||||
{
|
||||
QueryServiceStatus (hService, &Status);
|
||||
CloseServiceHandle (hService);
|
||||
}
|
||||
|
||||
CloseServiceHandle (hManager);
|
||||
}
|
||||
|
||||
return (Status.dwCurrentState == SERVICE_RUNNING) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
void TestAndDoUnMapShare()
|
||||
{
|
||||
if (!RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY))
|
||||
return;
|
||||
DoUnMapShare(FALSE);
|
||||
}
|
||||
|
||||
void DoUnMapShare(BOOL force)
|
||||
{
|
||||
TCHAR szMachine[ MAX_PATH],szPath[MAX_PATH];
|
||||
DWORD rc=28;
|
||||
HANDLE hEnum;
|
||||
LPNETRESOURCE lpnrLocal,lpnr=NULL;
|
||||
DWORD res;
|
||||
DWORD cbBuffer=16384;
|
||||
DWORD cEntries=-1;
|
||||
GetComputerName(szMachine,&rc);
|
||||
CHAR *pSubmount="";
|
||||
// Initialize the data structure
|
||||
if ((res=WNetOpenEnum(RESOURCE_CONNECTED,RESOURCETYPE_DISK,RESOURCEUSAGE_CONNECTABLE,lpnr,&hEnum))!=NO_ERROR)
|
||||
return;
|
||||
sprintf(szPath,"\\\\%s-afs\\",szMachine);
|
||||
_strlwr(szPath);
|
||||
lpnrLocal=(LPNETRESOURCE) GlobalAlloc(GPTR,cbBuffer);
|
||||
do {
|
||||
memset(lpnrLocal,0,cbBuffer);
|
||||
if ((res = WNetEnumResource(hEnum,&cEntries,lpnrLocal,&cbBuffer))==NO_ERROR)
|
||||
{
|
||||
for (DWORD i=0;i<cEntries;i++)
|
||||
{
|
||||
if (strstr(_strlwr(lpnrLocal[i].lpRemoteName),szPath))
|
||||
{
|
||||
if ((lpnrLocal[i].lpLocalName) && (strlen(lpnrLocal[i].lpLocalName)>0))
|
||||
if (force)
|
||||
WNetCancelConnection(lpnrLocal[i].lpLocalName,TRUE);
|
||||
else
|
||||
WNetCancelConnection(lpnrLocal[i].lpRemoteName,TRUE);
|
||||
DEBUG_EVENT1("AFS DriveUnMap","UnMap-Remote=%x",res);
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (res!=ERROR_NO_MORE_ITEMS);
|
||||
GlobalFree((HGLOBAL)lpnrLocal);
|
||||
WNetCloseEnum(hEnum);
|
||||
}
|
||||
|
||||
BOOL DoMapShareChange()
|
||||
{
|
||||
DRIVEMAPLIST List;
|
||||
TCHAR szMachine[ MAX_PATH],szPath[MAX_PATH];
|
||||
DWORD rc=28;
|
||||
HANDLE hEnum;
|
||||
LPNETRESOURCE lpnrLocal,lpnr=NULL;
|
||||
DWORD res;
|
||||
DWORD cbBuffer=16384;
|
||||
DWORD cEntries=-1;
|
||||
GetComputerName(szMachine,&rc);
|
||||
CHAR szUser[MAXRANDOMNAMELEN];
|
||||
// Initialize the data structure
|
||||
if (!IsServiceActive())
|
||||
return TRUE;
|
||||
memset (&List, 0x00, sizeof(DRIVEMAPLIST));
|
||||
for (size_t ii = 0; ii < 26; ++ii)
|
||||
List.aDriveMap[ii].chDrive = chDRIVE_A + ii;
|
||||
QueryDriveMapList_ReadSubmounts (&List);
|
||||
if ((res=WNetOpenEnum(RESOURCE_CONNECTED,RESOURCETYPE_DISK,RESOURCEUSAGE_CONNECTABLE,lpnr,&hEnum))!=NO_ERROR)
|
||||
return FALSE;
|
||||
lpnrLocal=(LPNETRESOURCE) GlobalAlloc(GPTR,cbBuffer);
|
||||
sprintf(szPath,"\\\\%s-afs\\",szMachine);
|
||||
_strlwr(szPath);
|
||||
do {
|
||||
memset(lpnrLocal,0,cbBuffer);
|
||||
if ((res = WNetEnumResource(hEnum,&cEntries,lpnrLocal,&cbBuffer))==NO_ERROR)
|
||||
{
|
||||
for (DWORD i=0;i<cEntries;i++)
|
||||
{
|
||||
if (strstr(_strlwr(lpnrLocal[i].lpRemoteName),szPath)==NULL)
|
||||
continue; //only look at real afs mappings
|
||||
CHAR * pSubmount=strrchr(lpnrLocal[i].lpRemoteName,'\\')+1;
|
||||
if (strcmpi(pSubmount,"all")==0)
|
||||
continue; // do not remove 'all'
|
||||
for (DWORD j=0;j<List.cSubmounts;j++)
|
||||
{
|
||||
if (
|
||||
(List.aSubmounts[j].szSubmount[0]) &&
|
||||
(strcmpi(List.aSubmounts[j].szSubmount,pSubmount)==0)
|
||||
)
|
||||
{
|
||||
List.aSubmounts[j].fInUse=TRUE;
|
||||
goto nextname;
|
||||
}
|
||||
}
|
||||
// wasn't on list so lets remove
|
||||
sprintf(szPath,"\\\\%s-afs\\%s",szMachine,pSubmount);
|
||||
WNetCancelConnection(szPath,TRUE);
|
||||
nextname:;
|
||||
}
|
||||
}
|
||||
} while (res!=ERROR_NO_MORE_ITEMS);
|
||||
GlobalFree((HGLOBAL)lpnrLocal);
|
||||
WNetCloseEnum(hEnum);
|
||||
sprintf(szPath,"\\\\%s-afs\\all",szMachine);
|
||||
cbBuffer=MAXRANDOMNAMELEN-1;
|
||||
// Lets connect all submounts that weren't connectd
|
||||
CHAR * pUser=szUser;
|
||||
if (WNetGetUser(szPath,(LPSTR)szUser,&cbBuffer)!=NO_ERROR)
|
||||
GenRandomName(szUser,MAXRANDOMNAMELEN-1);
|
||||
else {
|
||||
if ((pUser=strchr(szUser,'\\'))==NULL)
|
||||
return FALSE;
|
||||
pUser++;
|
||||
}
|
||||
for (DWORD j=0;j<List.cSubmounts;j++)
|
||||
{
|
||||
if (List.aSubmounts[j].fInUse)
|
||||
continue;
|
||||
sprintf(szPath,"\\\\%s-afs\\%s",szMachine,List.aSubmounts[j].szSubmount);
|
||||
NETRESOURCE nr;
|
||||
memset (&nr, 0x00, sizeof(NETRESOURCE));
|
||||
nr.dwType=RESOURCETYPE_DISK;
|
||||
nr.lpLocalName="";
|
||||
nr.lpRemoteName=szPath;
|
||||
DWORD res=WNetAddConnection2(&nr,NULL,pUser,0);
|
||||
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL DoMapShare()
|
||||
{
|
||||
DRIVEMAPLIST List;
|
||||
TCHAR szMachine[ MAX_PATH ];
|
||||
TCHAR szPath[ MAX_PATH ];
|
||||
DWORD rc=28;
|
||||
BOOL bMappedAll=FALSE;
|
||||
GetComputerName(szMachine,&rc);
|
||||
// Initialize the data structure
|
||||
DEBUG_EVENT0("AFS DoMapShare");
|
||||
QueryDriveMapList (&List);
|
||||
DoUnMapShare(TRUE);
|
||||
// All connections have been removed
|
||||
// Lets restore them after making the connection from the random name
|
||||
|
||||
GenRandomName(pUserName,MAXRANDOMNAMELEN-1);
|
||||
for (DWORD i=0;i<List.cSubmounts;i++)
|
||||
{
|
||||
if (List.aSubmounts[i].szSubmount[0])
|
||||
{
|
||||
sprintf(szPath,"\\\\%s-afs\\%s",szMachine,List.aSubmounts[i].szSubmount);
|
||||
NETRESOURCE nr;
|
||||
memset (&nr, 0x00, sizeof(NETRESOURCE));
|
||||
nr.dwType=RESOURCETYPE_DISK;
|
||||
nr.lpLocalName="";
|
||||
nr.lpRemoteName=szPath;
|
||||
DWORD res=WNetAddConnection2(&nr,NULL,pUserName,0);
|
||||
DEBUG_EVENT2("AFS DriveMap","Remote[%s]=%x",szPath,res);
|
||||
if (strcmpi("all",List.aSubmounts[i].szSubmount)==0)
|
||||
bMappedAll=TRUE;
|
||||
}
|
||||
}
|
||||
if (!bMappedAll) //make sure all is mapped also
|
||||
{
|
||||
sprintf(szPath,"\\\\%s-afs\\all",szMachine);
|
||||
NETRESOURCE nr;
|
||||
memset (&nr, 0x00, sizeof(NETRESOURCE));
|
||||
nr.dwType=RESOURCETYPE_DISK;
|
||||
nr.lpLocalName="";
|
||||
nr.lpRemoteName=szPath;
|
||||
DWORD res=WNetAddConnection2(&nr,NULL,pUserName,0);
|
||||
DEBUG_EVENT2("AFS DriveMap","Remote[%s]=%x",szPath,res);
|
||||
if (res==ERROR_SESSION_CREDENTIAL_CONFLICT)
|
||||
{
|
||||
WNetCancelConnection(szPath,TRUE);
|
||||
WNetAddConnection2(&nr,NULL,pUserName,0);
|
||||
}
|
||||
}
|
||||
for (TCHAR chDrive = chDRIVE_A; chDrive <= chDRIVE_Z; ++chDrive)
|
||||
{
|
||||
TCHAR szRemote[3];
|
||||
if (List.aDriveMap[chDrive-chDRIVE_A].fActive)
|
||||
{
|
||||
sprintf(szRemote,"%c:",chDrive);
|
||||
sprintf(szPath,"\\\\%s-afs\\%s",szMachine,List.aDriveMap[chDrive-chDRIVE_A].szSubmount);
|
||||
NETRESOURCE nr;
|
||||
memset (&nr, 0x00, sizeof(NETRESOURCE));
|
||||
nr.dwType=RESOURCETYPE_DISK;
|
||||
nr.lpLocalName=szRemote;
|
||||
nr.lpRemoteName=szPath;
|
||||
DWORD res=WNetAddConnection2(&nr,NULL,NULL,(List.aDriveMap[chDrive-chDRIVE_A].fPersistent)?CONNECT_UPDATE_PROFILE:0);
|
||||
DEBUG_EVENT3("AFS DriveMap","Persistant[%d] Remote[%s]=%x",List.aDriveMap[chDrive-chDRIVE_A].fPersistent,szPath,res);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -85,5 +85,19 @@ BOOL GetDriveSubmount (TCHAR chDrive, LPTSTR pszSubmountNow);
|
||||
BOOL SubmountToPath (PDRIVEMAPLIST pList, LPTSTR pszPath, LPTSTR pszSubmount, BOOL fMarkInUse);
|
||||
BOOL PathToSubmount (LPTSTR pszSubmount, LPTSTR pszMapping, LPTSTR pszSubmountReq, ULONG *pStatus);
|
||||
|
||||
BOOL TestAndDoMapShare(DWORD);
|
||||
BOOL DoMapShare();
|
||||
void MapShareName(char *);
|
||||
void DoUnMapShare(BOOL);
|
||||
BOOL DoMapShareChange();
|
||||
DWORD RWLogonOption(BOOL read,DWORD value);
|
||||
#ifndef DRIVEMAP_DEF_H
|
||||
extern void TestAndDoUnMapShare();
|
||||
extern TCHAR pUserName[];
|
||||
extern BOOL fUserName;
|
||||
extern DWORD RWLogonOption(BOOL read,DWORD value);
|
||||
extern void SetBitLogonOption(BOOL set,DWORD value);
|
||||
extern BOOL TestAndDoMapShare(DWORD);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -348,7 +348,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Miscellaneous Configuration"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT IDC_LAN_ADAPTER,90,20,32,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_LAN_ADAPTER,162,22,32,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_PROBE,90,40,32,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_THREADS,90,60,32,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_DAEMONS,90,80,32,13,ES_AUTOHSCROLL
|
||||
@ -367,8 +367,10 @@ BEGIN
|
||||
LTEXT "threads",IDC_STATIC,138,82,68,8
|
||||
LTEXT "S&ystem Name:",IDC_STATIC,15,102,71,8
|
||||
LTEXT "&Mount Directory:",IDC_STATIC,15,122,71,8
|
||||
LTEXT "&Lan Adapter Number:",IDC_STATIC,15,22,71,8
|
||||
LTEXT "&Root Volume:",IDC_STATIC,15,141,71,8
|
||||
CONTROL "Automatic Lana scan",IDC_AUTOLANA,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,19,22,82,10
|
||||
RTEXT "Lana Number:",IDC_STATICLANA,106,24,53,8
|
||||
END
|
||||
|
||||
IDD_DIAG_PARMS DIALOG DISCARDABLE 0, 0, 217, 135
|
||||
|
@ -163,6 +163,8 @@
|
||||
#define IDC_CHANGE 1059
|
||||
#define IDC_DIAG_PARMS 1060
|
||||
#define IDC_ROOTVOLUME 1061
|
||||
#define IDC_AUTOLANA 1062
|
||||
#define IDC_STATICLANA 1063
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
@ -173,7 +175,7 @@
|
||||
#define _APS_3D_CONTROLS 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 122
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1062
|
||||
#define _APS_NEXT_CONTROL_VALUE 1064
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
@ -618,6 +618,8 @@ void Submounts_OnApply (HWND hDlg)
|
||||
|
||||
FreeDriveMapList (&g.Configuration.NetDrives);
|
||||
QueryDriveMapList (&g.Configuration.NetDrives);
|
||||
if (g.Configuration.fLogonAuthent)
|
||||
DoMapShareChange();
|
||||
}
|
||||
|
||||
|
||||
@ -682,6 +684,7 @@ void Submounts_OnEdit (HWND hDlg)
|
||||
}
|
||||
}
|
||||
|
||||
// Action - On Remove submount item
|
||||
|
||||
void Submounts_OnRemove (HWND hDlg)
|
||||
{
|
||||
@ -698,6 +701,7 @@ void Submounts_OnRemove (HWND hDlg)
|
||||
}
|
||||
|
||||
|
||||
// Action - On Add or On Edit a submount item
|
||||
void Submounts_EditSubmount (HWND hDlg, PSUBMOUNT pSubmount)
|
||||
{
|
||||
HWND hList = GetDlgItem (hDlg, IDC_LIST);
|
||||
|
@ -10,6 +10,7 @@
|
||||
extern "C" {
|
||||
#include <afs/param.h>
|
||||
#include <afs/stds.h>
|
||||
#include <rx/rxkad.h>
|
||||
}
|
||||
|
||||
#include "afs_config.h"
|
||||
@ -17,6 +18,8 @@ extern "C" {
|
||||
#include "tab_hosts.h"
|
||||
#include "tab_advanced.h"
|
||||
|
||||
#include "drivemap.h"
|
||||
#include <adssts.h>
|
||||
|
||||
/*
|
||||
* VARIABLES __________________________________________________________________
|
||||
@ -70,7 +73,6 @@ BOOL fIsCellInCellServDB (LPCTSTR pszCell);
|
||||
BOOL CALLBACK Status_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp);
|
||||
void Status_OnRefresh (HWND hDlg);
|
||||
|
||||
|
||||
/*
|
||||
* ROUTINES ___________________________________________________________________
|
||||
*
|
||||
@ -220,7 +222,6 @@ BOOL GeneralTab_VerifyOK (HWND hDlg, BOOL fComplainIfInvalid)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
BOOL GeneralTab_OnApply (HWND hDlg, BOOL fForce, BOOL fComplainIfInvalid)
|
||||
{
|
||||
if (!fForce)
|
||||
@ -260,8 +261,7 @@ BOOL GeneralTab_OnApply (HWND hDlg, BOOL fForce, BOOL fComplainIfInvalid)
|
||||
BOOL fLogonAuthent = IsDlgButtonChecked (hDlg, IDC_LOGON);
|
||||
if (fLogonAuthent != g.Configuration.fLogonAuthent)
|
||||
{
|
||||
if (!Config_SetAuthentFlag (fLogonAuthent))
|
||||
return FALSE;
|
||||
SetBitLogonOption(fLogonAuthent,LOGON_OPTION_INTEGRATED);
|
||||
g.Configuration.fLogonAuthent = fLogonAuthent;
|
||||
}
|
||||
|
||||
@ -325,7 +325,7 @@ void GeneralTab_OnRefresh (HWND hDlg, BOOL fRequery)
|
||||
Config_GetGatewayName (g.Configuration.szGateway);
|
||||
|
||||
Config_GetCellName (g.Configuration.szCell);
|
||||
Config_GetAuthentFlag (&g.Configuration.fLogonAuthent);
|
||||
g.Configuration.fLogonAuthent=RWLogonOption(TRUE,LOGON_OPTION_INTEGRATED);
|
||||
Config_GetTrayIconFlag (&g.Configuration.fShowTrayIcon);
|
||||
|
||||
if (!g.fIsWinNT)
|
||||
@ -406,6 +406,7 @@ void GeneralTab_OnTimer (HWND hDlg)
|
||||
{
|
||||
DWORD CurrentState = Config_GetServiceState();
|
||||
DWORD DisplayState = GeneralTab_GetDisplayState(hDlg);
|
||||
TestAndDoMapShare(CurrentState); //Re map mounted drives if necessary
|
||||
|
||||
BOOL fInEndState = ((CurrentState == SERVICE_RUNNING) || (CurrentState == SERVICE_STOPPED));
|
||||
if (fInEndState && l.hStatus)
|
||||
@ -684,6 +685,7 @@ void GeneralTab_DoStartStop (HWND hDlg, BOOL fStart, BOOL fRestart)
|
||||
{
|
||||
g.fNeedRestart = FALSE;
|
||||
if (StartService (hService, 0, 0))
|
||||
TestAndDoMapShare(SERVICE_START_PENDING);
|
||||
fSuccess = TRUE;
|
||||
}
|
||||
else // (!fStart)
|
||||
@ -691,6 +693,8 @@ void GeneralTab_DoStartStop (HWND hDlg, BOOL fStart, BOOL fRestart)
|
||||
SERVICE_STATUS Status;
|
||||
if (ControlService (hService, SERVICE_CONTROL_STOP, &Status))
|
||||
fSuccess = TRUE;
|
||||
if (g.Configuration.fLogonAuthent)
|
||||
DoUnMapShare(FALSE);
|
||||
}
|
||||
|
||||
CloseServiceHandle (hService);
|
||||
|
@ -122,6 +122,7 @@ void Advanced_OnServiceTimer (HWND hDlg)
|
||||
DWORD dwSize = sizeof(Config);
|
||||
QueryServiceConfig (hService, (QUERY_SERVICE_CONFIG*)&Config, sizeof(Config), &dwSize);
|
||||
QueryServiceStatus (hService, &Status);
|
||||
TestAndDoMapShare(Status.dwCurrentState);
|
||||
|
||||
CloseServiceHandle (hService);
|
||||
}
|
||||
@ -156,6 +157,7 @@ void Advanced_OnServiceTimer (HWND hDlg)
|
||||
GetString (szStatus, IDS_SERVICE_STARTING);
|
||||
else
|
||||
GetString (szStatus, IDS_SERVICE_UNKNOWN);
|
||||
TestAndDoMapShare(Status.dwCurrentState);
|
||||
SetDlgItemText (hDlg, IDC_SERVICE_STATUS, szStatus);
|
||||
|
||||
if (fFinal && GetWindowLong (hDlg, DWL_USER))
|
||||
@ -194,12 +196,16 @@ void Advanced_OnChangeService (HWND hDlg, WORD wCmd)
|
||||
|
||||
case IDC_SERVICE_START:
|
||||
if (StartService (hService, 0, 0))
|
||||
{
|
||||
TestAndDoMapShare(SERVICE_START_PENDING);
|
||||
fSuccess = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case IDC_SERVICE_STOP:
|
||||
SERVICE_STATUS Status;
|
||||
if (ControlService (hService, SERVICE_CONTROL_STOP, &Status))
|
||||
TestAndDoUnMapShare();
|
||||
fSuccess = TRUE;
|
||||
break;
|
||||
}
|
||||
|
@ -225,7 +225,8 @@ void WizStarting_OnInitDialog (HWND hDlg)
|
||||
SC_HANDLE hService;
|
||||
if ((hService = OpenService (hManager, TEXT("TransarcAFSDaemon"), SERVICE_ALL_ACCESS)) != NULL)
|
||||
{
|
||||
StartService (hService, 0, 0);
|
||||
if (StartService (hService, 0, 0))
|
||||
TestAndDoMapShare(SERVICE_START_PENDING);
|
||||
|
||||
CloseServiceHandle (hService);
|
||||
}
|
||||
@ -253,6 +254,7 @@ void WizStarting_OnTimer (HWND hDlg)
|
||||
{
|
||||
QueryServiceStatus (hService, &Status);
|
||||
CloseServiceHandle (hService);
|
||||
TestAndDoMapShare(Status.dwCurrentState);
|
||||
}
|
||||
|
||||
CloseServiceHandle (hManager);
|
||||
|
@ -14,6 +14,7 @@ extern "C" {
|
||||
|
||||
#include "afscreds.h"
|
||||
#include "..\afsreg\afsreg.h" // So we can see if the server's installed
|
||||
#include "drivemap.h"
|
||||
|
||||
|
||||
/*
|
||||
@ -111,10 +112,18 @@ BOOL InitApp (LPSTR pszCmdLineA)
|
||||
case 'U':
|
||||
fUninstall = TRUE;
|
||||
break;
|
||||
case ':':
|
||||
MapShareName(pszCmdLineA);
|
||||
break;
|
||||
case 'x':
|
||||
case 'X':
|
||||
DoMapShare();
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*pszCmdLineA && (*pszCmdLineA != ' '))
|
||||
++pszCmdLineA;
|
||||
if (*pszCmdLineA==' ') ++pszCmdLineA;
|
||||
}
|
||||
|
||||
if (fInstall)
|
||||
|
@ -65,3 +65,6 @@ EXPORTS
|
||||
osi_LogPrint @58
|
||||
osi_LogSaveString @59
|
||||
osi_InitPanic @60
|
||||
osi_InitTraceOption @61
|
||||
osi_LogEvent0 @62
|
||||
osi_LogEvent @63
|
||||
|
@ -330,3 +330,55 @@ void osi_LogDisable(osi_log_t *logp)
|
||||
if (logp)
|
||||
logp->enabled = 0;
|
||||
}
|
||||
|
||||
#define REG_CLIENT_PARMS_KEY "SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters"
|
||||
#define TRACE_OPTION_EVENT 1
|
||||
#define ISLOGONTRACE(v) ( ((v) & TRACE_OPTION_EVENT)==TRACE_OPTION_EVENT)
|
||||
|
||||
DWORD osi_TraceOption=0;
|
||||
|
||||
void osi_InitTraceOption()
|
||||
{
|
||||
DWORD LSPtype, LSPsize;
|
||||
HKEY NPKey;
|
||||
(void) RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_CLIENT_PARMS_KEY,
|
||||
0, KEY_QUERY_VALUE, &NPKey);
|
||||
LSPsize=sizeof(osi_TraceOption);
|
||||
RegQueryValueEx(NPKey, "TraceOption", NULL,
|
||||
&LSPtype, (LPBYTE)&osi_TraceOption, &LSPsize);
|
||||
}
|
||||
|
||||
|
||||
#define MAXBUF_ 131
|
||||
void osi_LogEvent0(char *a,char *b)
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[MAXBUF_+1];
|
||||
if (!ISLOGONTRACE(osi_TraceOption))
|
||||
return;
|
||||
h = RegisterEventSource(NULL, a);
|
||||
ptbuf[0] = b;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)ptbuf, NULL);
|
||||
DeregisterEventSource(h);
|
||||
}
|
||||
|
||||
|
||||
void osi_LogEvent(char *a,char *b,char *c,...)
|
||||
{
|
||||
HANDLE h; char *ptbuf[1],buf[MAXBUF_+1];
|
||||
va_list marker;
|
||||
if (!ISLOGONTRACE(osi_TraceOption))
|
||||
return;
|
||||
if (b)
|
||||
{
|
||||
wsprintf(buf,a,b);
|
||||
h = RegisterEventSource(NULL, buf);
|
||||
}
|
||||
else
|
||||
h = RegisterEventSource(NULL, a);
|
||||
va_start(marker,c);
|
||||
_vsnprintf(buf,MAXBUF_,c,marker);
|
||||
ptbuf[0] = buf;
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)ptbuf, NULL);\
|
||||
DeregisterEventSource(h);
|
||||
va_end(marker);
|
||||
}
|
||||
|
@ -6,8 +6,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1994 Cazamar Systems, Inc. */
|
||||
|
||||
#ifndef _OSI_LOG_H__
|
||||
#define _OSI_LOG_H__ 1
|
||||
|
||||
@ -82,6 +80,9 @@ extern void osi_LogPanic(char *filep, long line);
|
||||
extern void osi_LogPrint(osi_log_t *logp, FILE_HANDLE handle);
|
||||
|
||||
extern char *osi_LogSaveString(osi_log_t *logp, char *s);
|
||||
extern void osi_InitTraceOption();
|
||||
extern void osi_LogEvent0(char *a,char *b);
|
||||
extern void osi_LogEvent(char *a,char *b,char *c,...);
|
||||
|
||||
/* define macros */
|
||||
#define osi_Log0(l,f) osi_LogAdd((l), (f), 0, 0, 0, 0)
|
||||
@ -90,4 +91,56 @@ extern char *osi_LogSaveString(osi_log_t *logp, char *s);
|
||||
#define osi_Log3(l,f,a,b,c) osi_LogAdd((l), (f), (long) (a), (long) (b), (long) (c), 0)
|
||||
#define osi_Log4(l,f,a,b,c,d) osi_LogAdd((l), (f), (long) (a), (long) (b), (long) (c), (long) (d))
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
#define DEBUG_EVENT1(a,b,c) {HANDLE h; char *ptbuf[1],buf[132];\
|
||||
h = RegisterEventSource(NULL, a);\
|
||||
sprintf(buf, b,c);\
|
||||
ptbuf[0] = buf;\
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)ptbuf, NULL);\
|
||||
DeregisterEventSource(h);}
|
||||
#define DEBUG_EVENT0(a) {HANDLE h; char *ptbuf[1];\
|
||||
h = RegisterEventSource(NULL, a);\
|
||||
ptbuf[0] = "";\
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0,(const char **) ptbuf, NULL);\
|
||||
DeregisterEventSource(h);}
|
||||
#define DEBUG_EVENT2(a,b,c,d) {HANDLE h; char *ptbuf[1],buf[132];\
|
||||
h = RegisterEventSource(NULL, a);\
|
||||
sprintf(buf, b,c,d);\
|
||||
ptbuf[0] = buf;\
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0,(const char **) ptbuf, NULL);\
|
||||
DeregisterEventSource(h);}
|
||||
#define DEBUG_EVENT3(a,b,c,d,e) {HANDLE h; char *ptbuf[1],buf[132];\
|
||||
h = RegisterEventSource(NULL, a);\
|
||||
sprintf(buf, b,c,d,e);\
|
||||
ptbuf[0] = buf;\
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0,(const char **)ptbuf, NULL);\
|
||||
DeregisterEventSource(h);}
|
||||
#define DEBUG_EVENT4(a,b,c,d,e,f) {HANDLE h; char *ptbuf[1],buf[132];\
|
||||
h = RegisterEventSource(NULL, a);\
|
||||
sprintf(buf, b,c,d,e,f);\
|
||||
ptbuf[0] = buf;\
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0,(const char **) ptbuf, NULL);\
|
||||
DeregisterEventSource(h);}
|
||||
#define DEBUG_EVENT5(a,b,c,d,e,f,g) {HANDLE h; char *ptbuf[1],buf[132];\
|
||||
h = RegisterEventSource(NULL, a);\
|
||||
sprintf(buf, b,c,d,e,f,g);\
|
||||
ptbuf[0] = buf;\
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0,(const char **) ptbuf, NULL);\
|
||||
DeregisterEventSource(h);}
|
||||
#define DEBUG_EVENT6(a,b,c,d,e,f,g,h) {HANDLE h; char *ptbuf[1],buf[132];\
|
||||
h = RegisterEventSource(NULL, a);\
|
||||
sprintf(buf,b,c,d,e,f,g,h);\
|
||||
ptbuf[0] = buf;\
|
||||
ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0,(const char **) ptbuf, NULL);\
|
||||
DeregisterEventSource(h);}
|
||||
#else
|
||||
#define DEBUG_EVENT0(a)
|
||||
#define DEBUG_EVENT1(a,b,c)
|
||||
#define DEBUG_EVENT2(a,b,c,d)
|
||||
#define DEBUG_EVENT3(a,b,c,d,e)
|
||||
#define DEBUG_EVENT4(a,b,c,d,e,f)
|
||||
#define DEBUG_EVENT5(a,b,c,d,e,f,g)
|
||||
#define DEBUG_EVENT6(a,b,c,d,e,f,g,h)
|
||||
#endif
|
||||
|
||||
#endif /* _OSI_LOG_H__ */
|
||||
|
@ -195,7 +195,9 @@ AFS Client FME=S,<TARGETDIR>\Client\Program\afs_fme.dll
|
||||
---Comment---=
|
||||
(Default)=S,
|
||||
Class=N,2
|
||||
LogonOptions=N,2
|
||||
Name=S,TransarcAFSDaemon
|
||||
LogonScript=S,<TARGETDIR>\Client\Program\afscreds.exe -:%s -x
|
||||
ProviderPath=S,<LOGON_DLL>
|
||||
AuthentProviderPath=S,<LOGON_DLL>
|
||||
|
||||
|
@ -35,7 +35,7 @@ prep: AFS_component_version_number.txt
|
||||
$(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] Comments=$(AFSBUILDCOMMENTS)"
|
||||
$(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] ApplicationName=AFSforWindows"
|
||||
$(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] Company=Open AFS"
|
||||
$(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] Title=AFS for Windows"
|
||||
$(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] Title=Open AFS for Windows"
|
||||
$(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] OutputSpec="$(DESTDIR)\WinInstall\PackageWeb\AFSforWindows.exe"
|
||||
! ENDIF
|
||||
CreateISDirTree.bat
|
||||
@ -62,8 +62,8 @@ build:
|
||||
$(DEL) /q $(DESTDIR)\Wininstall\PackageWeb\*.*
|
||||
$(ISWEB)\Pftwwiz.exe $(AFSROOT)\src\winnt\install\InstallShield5\PackageWeb.pfw -s -a
|
||||
!ENDIF
|
||||
xcopy/s/e/y "Media\Transarc AFS\Disk Images\disk1\*.*" $(DESTDIR)\WinInstall
|
||||
xcopy /s/e/y "Media\OpenAFS\Disk Images\disk1\*.*" $(DESTDIR)\WinInstall
|
||||
copy AFS_component_version_number.txt $(DESTDIR)\WinInstall\Version.txt
|
||||
$(DEL) /q "Media\Transarc AFS\Disk Images\disk1\*.*"
|
||||
$(DEL) /q "Media\OpenAFS\Disk Images\disk1\*.*"
|
||||
|
||||
install: prep build
|
||||
|
@ -2,20 +2,20 @@
|
||||
Version=2.0
|
||||
|
||||
[Options]
|
||||
Title=AFS for Windows
|
||||
Company=Open AFS
|
||||
CompanyEMail=
|
||||
BasePath=.\Media\Transarc AFS\Disk Images
|
||||
ImportPath=.\Media\Transarc AFS
|
||||
Title=OpenAFS for Windows
|
||||
Company=OpenAFS
|
||||
CompanyEMail=openafs-info@openafs.org
|
||||
BasePath=.\Media\OpenAFS\Disk Images
|
||||
ImportPath=.\Media\OpenAFS
|
||||
UseRTF=0
|
||||
SaveFiles=0
|
||||
SubFolders=1
|
||||
ApplicationName=AFSforWindows
|
||||
Description=
|
||||
Comments=Build:09/05/01 09:41 CellServDB:CellServDB.IBM_Internal
|
||||
Comments=Build:11/07/01 10:26 CellServDB:
|
||||
Notice=
|
||||
Version=1.1.1 a
|
||||
OutputSpec=W:\DEST\WinInstall\PackageWeb\AFSforWindows.exe
|
||||
Version=1.2.2 a
|
||||
OutputSpec=Y:\DEST\WinInstall\PackageWeb\AFSforWindows.exe
|
||||
GUIDs=0
|
||||
Type=2
|
||||
Compress=1
|
||||
@ -70,198 +70,198 @@ Folder10=Disk1\License
|
||||
|
||||
[File 1]
|
||||
Name=_ISDel.exe
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=589825
|
||||
Disk=0
|
||||
|
||||
[File 2]
|
||||
Name=Setup.exe
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=589825
|
||||
Disk=0
|
||||
|
||||
[File 3]
|
||||
Name=_inst32i.ex_
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=524289
|
||||
Disk=0
|
||||
|
||||
[File 4]
|
||||
Name=os.dat
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 5]
|
||||
Name=lang.dat
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 6]
|
||||
Name=_Setup.dll
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\setupdir\0009\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\setupdir\0009\
|
||||
Flags=655377
|
||||
Disk=0
|
||||
|
||||
[File 7]
|
||||
Name=_Setup.dll
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\setupdir\0416\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\setupdir\0416\
|
||||
Flags=655377
|
||||
Disk=0
|
||||
|
||||
[File 8]
|
||||
Name=_Setup.dll
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\setupdir\0804\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\setupdir\0804\
|
||||
Flags=655377
|
||||
Disk=0
|
||||
|
||||
[File 9]
|
||||
Name=_Setup.dll
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\setupdir\0404\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\setupdir\0404\
|
||||
Flags=655377
|
||||
Disk=0
|
||||
|
||||
[File 10]
|
||||
Name=_Setup.dll
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\setupdir\0007\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\setupdir\0007\
|
||||
Flags=655377
|
||||
Disk=0
|
||||
|
||||
[File 11]
|
||||
Name=_Setup.dll
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\setupdir\0011\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\setupdir\0011\
|
||||
Flags=655377
|
||||
Disk=0
|
||||
|
||||
[File 12]
|
||||
Name=_Setup.dll
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\setupdir\0012\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\setupdir\0012\
|
||||
Flags=655377
|
||||
Disk=0
|
||||
|
||||
[File 13]
|
||||
Name=_Setup.dll
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\setupdir\000a\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\setupdir\000a\
|
||||
Flags=655377
|
||||
Disk=0
|
||||
|
||||
[File 14]
|
||||
Name=setup.ins
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 15]
|
||||
Name=_sys1.hdr
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=2097153
|
||||
Disk=0
|
||||
|
||||
[File 16]
|
||||
Name=_sys1.cab
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=2097153
|
||||
Disk=0
|
||||
|
||||
[File 17]
|
||||
Name=_user1.hdr
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=2097153
|
||||
Disk=0
|
||||
|
||||
[File 18]
|
||||
Name=_user1.cab
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=2097153
|
||||
Disk=0
|
||||
|
||||
[File 19]
|
||||
Name=DATA.TAG
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 20]
|
||||
Name=SETUP.INI
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 21]
|
||||
Name=setup.lid
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 22]
|
||||
Name=setup.bmp
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 23]
|
||||
Name=data1.hdr
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=2097153
|
||||
Disk=0
|
||||
|
||||
[File 24]
|
||||
Name=data1.cab
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=2097153
|
||||
Disk=0
|
||||
|
||||
[File 25]
|
||||
Name=layout.bin
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 26]
|
||||
Name=en_US.rtf
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\License\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\License\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 27]
|
||||
Name=ja_JP.rtf
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\License\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\License\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 28]
|
||||
Name=ko_KR.rtf
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\License\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\License\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 29]
|
||||
Name=zh_CN.rtf
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\License\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\License\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 30]
|
||||
Name=zh_TW.rtf
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\License\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\License\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 31]
|
||||
Name=pt_BR.rtf
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\License\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\License\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 32]
|
||||
Name=es_ES.rtf
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\License\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\License\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
||||
[File 33]
|
||||
Name=de_DE.rtf
|
||||
Path=.\Media\Transarc AFS\Disk Images\Disk1\License\
|
||||
Path=.\Media\OpenAFS\Disk Images\Disk1\License\
|
||||
Flags=1
|
||||
Disk=0
|
||||
|
@ -12,24 +12,22 @@ OUTDIR = $(DESTDIR)\WinInstall
|
||||
############################################################################
|
||||
|
||||
COMPONENTS = \
|
||||
INSTALL.BAT \
|
||||
afsd.pif \
|
||||
readme.RTF \
|
||||
license.txt \
|
||||
templet.reg \
|
||||
runonce.pif \
|
||||
$(DESTDIR)\bin\util_cr.exe \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\unlog.exe \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\afs_shl_ext_1033.dll \
|
||||
$(DESTDIR)\lib\afsauthent.dll \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\afsshare.exe \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\fs.exe \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\klog.exe \
|
||||
$(DESTDIR)\bin\kpasswd.exe \
|
||||
$(DESTDIR)\bin\pts.exe \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\tokens.exe
|
||||
|
||||
DLLCOMPONENTS = \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\afs_shl_ext_1033.dll \
|
||||
$(DESTDIR)\lib\afsauthent.dll \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\libosi.dll \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\libafsconf.dll \
|
||||
$(DESTDIR)\bin\pts.exe \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\tokens.exe \
|
||||
$(DESTDIR)\root.client\usr\vice\etc\afs_shl_ext.dll \
|
||||
$(DESTDIR)\lib\win95\pthread.dll \
|
||||
$(DESTDIR)\lib\afsrpc.dll
|
||||
@ -38,14 +36,17 @@ $(COMPONENTS)::
|
||||
$(DESTDIR)\bin\util_cr.exe ~ $@
|
||||
$(COPY) $@ $(DESTDIR)\WinInstall\.
|
||||
|
||||
$(DLLCOMPONENTS)::
|
||||
$(DESTDIR)\bin\util_cr.exe ~ $@
|
||||
$(COPY) $@ $(DESTDIR)\WinInstall\Dll\.
|
||||
|
||||
!IF (EXIST(ISBUILD.MAK))
|
||||
!INCLUDE ISBUILD.MAK
|
||||
!ENDIF
|
||||
|
||||
build:
|
||||
copy install.bat $(OUTDIR)\.
|
||||
|
||||
install: prep $(COMPONENTS) build
|
||||
install: prep $(COMPONENTS) $(DLLCOMPONENTS) build
|
||||
|
||||
install9x: install
|
||||
|
||||
@ -54,6 +55,9 @@ clean ::
|
||||
$(DEL) $(OUTDIR)\DiskIm~1\WebInstall\*
|
||||
|
||||
prep :
|
||||
$(COPY) "$(DESTDIR)\WinInstall\config\sock.vxd" "$(DESTDIR)\WinInstall\."
|
||||
$(COPY) "$(DESTDIR)\WinInstall\config\MMAP.vxd" "$(DESTDIR)\WinInstall\."
|
||||
$(COPY) "$(DESTDIR)\WinInstall\config\AFSD.EXE" "$(DESTDIR)\WinInstall\."
|
||||
$(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\sock.vxd"
|
||||
$(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\MMAP.vxd"
|
||||
$(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\AFSD.EXE"
|
||||
|
@ -408,7 +408,7 @@ void CWinAfsLoadApp::WSANotifyFromUI(WPARAM wp,const char *msg)
|
||||
m_wParam=wp;
|
||||
m_sMsg=msg;
|
||||
SetEvent(CMyUIThread::m_hEventThreadKilled);
|
||||
m_uNntifyMessage=0;
|
||||
m_uNotifyMessage=0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -72,6 +72,9 @@ idirs: doclink
|
||||
! IF (!EXIST($(DESTDIR)\WinInstall\Config))
|
||||
$(MKDIR) $(DESTDIR)\WinInstall\Config
|
||||
! ENDIF
|
||||
! IF (!EXIST($(DESTDIR)\WinInstall\Dll))
|
||||
$(MKDIR) $(DESTDIR)\WinInstall\Dll
|
||||
! ENDIF
|
||||
! IF (!EXIST($(DESTDIR)\root.server))
|
||||
$(MKDIR) $(DESTDIR)\root.server
|
||||
! ENDIF
|
||||
@ -114,7 +117,7 @@ $(DESTDIR)\bin\NTBUILD.bat:..\NTBUILD.bat
|
||||
$(COPY) $? $@
|
||||
util_cr + $@
|
||||
|
||||
$(DESTDIR)\bin\NTLang.bat: NTLang.bat util_cr.exe
|
||||
$(DESTDIR)\bin\NTLang.bat: NTLang.bat util_cr.exe
|
||||
$(COPY) NTLang.bat $(DESTDIR)\bin
|
||||
util_cr + $(DESTDIR)\bin\NTLang.bat
|
||||
|
||||
@ -131,7 +134,7 @@ doclink:
|
||||
- symlink make $(DESTDIR)\doc doc-pathname
|
||||
|
||||
|
||||
version: $(DESTDIR)\bin\mkvers.exe NTMakefile.version
|
||||
version: $(DESTDIR)\bin\mkvers.exe NTMakefile.version
|
||||
|
||||
NTMakefile.version: NTMakefile.version-CML NTMakefile.version-NOCML
|
||||
$(DEL) NTMakefile.version
|
||||
@ -163,7 +166,7 @@ $(DESTDIR)\bin\touch.exe:touch.exe
|
||||
|
||||
langsetup: $(DESTDIR)\bin\NTLang.bat
|
||||
|
||||
install: idirs $(INCTOOLS) $(INCCOPY) version $(INCFILES) $(DESTDIR)\NTDllmap.txt langsetup
|
||||
install: idirs $(INCTOOLS) $(INCCOPY) version $(INCFILES) $(DESTDIR)\NTDllmap.txt langsetup
|
||||
|
||||
install9x: install
|
||||
|
||||
|
@ -37,10 +37,11 @@ APPVER = 4.0
|
||||
!ENDIF
|
||||
|
||||
#define used in WinNT/2000 installation and program version display
|
||||
AFSPRODUCT_VERSION=1.1.1 a
|
||||
AFSPRODUCT_VERSION=1.2.2 a
|
||||
CELLNAME_DEFAULT=Your Cell Name
|
||||
CELLSERVDB_INSTALL=CellServDB.GrandCentral
|
||||
CELLSERVDB_WEB=http://grand.central.org/dl/cellservdb/CellServDB
|
||||
#NMAKE_DEFINES=-DDEBUG_VERBOSE
|
||||
|
||||
!IFNDEF TARGETOS
|
||||
TARGETOS = WINNT
|
||||
@ -156,7 +157,7 @@ afscdefs =\
|
||||
-DAFS_AFSDB_ENV \
|
||||
-DAFS_FREELANCE_CLIENT
|
||||
|
||||
afscdefs = $(afscdefs) $(AFSDEV_AUXCDEFINES)
|
||||
afscdefs = $(afscdefs) $(AFSDEV_AUXCDEFINES) $(NMAKE_DEFINES)
|
||||
|
||||
|
||||
# Compiler switches (except include paths and preprocessor defines)
|
||||
@ -308,7 +309,7 @@ C2OBJ = $(cc) $(cflags) $(cdebug) $(cvarsdll) $(afscflags) $(afscdefs) /c
|
||||
CPP2OBJ = $(cc) $(cflags) $(cdebug) $(cvarsdll) $(afscflags) $(afscdefs) /c
|
||||
|
||||
# Resource compiler macro
|
||||
RC = $(rc) $(rcvars) $(rcflags) $(AFSDEV_AUXRCFLAGS)
|
||||
RC = $(rc) $(rcvars) $(rcflags) $(AFSDEV_AUXRCFLAGS) /d "AFSPRODUCT_VERSION=\"$(AFSPRODUCT_VERSION)\""
|
||||
|
||||
# Lex/Yacc macros
|
||||
LEX = flex -l
|
||||
|
@ -327,7 +327,7 @@ C2OBJ = $(cc) $(cflags) $(cdebug) $(cvarsdll) $(afscflags) $(afscdefs) /c
|
||||
CPP2OBJ = $(cc) $(cflags) $(cdebug) $(cvarsdll) $(afscflags) $(afscdefs) $(afscppdefs) /c
|
||||
|
||||
# Resource compiler macro
|
||||
RC = $(rc) $(rcvars) $(rcflags) $(AFSDEV_AUXRCFLAGS)
|
||||
RC = $(rc) $(rcvars) $(rcflags) $(AFSDEV_AUXRCFLAGS) /d "AFSPRODUCT_VERSION=\"$(AFSPRODUCT_VERSION)\""
|
||||
|
||||
# Lex/Yacc macros
|
||||
LEX = flex -l
|
||||
|
@ -21,6 +21,12 @@
|
||||
#define MAXKTCREALMLEN 64 /* should be 256 */
|
||||
#define KTC_TIME_UNCERTAINTY (15*60) /* max skew bet. machines' clocks */
|
||||
|
||||
#define MAXRANDOMNAMELEN 16 /* length of random generated
|
||||
usernames used by afslog for high
|
||||
security must be < MAXKTCNAMELEN */
|
||||
#define LOGON_OPTION_INTEGRATED 1
|
||||
#define LOGON_OPTION_HIGHSECURITY 2
|
||||
|
||||
/*
|
||||
* Define ticket types. For Kerberos V4 tickets, this is overloaded as
|
||||
* the server key version number, so class numbers 0 through 255 are reserved
|
||||
@ -46,6 +52,9 @@ struct ktc_principal {
|
||||
char name[MAXKTCNAMELEN];
|
||||
char instance[MAXKTCNAMELEN];
|
||||
char cell[MAXKTCREALMLEN];
|
||||
#ifdef AFS_NT40_ENV
|
||||
char smbname[MAXRANDOMNAMELEN];
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef NEVERDATE
|
||||
|
Loading…
Reference in New Issue
Block a user