DEVEL15-windows-force-anon-vldb-20080225

LICENSE MIT

For organizations with krb5 aware file servers but transarc or old openafs
vldb servers, add force anonymous vldb lookup option

  HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
	DWORD	"ForceAnonVLDB"  (default is 0)


(cherry picked from commit dd72e06bf11fccd70cba32c4b6411a5e6ff3914c)
This commit is contained in:
Jeffrey Altman 2008-02-25 22:21:24 +00:00
parent 1b4b3256fe
commit 0007e327a8
2 changed files with 12 additions and 2 deletions

View File

@ -40,7 +40,8 @@
extern int RXAFSCB_ExecuteRequest(struct rx_call *z_call); extern int RXAFSCB_ExecuteRequest(struct rx_call *z_call);
extern int RXSTATS_ExecuteRequest(struct rx_call *z_call); extern int RXSTATS_ExecuteRequest(struct rx_call *z_call);
extern afs_int32 cryptall; extern afs_uint32 cryptall;
extern afs_uint32 cm_anonvldb;
extern int cm_enableServerLocks; extern int cm_enableServerLocks;
extern int cm_followBackupPath; extern int cm_followBackupPath;
extern int cm_deleteReadOnly; extern int cm_deleteReadOnly;
@ -943,6 +944,11 @@ int afsd_InitCM(char **reasonP)
else else
LogEvent(EVENTLOG_INFORMATION_TYPE, MSG_CRYPT_OFF); LogEvent(EVENTLOG_INFORMATION_TYPE, MSG_CRYPT_OFF);
dummyLen = sizeof(cryptall);
code = RegQueryValueEx(parmKey, "ForceAnonVLDB", NULL, NULL,
(BYTE *) &cm_anonvldb, &dummyLen);
afsi_log("CM ForceAnonVLDB is %s", cm_anonvldb ? "on" : "off");
#ifdef AFS_AFSDB_ENV #ifdef AFS_AFSDB_ENV
dummyLen = sizeof(cm_dnsEnabled); dummyLen = sizeof(cm_dnsEnabled);
code = RegQueryValueEx(parmKey, "UseDNS", NULL, NULL, code = RegQueryValueEx(parmKey, "UseDNS", NULL, NULL,

View File

@ -31,7 +31,8 @@ unsigned short HardDeadtimeout = CM_CONN_HARDDEADTIME;
#define LANMAN_WKS_PARAM_KEY "SYSTEM\\CurrentControlSet\\Services\\lanmanworkstation\\parameters" #define LANMAN_WKS_PARAM_KEY "SYSTEM\\CurrentControlSet\\Services\\lanmanworkstation\\parameters"
#define LANMAN_WKS_SESSION_TIMEOUT "SessTimeout" #define LANMAN_WKS_SESSION_TIMEOUT "SessTimeout"
afs_int32 cryptall = 0; afs_uint32 cryptall = 0;
afs_uint32 cm_anonvldb = 0;
void cm_PutConn(cm_conn_t *connp) void cm_PutConn(cm_conn_t *connp)
{ {
@ -909,6 +910,9 @@ long cm_ConnByServer(cm_server_t *serverp, cm_user_t *userp, cm_conn_t **connpp)
*connpp = NULL; *connpp = NULL;
if (cm_anonvldb && serverp->type == CM_SERVER_VLDB)
userp = cm_rootUserp;
lock_ObtainMutex(&userp->mx); lock_ObtainMutex(&userp->mx);
lock_ObtainWrite(&cm_connLock); lock_ObtainWrite(&cm_connLock);
for (tcp = serverp->connsp; tcp; tcp=tcp->nextp) { for (tcp = serverp->connsp; tcp; tcp=tcp->nextp) {