Since 1.3.65:
+ * Support for SMB/CIFS browsing has been added to the AFS Client Service
+ SMB server. It is now possible to use "NET VIEW \\AFS" to obtain a
+ listing of AFS submounts and freelance mount points. Support for
+ NETSHAREENUM, NETSHAREGETINFO, NETSERVERENUM2, NETSERVERGETINFO
+ significantly enhances the behavior of AFS volumes within the Explorer
+ Shell. For instance, "AFS" now shows up as server in the Explorer
+ with each submount or freelance mount point visible as a share.
+ The right click menu in each folder now works with full functionality
+ on a consistent basis.
+
+ * The network provider can be configured to have different behavior
+ depending on the domain that the user logs into. These settings are
+ only relevant when using integrated login. A domain refers to an
+ Active Directory (AD) domain, a trusted Kerberos (non-AD) realm or the
+ local machine (i.e. local account logins). The domain name that is
+ used for selecting the domain would be the domain that is passed into
+ the NPLogonNotify function of the network provider. (see registry.txt
+ for details)
+
* Added a new registry value [HKCU\SOFTWARE\OpenAFS\Client]
"Authentication Cell" which may be used to specify a default
authentication cell for afscreds.exe which is different from
New registry entries added to register the dll for Winlogon events.
The logoff event will now force a call to ktc_ForgetAllTokens()
- using the context of the user being logged off.
-
- Need to double check that this code does not prevent profile data
- from being written back to an afs volume
+ using the context of the user being logged off as long as the
+ user's profile is not loaded from within AFS. If the profile
+ was loaded from AFS we can't release the tokens since the Logoff
+ event is triggered prior to the profile being written back to
+ the its source location.
* Windows XP SP2 Internet Connection Firewall interoperability
has been added.
addition, the appropriate Back Connection entries are added to the registry
to allow SMB authentication to be performed across the loopback connection.
-21.
+21. As of 1.3.66, the OpenAFS Client Service supports the CIFS Remote
+Admin Protocol which provides browsing of server and share information.
+This significantly enhances the functionality of AFS volumes within the
+Explorer Shell.
+
+22. OpenAFS will now automatically forget a user's tokens upon Logoff
+unless the user's profile was loaded from an AFS volume. In this situation
+there is no mechanism to determine when the profile has been successfully
+written back to the network. It is therefore unsafe to release the user's
+tokens.
------------------------------------------------------------------------
Value : AuthentProviderPath
Type : REG_SZ
-NSIS : <install path>\afslogon.dll
+NSIS : %WINDIR%\SYSTEM32\afslogon.dll
Specifies the install location of the authentication provider dll.
Value : ProviderPath
Type : REG_SZ
-NSIS : <install path>\afslogon.dll
+NSIS : %WINDIR%\SYSTEM32\afslogon.dll
Specifies the DLL to use for the network provider
-2.1 Domain specific configuration keys
---------------------------------------
+
+Regkey:
+[HKLM\SOFTWARE\OpenAFS\Client]
+
+Value : CellServDBDir
+Type : REG_SZ
+Default : <not defined>
+
+ Specifies the directory containing the CellServDB file.
+ When this value is not specified, the AFS Client install
+ directory is used.
+
+
+
+2.1 Domain specific configuration keys for the Network Provider
+---------------------------------------------------------------
The network provider can be configured to have different behavior
depending on the domain that the user logs into. These settings are
#include <userenv.h>
#include <Winwlx.h>
-#include "lanahelper.h"
+#include <afs/vice.h>
+#include <afs/fs_utils.h>
+
+BOOL IsPathInAfs(const CHAR *strPath)
+{
+ char space[2048];
+ struct ViceIoctl blob;
+ int code;
+
+ blob.in_size = 0;
+ blob.out_size = 2048;
+ blob.out = space;
+
+ code = pioctl((LPTSTR)((LPCTSTR)strPath), VIOC_FILE_CELL_NAME, &blob, 1);
+ if (code)
+ return FALSE;
+ return TRUE;
+}
VOID AFS_Logoff_Event( PWLX_NOTIFICATION_INFO pInfo )
{
DWORD code;
TCHAR profileDir[256] = TEXT("");
- TCHAR uncprefix[64] = TEXT("\\\\");
- DWORD len;
-
- len = 256;
- lana_GetNetbiosName(&uncprefix[2], LANA_NETBIOS_NAME_FULL);
+ DWORD len = 256;
if ( GetUserProfileDirectory(pInfo->hToken, profileDir, &len) ) {
- if (_tcsnicmp(uncprefix, profileDir, _tcslen(uncprefix))) {
+ if (!IsPathInAfs(profileDir)) {
if (code = ktc_ForgetAllTokens())
DebugEvent(NULL,"AFS AfsLogon - AFS_Logoff_Event - ForgetAllTokens failed [%lX]",code);
else
}
}
}
-
-
-
-
-
char AFSConfigKeyName[] =
"SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters";
+char AFSLocalMachineKeyName[] = "SOFTWARE\\OpenAFS\\Client";
/* TODO: these should be pulled in from dirpath.h */
#if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
cm_configProc_t *procp, void *rockp)
{
char wdir[257];
- int tlen;
FILE *tfilep = NULL, *bestp, *tempp;
char *tp;
char lineBuffer[257];
char *afsconf_path;
#endif
-#if !defined(DJGPP)
- strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
-
- /* add trailing backslash, if required */
- tlen = strlen(wdir);
- if (wdir[tlen-1] != '\\') strcat(wdir, "\\");
-#else
- strcpy(wdir, cm_confDir);
- strcat(wdir,"/");
-#endif /* !DJGPP */
-
- strcat(wdir, AFS_CELLSERVDB);
+ cm_GetCellServDB(wdir);
tfilep = fopen(wdir, "r");
#if defined(DJGPP) || defined(AFS_WIN95_ENV)
}
#if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
+/* look up the CellServDBDir's name in the Registry
+ * or use the Client Dirpath value to produce a CellServDB
+ * filename
+ */
+long cm_GetCellServDB(char *cellNamep)
+{
+#if !defined(DJGPP)
+ DWORD code, dummyLen;
+ HKEY parmKey;
+ int tlen;
+
+ code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSLocalMachineKeyName,
+ 0, KEY_QUERY_VALUE, &parmKey);
+ if (code != ERROR_SUCCESS)
+ goto dirpath;
+
+ dummyLen = 256;
+ code = RegQueryValueEx(parmKey, "CellServDBDir", NULL, NULL,
+ cellNamep, &dummyLen);
+ RegCloseKey (parmKey);
+
+ dirpath:
+ if (code != ERROR_SUCCESS || cellNamep[0] == 0)
+ strcpy(cellNamep, AFSDIR_CLIENT_ETC_DIRPATH);
+
+ /* add trailing backslash, if required */
+ tlen = strlen(cellNamep);
+ if (cellNamep[tlen-1] != '\\')
+ strcat(cellNamep, "\\");
+#else
+ strcpy(cellNamep, cm_confDir);
+ strcat(cellNamep,"/");
+#endif /* !DJGPP */
+
+ strcat(cellNamep, AFS_CELLSERVDB);
+ return 0;
+}
+
/* look up the root cell's name in the Registry */
long cm_GetRootCellName(char *cellNamep)
{
extern long cm_CloseCellFile(cm_configFile_t *filep);
+extern long cm_GetCellServDB(char *cellNamep);
+
#endif /* __CM_CONFIG_INTERFACES_ONLY__ */
#endif /* __CONFIG_H_ENV_ */
for(i=0; i < nRegShares && cshare < nSharesRet; i++) {
len = sizeof(thisShare);
rv = RegEnumValue(hkSubmount, i, thisShare, &len, NULL, NULL, NULL, NULL);
- if(rv == ERROR_SUCCESS && strlen(thisShare)) {
+ if(rv == ERROR_SUCCESS && strlen(thisShare) && (!allSubmount || stricmp(thisShare,"all"))) {
strncpy(shares[cshare].shi1_netname, thisShare, sizeof(shares->shi1_netname)-1);
shares[cshare].shi1_netname[sizeof(shares->shi1_netname)-1] = 0; /* unfortunate truncation */
shares[cshare].shi1_remark = cstrp - outp->datap;
/* AFSREG_CLT_SVC_PARAM_KEY values */
#define AFSREG_CLT_SVC_PARAM_CELL_VALUE "Cell"
-
-
+#define AFSREG_CLT_OPENAFS_KEY "HKEY_LOCAL_MACHINE\\Software\\OpenAFS\\Client"
+#define AFSREG_CLT_OPENAFS_CELLSERVDB_DIR_VALUE "CellServDBDir"
/* Extended (alternative) versions of registry access functions */
bufPP);
}
+/*
+ * afssw_GetClientCellServDBDir() -- Get directory in which AFS client CellServDB
+ * file is installed. Sets *bufPP to point to allocated buffer containing string.
+ *
+ * RETURN CODES: 0 success, -1 failed (errno set)
+ */
+int
+afssw_GetClientCellServDBDir(char **bufPP) /* [out] data buffer */
+{
+ return StringDataRead(AFSREG_CLT_OPENAFS_KEY,
+ AFSREG_CLT_OPENAFS_CELLSERVDB_DIR_VALUE,
+ bufPP);
+}
+
/*
* afssw_GetClientCellName() -- Get name of cell in which AFS client is
afssw_GetServerInstallDir(char **bufPP);
extern int
-afssw_GetClientInstallDir(char **bufPP);
+afssw_GetClientCellServDBDir(char **bufPP);
+
+extern int
+afssw_GetClientCellDir(char **bufPP);
extern int
afssw_GetClientCellName(char **bufPP);
#include <sys/socket.h>
#endif
+char AFSLocalMachineKeyName[] = "SOFTWARE\\OpenAFS\\Client";
/*
* PROTOTYPES _________________________________________________________________
#ifdef AFS_NT40_ENV
/* Find the appropriate CellServDB */
char * clientdir = 0;
- afssw_GetClientInstallDir(&clientdir);
- if (clientdir) {
- strncpy(pszFilename, clientdir, MAX_CSDB_PATH);
- pszFilename[MAX_CSDB_PATH - 1] = '\0';
- }
+ DWORD code, dummyLen;
+ HKEY parmKey;
+ int tlen;
+
+ code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSLocalMachineKeyName,
+ 0, KEY_QUERY_VALUE, &parmKey);
+ if (code != ERROR_SUCCESS)
+ goto dirpath;
+
+ dummyLen = MAX_CSDB_PATH;
+ code = RegQueryValueEx(parmKey, "CellServDBDir", NULL, NULL,
+ pszFilename, &dummyLen);
+ RegCloseKey (parmKey);
+
+ dirpath:
+ if (code != ERROR_SUCCESS || pszFilename[0] == 0) {
+ afssw_GetClientInstallDir(&clientdir);
+ if (clientdir) {
+ strncpy(pszFilename, clientdir, MAX_CSDB_PATH);
+ pszFilename[MAX_CSDB_PATH - 1] = '\0';
+ }
+ }
if (pszFilename[ strlen(pszFilename)-1 ] != '\\')
strcat (pszFilename, "\\");
#ifdef AFS_NT40_ENV
/* NT client CellServDB has different file name than NT server or Unix */
if (IsClientConfigDirectory(adir->name)) {
- strcompose(tbuffer, 256, adir->name, "/",
- AFSDIR_CELLSERVDB_FILE_NTCLIENT, NULL);
+ if ( !afssw_GetClientCellServDBDir(tbuffer) ) {
+ strcompose(tbuffer, sizeof(tbuffer), adir->name, "/",
+ AFSDIR_CELLSERVDB_FILE_NTCLIENT, NULL);
+ } else {
+ int len = strlen(tbuffer);
+ if ( tbuffer[len-1] != '\\' && tbuffer[len-1] != '/' ) {
+ strncat(tbuffer, "\\", sizeof(tbuffer));
+ }
+ strncat(tbuffer, AFSDIR_CELLSERVDB_FILE_NTCLIENT, sizeof(tbuffer));
+ tbuffer[sizeof(tbuffer)-1] = '\0';
+ }
} else {
strcompose(tbuffer, 256, adir->name, "/", AFSDIR_CELLSERVDB_FILE,
NULL);
/* NT client CellServDB has different file name than NT server or Unix */
if (IsClientConfigDirectory(adir->name)) {
- strcompose(tbuffer, 256, adir->name, "/",
- AFSDIR_CELLSERVDB_FILE_NTCLIENT, NULL);
+ if ( !afssw_GetClientCellServDBDir(tbuffer) ) {
+ strcompose(tbuffer, sizeof(tbuffer), adir->name, "/",
+ AFSDIR_CELLSERVDB_FILE_NTCLIENT, NULL);
+ } else {
+ int len = strlen(tbuffer);
+ if ( tbuffer[len-1] != '\\' && tbuffer[len-1] != '/' ) {
+ strncat(tbuffer, "\\", sizeof(tbuffer));
+ }
+ strncat(tbuffer, AFSDIR_CELLSERVDB_FILE_NTCLIENT, sizeof(tbuffer));
+ tbuffer[sizeof(tbuffer)-1] = '\0';
+ }
} else {
strcompose(tbuffer, 256, adir->name, "/", AFSDIR_CELLSERVDB_FILE,
NULL);
*/
if (IsClientConfigDirectory(adir->name)) {
/* NT client config dir */
- strcompose(tbuffer, 256, adir->name, "/",
- AFSDIR_CELLSERVDB_FILE_NTCLIENT, NULL);
+ if ( !afssw_GetClientCellServDBDir(tbuffer) ) {
+ strcompose(tbuffer, sizeof(tbuffer), adir->name, "/",
+ AFSDIR_CELLSERVDB_FILE_NTCLIENT, NULL);
+ } else {
+ int len = strlen(tbuffer);
+ if ( tbuffer[len-1] != '\\' && tbuffer[len-1] != '/' ) {
+ strncat(tbuffer, "\\", sizeof(tbuffer));
+ }
+ strncat(tbuffer, AFSDIR_CELLSERVDB_FILE_NTCLIENT, sizeof(tbuffer));
+ tbuffer[sizeof(tbuffer)-1] = '\0';
+ }
} else {
/* NT server config dir */
strcompose(tbuffer, 256, adir->name, "/", AFSDIR_CELLSERVDB_FILE,