]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
winnt-win2000-win98-afs-client-updates-20010623
authorJeff Riegel <riegel@almaden.ibm.com>
Sat, 23 Jun 2001 18:29:56 +0000 (18:29 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sat, 23 Jun 2001 18:29:56 +0000 (18:29 +0000)
updates for nt/2000 and 95/98 afs clients

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

binary file  updates

36 files changed:
src/NTMake9x
src/WINNT/afsd/NTMakefile
src/WINNT/afsd/afsd_init.c
src/WINNT/afsd/afsd_init95.c
src/WINNT/afsd/afsd_service.c
src/WINNT/afsd/cm_ioctl.c
src/WINNT/afsd/cm_user.c
src/WINNT/afsd/netbios95.h
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb.h
src/WINNT/afsd/smb3.c
src/WINNT/afsd/smb_ioctl.c
src/WINNT/install/InstallShield5/CreateISDirTree.bat
src/WINNT/install/InstallShield5/Default.rge
src/WINNT/install/InstallShield5/GenFileGroups.bat
src/WINNT/install/InstallShield5/NTMakefile
src/WINNT/install/InstallShield5/afsdcell.ini
src/WINNT/install/InstallShield5/lang/en_US/value.shl
src/WINNT/install/InstallShield5/setup.bmp
src/WINNT/install/InstallShield5/setup.rul
src/WINNT/install/Win9x/NTMakeFile
src/WINNT/license/lang/en_US.ide
src/WINNT/pthread/NTMakefile
src/WINNT/win9xpanel/NTMakefile
src/config/Makefile.i386_djgpp
src/config/NTMakefile
src/config/NTMakefile.i386_nt40
src/config/NTMakefile.i386_win95
src/config/util_cr.c
src/kauth/krb_udp.c
src/lwp/process.s
src/rmbat.bat
src/rmbat.rsp
src/rx/Makefile
src/sys/pioctl_nt.c
src/tbutc/NTMakefile

index 0676d633790d83e1701dfa29019080b1e35388f7..8b84b89865e2165c41c31981fbfd33d4010c9953 100644 (file)
@@ -23,7 +23,7 @@ NTMAKELANG = nmake /nologo /f ntmakefile en_install
 NTMAKE_HEADERS = nmake /nologo /f ntmakefile install_headers
 NTMAKE_LIBUTILS = nmake /nologo /f ntmakefile install_libutils
 MKDIR = mkdir
-OBJ = src
+#OBJ = src
 
 # Standard install directory.
 !IFDEF AFSDEV_DESTDIR
index 96e05b98ebc4826e3e53370b87a76dc7a8de5c10..e8e33daaa360e19b1d173ad62eac083b2631a1d1 100644 (file)
@@ -30,6 +30,7 @@ INCFILES =\
        $(INCFILEDIR)\fs_utils.h \
        $(INCFILEDIR)\krb.h \
        $(INCFILEDIR)\krb_prot.h \
+       $(INCFILEDIR)\cm_dir.h \
        $(INCFILEDIR)\smb.h \
        $(INCFILEDIR)\smb3.h \
        $(INCFILEDIR)\smb_iocons.h \
index f7c7feca5281058bf26f72c65dfeb606ddd98ad5..48cecb4afee62df8d93ded48d2f12e5c1f62ba51 100644 (file)
@@ -210,8 +210,8 @@ int afsd_InitCM(char **reasonP)
        if (code == ERROR_SUCCESS)
                afsi_log("LAN adapter number %d", LANadapter);
        else {
-               LANadapter = 0;
-               afsi_log("Default LAN adapter number 0");
+               LANadapter = -1;
+               afsi_log("Default LAN adapter number");
        }
 
        dummyLen = sizeof(cacheSize);
index 777b4c94a225693b4e00ac523d70547882b7c102..602255fa6e497cb3d89fa07cc23171da7e354c69 100644 (file)
@@ -362,8 +362,8 @@ int afsd_InitCM(char **reasonP, struct cmd_syndesc *as, char *arock)
         }
         else
         {
-          LANadapter = 0;
-          afsi_log("Default LAN adapter number 0");
+          LANadapter = -1;
+          afsi_log("Default LAN adapter number");
         }
         
         if (as->parms[1].items) {
index b8f9b5de9614e714173160eba190986301f1c8f6..3df9c7f51e71c31a6eaad2d20ac3227d2ad7985e 100644 (file)
 #include <winsock2.h>
 
 #include <osi.h>
+\r
+#ifdef DEBUG\r
+//#define NOTSERVICE\r
+#endif\r
 
 extern void afsi_log(char *pattern, ...);
 
@@ -186,6 +190,7 @@ void afsd_Main()
 
        WaitToTerminate = CreateEvent(NULL, TRUE, FALSE, NULL);
 
+#ifndef NOTSERVICE\r
        StatusHandle = RegisterServiceCtrlHandler(AFS_DAEMON_SERVICE_NAME,
                        (LPHANDLER_FUNCTION) afsd_ServiceControlHandler);
 
@@ -197,6 +202,7 @@ void afsd_Main()
        ServiceStatus.dwWaitHint = 15000;
        ServiceStatus.dwControlsAccepted = 0;
        SetServiceStatus(StatusHandle, &ServiceStatus);
+#endif
 {       
         HANDLE h; char *ptbuf[1];
        h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME);
@@ -223,12 +229,14 @@ void afsd_Main()
                if (code != 0)
                        osi_panic(reason, __FILE__, __LINE__);
 
+#ifndef NOTSERVICE
                ServiceStatus.dwCurrentState = SERVICE_RUNNING;
                ServiceStatus.dwWin32ExitCode = NO_ERROR;
                ServiceStatus.dwCheckPoint = 0;
                ServiceStatus.dwWaitHint = 0;
                ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
                SetServiceStatus(StatusHandle, &ServiceStatus);
+#endif
        {
                HANDLE h; char *ptbuf[1];
                h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME);
@@ -261,6 +269,14 @@ void afsd_Main()
        SetServiceStatus(StatusHandle, &ServiceStatus);
 }
 
+#ifdef NOTSERVICE
+void main()
+{
+       afsd_Main();
+       Sleep(1000);
+       return ;
+}
+#else
 void _CRTAPI1 main()
 {
        LONG status = ERROR_SUCCESS;
@@ -272,3 +288,4 @@ void _CRTAPI1 main()
        if (!StartServiceCtrlDispatcher(dispatchTable))
                status = GetLastError();
 }
+#endif
index 2de6df112b5c41c7c473284e75fe295ef168b51b..58d8873b78685df8f0d06d0aa3f35aa2f683d7b9 100644 (file)
@@ -1393,6 +1393,11 @@ long cm_IoctlSetToken(struct smb_ioctl *ioctlp, struct cm_user *userp)
        } else
                cellp = cm_rootCellp;
 
+       if (flags & PIOCTL_LOGON) {
+          userp = smb_FindCMUserByName(/*ioctlp->fidp->vcp,*/ uname,
+                                                              ioctlp->fidp->vcp->rname);
+       }
+       
        /* store the token */
        lock_ObtainMutex(&userp->mx);
        ucellp = cm_GetUCell(userp, cellp);
index 51803c36ee7d35a0b12d596486e92c1da0bcd337..471f47c67aa20a39cc5d3c574b4b973ba71aa081 100644 (file)
@@ -145,7 +145,7 @@ void cm_CheckTokenCache(long now)
         extern smb_vc_t *smb_allVCsp; /* global vcp list */
        smb_vc_t   *vcp;
        smb_user_t *usersp;
-       cm_user_t  *userp;
+       cm_user_t  *userp = NULL;
        cm_ucell_t *ucellp;
        BOOL bExpired=FALSE;
   
@@ -154,9 +154,12 @@ void cm_CheckTokenCache(long now)
         */
        lock_ObtainWrite(&smb_rctLock);
        for(vcp=smb_allVCsp; vcp; vcp=vcp->nextp) {
-               for(usersp=vcp->usersp; usersp; usersp=usersp->nextp) {
-                       userp=usersp->userp;
-                       osi_assert(userp);
+               for(usersp=vcp->usersp; usersp; usersp=usersp->nextp) {\r
+                               if (usersp->unp) {
+                          if ((userp=usersp->unp->userp)==0)\r
+                                          continue;\r
+                               } else\r
+                                       continue;\r
                        lock_ObtainMutex(&userp->mx);
                        for(ucellp=userp->cellInfop; ucellp; ucellp=ucellp->nextp) {
                          if(ucellp->flags & CM_UCELLFLAG_RXKAD) {
index c70c8556f07ab60a88528d1f5b085019d1ad0605..5fd7e66d48d719557134829b8396f54543df2dc7 100644 (file)
@@ -44,6 +44,13 @@ typedef struct _NCB {
     EVENT_HANDLE ncb_event;
 } NCB, *PNCB;
 
+/* this struct is returned by NCBENUM command in Win32 but is not available
+   in DJGPP. */
+typedef struct {
+  int length;
+  int lana[8];
+} LANA_ENUM;
+
 
 #define NCBCALL 0x10
 #define NCBLISTEN 0x11
index 171f936e4b7f4977403742488d6e1e2a36072310..5a03d90e2ac847a564f929eedb9254b6ec807ffc 100644 (file)
@@ -7,6 +7,8 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+//#define NOSERVICE 1
+
 #include <afs/param.h>
 #include <afs/stds.h>
 
@@ -61,8 +63,9 @@ osi_hyper_t hones = {0xFFFFFFFF, -1};
 osi_log_t *smb_logp;
 osi_rwlock_t smb_globalLock;
 osi_rwlock_t smb_rctLock;
-
-unsigned char smb_LANadapter;
+osi_rwlock_t smb_ListenerLock;
+char smb_LANadapter;
 unsigned char smb_sharename[NCBNAMSZ+1] = {0};
 
 /* for debugging */
@@ -88,7 +91,9 @@ struct smb_packet *bufs[NCBmax];
 #define Sessionmax 100
 EVENT_HANDLE SessionEvents[Sessionmax];
 unsigned short LSNs[Sessionmax];
+int lanas[Sessionmax];
 BOOL dead_sessions[Sessionmax];
+LANA_ENUM lana_list;
 
 /* for raw I/O */
 osi_mutex_t smb_RawBufLock;
@@ -142,6 +147,8 @@ char *smb_localNamep;
 
 smb_vc_t *smb_allVCsp;
 
+smb_username_t *usernamesp = NULL;
+
 smb_waitingLock_t *smb_allWaitingLocks;
 
 /* forward decl */
@@ -170,7 +177,145 @@ extern char cm_confDir[];
 #define EXPIREDATE 834000000           /* Wed Jun 5 1996 */
 
 
+char * myCrt_Dispatch(int i)
+{
+       switch (i)
+       {
+       default:
+               return "unknown SMB op";
+       case 0x00:
+               return "(00)ReceiveCoreMakeDir";
+       case 0x01:
+               return "(01)ReceiveCoreRemoveDir";
+       case 0x02:
+               return "(02)ReceiveCoreOpen";
+       case 0x03:
+               return "(03)ReceiveCoreCreate";
+       case 0x04:
+               return "(04)ReceiveCoreClose";
+       case 0x05:
+               return "(05)ReceiveCoreFlush";
+       case 0x06:
+               return "(06)ReceiveCoreUnlink";
+       case 0x07:
+               return "(07)ReceiveCoreRename";
+       case 0x08:
+               return "(08)ReceiveCoreGetFileAttributes";
+       case 0x09:
+               return "(09)ReceiveCoreSetFileAttributes";
+       case 0x0a:
+               return "(0a)ReceiveCoreRead";
+       case 0x0b:
+               return "(0b)ReceiveCoreWrite";
+       case 0x0c:
+               return "(0c)ReceiveCoreLockRecord";
+       case 0x0d:
+               return "(0d)ReceiveCoreUnlockRecord";
+       case 0x0e:
+               return "(0e)SendCoreBadOp";
+       case 0x0f:
+               return "(0f)ReceiveCoreCreate";
+       case 0x10:
+               return "(10)ReceiveCoreCheckPath";
+       case 0x11:
+               return "(11)SendCoreBadOp";
+       case 0x12:
+               return "(12)ReceiveCoreSeek";
+       case 0x1a:
+               return "(1a)ReceiveCoreReadRaw";
+       case 0x1d:
+               return "(1d)ReceiveCoreWriteRawDummy";
+       case 0x22:
+               return "(22)ReceiveV3SetAttributes";
+       case 0x23:
+               return "(23)ReceiveV3GetAttributes";
+       case 0x24:
+               return "(24)ReceiveV3LockingX";
+       case 0x29:
+               return "(29)SendCoreBadOp";
+       case 0x2b:
+               return "(2b)ReceiveCoreEcho";
+       case 0x2d:
+               return "(2d)ReceiveV3OpenX";
+       case 0x2e:
+               return "(2e)ReceiveV3ReadX";
+       case 0x32:
+               return "(32)ReceiveV3Tran2A";
+       case 0x33:
+               return "(33)ReceiveV3Tran2A";
+       case 0x34:
+               return "(34)ReceiveV3FindClose";
+       case 0x35:
+               return "(35)ReceiveV3FindNotifyClose";
+       case 0x70:
+               return "(70)ReceiveCoreTreeConnect";
+       case 0x71:
+               return "(71)ReceiveCoreTreeDisconnect";
+       case 0x72:
+               return "(72)ReceiveNegotiate";
+       case 0x73:
+               return "(73)ReceiveV3SessionSetupX";
+       case 0x74:
+               return "(74)ReceiveV3UserLogoffX";
+       case 0x75:
+               return "(75)ReceiveV3TreeConnectX";
+       case 0x80:
+               return "(80)ReceiveCoreGetDiskAttributes";
+       case 0x81:
+               return "(81)ReceiveCoreSearchDir";
+       case 0xA0:
+               return "(A0)ReceiveNTTransact";
+       case 0xA2:
+               return "(A2)ReceiveNTCreateX";
+       case 0xA4:
+               return "(A4)ReceiveNTCancel";
+       case 0xc0:
+               return "(c0)SendCoreBadOp";
+       case 0xc1:
+               return "(c1)SendCoreBadOp";
+       case 0xc2:
+               return "(c2)SendCoreBadOp";
+       case 0xc3:
+               return "(c3)SendCoreBadOp";
+       }
+}
 
+char * myCrt_2Dispatch(int i)
+{
+       switch (i)
+       {
+       default:
+               return "unknown SMB op-2";
+       case 0:
+               return "S(00)CreateFile";
+       case 1:
+               return "S(01)FindFirst";
+       case 2:
+               return "S(02)FindNext"; /* FindNext */
+       case 3:
+               return "S(03)QueryFileSystem_ReceiveTran2QFSInfo";
+       case 4:
+               return "S(04)??";
+       case 5:
+               return "S(05)QueryFileInfo_ReceiveTran2QPathInfo";
+       case 6:
+               return "S(06)SetFileInfo_ReceiveTran2SetPathInfo";
+       case 7:
+               return "S(07)SetInfoHandle_ReceiveTran2QFileInfo";
+       case 8:
+               return "S(08)??_ReceiveTran2SetFileInfo";
+       case 9:
+               return "S(09)??_ReceiveTran2FSCTL";
+       case 10:
+               return "S(0a)_ReceiveTran2IOCTL";
+       case 11:
+               return "S(0b)_ReceiveTran2FindNotifyFirst";
+       case 12:
+               return "S(0c)_ReceiveTran2FindNotifyNext";
+       case 13:
+               return "S(0d)CreateDirectory_ReceiveTran2MKDir";
+       }
+}
 
 /* scache must be locked */
 unsigned int smb_Attributes(cm_scache_t *scp)
@@ -521,13 +666,13 @@ void smb_UnixTimeFromDosUTime(long *unixTimep, long dosTime)
 #endif /* !DJGPP */
 }
 
-smb_vc_t *smb_FindVC(unsigned short lsn, int flags)
+smb_vc_t *smb_FindVC(unsigned short lsn, int flags, int lana)
 {
        smb_vc_t *vcp;
 
        lock_ObtainWrite(&smb_rctLock);
        for(vcp = smb_allVCsp; vcp; vcp=vcp->nextp) {
-               if (lsn == vcp->lsn) {
+               if (lsn == vcp->lsn && lana == vcp->lana) {
                        vcp->refCount++;
                        break;
                }
@@ -538,10 +683,12 @@ smb_vc_t *smb_FindVC(unsigned short lsn, int flags)
                 vcp->refCount = 1;
                 vcp->tidCounter = 1;
                 vcp->fidCounter = 1;
+                vcp->uidCounter = 1;  /* UID 0 is reserved for blank user */
                 vcp->nextp = smb_allVCsp;
                 smb_allVCsp = vcp;
                 lock_InitializeMutex(&vcp->mx, "vc_t mutex");
                 vcp->lsn = lsn;
+                vcp->lana = lana;
         }
         lock_ReleaseWrite(&smb_rctLock);
         return vcp;
@@ -625,13 +772,23 @@ void smb_ReleaseTID(smb_tid_t *tidp)
 
 smb_user_t *smb_FindUID(smb_vc_t *vcp, unsigned short uid, int flags)
 {
-       smb_user_t *uidp;
+       smb_user_t *uidp = NULL;
 
        lock_ObtainWrite(&smb_rctLock);
        for(uidp = vcp->usersp; uidp; uidp = uidp->nextp) {
                if (uid == uidp->userID) {
                        uidp->refCount++;
-                       break;
+#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
+               break;
                }
         }
         if (!uidp && (flags & SMB_FLAG_CREATE)) {
@@ -643,11 +800,73 @@ 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
         }
         lock_ReleaseWrite(&smb_rctLock);
         return uidp;
 }
 
+smb_username_t *smb_FindUserByName(char *usern, char *machine, int flags)
+{
+       smb_username_t *unp= NULL;
+
+       lock_ObtainWrite(&smb_rctLock);
+       for(unp = usernamesp; unp; unp = unp->nextp) {
+               if (stricmp(unp->name, usern) == 0 &&
+                    stricmp(unp->machine, machine) == 0) {
+                       unp->refCount++;
+                       break;
+               }
+       }
+        if (!unp && (flags & SMB_FLAG_CREATE)) {
+          unp = malloc(sizeof(*unp));
+          memset(unp, 0, sizeof(*unp));
+          unp->nextp = usernamesp;
+          unp->name = strdup(usern);
+          unp->machine = strdup(machine);
+          usernamesp = unp;
+          lock_InitializeMutex(&unp->mx, "username_t mutex");
+        }
+       lock_ReleaseWrite(&smb_rctLock);
+       return unp;
+}
+
+smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, char *usern)
+{
+       smb_user_t *uidp= NULL;
+
+       lock_ObtainWrite(&smb_rctLock);
+       for(uidp = vcp->usersp; uidp; uidp = uidp->nextp) {
+          if (!uidp->unp) 
+            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
+            break;
+          } else
+            continue;
+       }
+       lock_ReleaseWrite(&smb_rctLock);
+       return uidp;
+}
 void smb_ReleaseUID(smb_user_t *uidp)
 {
        smb_user_t *up;
@@ -665,7 +884,8 @@ void smb_ReleaseUID(smb_user_t *uidp)
                 osi_assert(up != NULL);
                 *lupp = up->nextp;
                 lock_FinalizeMutex(&uidp->mx);
-                userp = uidp->userp;   /* remember to drop ref later */
+                if (uidp->unp)
+                  userp = uidp->unp->userp;    /* remember to drop ref later */
         }
        lock_ReleaseWrite(&smb_rctLock);
         if (userp) {
@@ -686,10 +906,11 @@ cm_user_t *smb_GetUser(smb_vc_t *vcp, smb_packet_t *inp)
         
        smbp = (smb_t *) inp;
         uidp = smb_FindUID(vcp, smbp->uid, 0);
-        if (!uidp) return NULL;
+        if ((!uidp) ||  (!uidp->unp))
+                return NULL;
         
        lock_ObtainMutex(&uidp->mx);
-        up = uidp->userp;
+        up = uidp->unp->userp;
         cm_HoldUser(up);
        lock_ReleaseMutex(&uidp->mx);
 
@@ -957,13 +1178,19 @@ int smb_FindShare(smb_vc_t *vcp, smb_packet_t *inp, char *shareName,
        {
                if (var = smb_stristr(p, VNUserName)) {
                        uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
-                       smb_subst(p, var, sizeof(VNUserName),
-                                 uidp->name);
+                       if (uidp && uidp->unp)
+                         smb_subst(p, var, sizeof(VNUserName),
+                                      uidp->unp->name);
+                       else
+                         smb_subst(p, var, sizeof(VNUserName),
+                                      " ");
                        smb_ReleaseUID(uidp);
                }
                else if (var = smb_stristr(p, VNLCUserName)) {
                        uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
-                       strcpy(temp, uidp->name);
+                       if (uidp && uidp->unp)
+                         strcpy(temp, uidp->unp->name);
+                       else strcpy(temp, " ");
                        _strlwr(temp);
                        smb_subst(p, var, sizeof(VNLCUserName), temp);
                        smb_ReleaseUID(uidp);
@@ -1576,7 +1803,7 @@ void smb_SendPacket(smb_vc_t *vcp, smb_packet_t *inp)
         
         ncbp->ncb_length = extra;      /* bytes to send */
         ncbp->ncb_lsn = (unsigned char) vcp->lsn;      /* vc to use */
-       ncbp->ncb_lana_num = smb_LANadapter;
+       ncbp->ncb_lana_num = vcp->lana;
         ncbp->ncb_command = NCBSEND;   /* op means send data */
 #ifndef DJGPP
         ncbp->ncb_buffer = (char *) inp;/* packet */
@@ -1974,7 +2201,7 @@ send1:
 
        ncbp->ncb_length = (unsigned short) finalCount;
        ncbp->ncb_lsn = (unsigned char) vcp->lsn;
-       ncbp->ncb_lana_num = smb_LANadapter;
+       ncbp->ncb_lana_num = vcp->lana;
        ncbp->ncb_command = NCBSEND;
        ncbp->ncb_buffer = rawBuf;
 
@@ -5163,8 +5390,29 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
                                /* Raw Write */
                                code = smb_ReceiveCoreWriteRaw (vcp, inp, outp,
                                                                rwcp);
-                       else
-                               code = (*(dp->procp)) (vcp, inp, outp);
+                       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
+                                       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
+                               }
 
                        if (oldGen != sessionGen) {
 #ifndef DJGPP
@@ -5180,8 +5428,8 @@ void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
                                1005, NULL, 1, ncbp->ncb_length, ptbuf, smbp);
                                DeregisterEventSource(h);
 #else /* DJGPP */
-                              osi_Log1(afsd_logp, "Pkt straddled session startup, "
-                                       "ncb length %d", ncbp->ncb_length);
+                               osi_Log1(afsd_logp, "Pkt straddled session startup, "
+                                       "ncb length %d", ncbp->ncb_length);
 #endif /* !DJGPP */
                        }
                 }
@@ -5402,7 +5650,7 @@ NCBretry:
 #endif /* DJGPP */
                ncbp->ncb_lsn = (unsigned char) LSNs[idx_session];
                ncbp->ncb_command = NCBRECV | ASYNCH;
-               ncbp->ncb_lana_num = smb_LANadapter;
+               ncbp->ncb_lana_num = lanas[idx_session];
 #ifndef DJGPP
                ncbp->ncb_buffer = (unsigned char *) bufs[idx_NCB];
                ncbp->ncb_event = NCBevents[idx_NCB];
@@ -5489,7 +5737,7 @@ void smb_Server(VOID *parmp)
                        case NRC_SNUMOUT:
                                /* Client closed session */
                                dead_sessions[idx_session] = TRUE;
-                               vcp = smb_FindVC(ncbp->ncb_lsn, 0);
+                               vcp = smb_FindVC(ncbp->ncb_lsn, 0, lanas[idx_session]);
                                /* Should also release vcp.  Also, would do
                                 * sanity check that all TID's are gone. */
                                if (dead_vcp)
@@ -5508,7 +5756,7 @@ void smb_Server(VOID *parmp)
                                        loggedOut = 1;
                                        loggedOutTime = vcp->logoffTime;
                                        loggedOutName =
-                                           strdup(vcp->justLoggedOut->name);
+                                           strdup(vcp->justLoggedOut->unp->name);
                                        loggedOutUserp = vcp->justLoggedOut;
                                        lock_ObtainWrite(&smb_rctLock);
                                        loggedOutUserp->refCount++;
@@ -5573,7 +5821,7 @@ void smb_Server(VOID *parmp)
                if (smb_concurrentCalls > smb_maxObsConcurrentCalls)
                        smb_maxObsConcurrentCalls = smb_concurrentCalls;
 
-               vcp = smb_FindVC(ncbp->ncb_lsn, 0);
+               vcp = smb_FindVC(ncbp->ncb_lsn, 0, ncbp->ncb_lana_num);
                vcp->errorCount = 0;
                bufp = (struct smb_packet *) ncbp->ncb_buffer;
 #ifdef DJGPP
@@ -5597,7 +5845,7 @@ void smb_Server(VOID *parmp)
                                rwevent = thrd_CreateEvent(NULL, FALSE, FALSE, NULL);
                                ncbp->ncb_command = NCBRECV | ASYNCH;
                                ncbp->ncb_lsn = (unsigned char) vcp->lsn;
-                               ncbp->ncb_lana_num = smb_LANadapter;
+                               ncbp->ncb_lana_num = vcp->lana;
                                ncbp->ncb_buffer = rwc.buf;
                                ncbp->ncb_length = 65535;
                                ncbp->ncb_event = rwevent;
@@ -5674,6 +5922,7 @@ void smb_Listener(void *parmp)
         dos_ptr dos_ncb;
         time_t now;
 #endif /* DJGPP */
+       int lana = (int) parmp;
 
        ncbp = GetNCB();
 #ifdef DJGPP
@@ -5681,6 +5930,7 @@ void smb_Listener(void *parmp)
 #endif /* DJGPP */
 
        while (1) {
+               memset(ncbp, 0, sizeof(NCB));
 #ifdef DJGPP
              /* terminate if shutdown flag is set */
              if (smbShutdownFlag == 1)
@@ -5712,7 +5962,7 @@ void smb_Listener(void *parmp)
                strcpy(ncbp->ncb_callname, "*");
                for(i=1; i<NCBNAMSZ; i++) ncbp->ncb_callname[i] = ' ';
         
-               ncbp->ncb_lana_num = smb_LANadapter;
+               ncbp->ncb_lana_num = lana;
 
 #ifndef DJGPP
                code = Netbios(ncbp);
@@ -5721,18 +5971,17 @@ void smb_Listener(void *parmp)
 
                 if (code != 0)
                 {
-                  fprintf(stderr, "NCBLISTEN lana=%d (smb_LANadapter=%d) "
-                          "failed with code %d\n",
-                          ncbp->ncb_lana_num, smb_LANadapter, code);
-                  osi_Log3(0, "NCBLISTEN lana=%d (smb_LANadapter=%d) "
-                           "failed with code %d",
-                           ncbp->ncb_lana_num, smb_LANadapter, code);
+                  fprintf(stderr, "NCBLISTEN lana=%d failed with code %d\n",
+                          ncbp->ncb_lana_num, code);
+                  osi_Log2(0, "NCBLISTEN lana=%d failed with code %d",
+                           ncbp->ncb_lana_num, code);
                   fprintf(stderr, "\nClient exiting due to network failure "
                           "(possibly due to power-saving mode)\n");
                   fprintf(stderr, "Please restart client.\n");
                   afs_exit(AFS_EXITCODE_NETWORK_FAILURE);
                 }
 #endif /* !DJGPP */
+
                osi_assert(code == 0);
 
                /* check for remote conns */
@@ -5752,11 +6001,18 @@ void smb_Listener(void *parmp)
                                flags |= SMB_VCFLAG_REMOTECONN;
 
                osi_Log1(afsd_logp, "New session lsn %d", ncbp->ncb_lsn);
+               /* lock */
+               lock_ObtainMutex(&smb_ListenerLock);
 
                /* New generation */
                sessionGen++;
 
                /* Log session startup */
+#ifdef NOSERVICE
+            fprintf(stderr, "New session(ncb_lsn,ncb_lana_num) %d,%d starting from host "
+                                "%s\n",
+                  ncbp->ncb_lsn,ncbp->ncb_lana_num, rname);
+#endif
                if (reportSessionStartups) {
 #ifndef DJGPP
                        HANDLE h;
@@ -5771,21 +6027,21 @@ void smb_Listener(void *parmp)
                                    1, 0, ptbuf, NULL);
                        DeregisterEventSource(h);
 #else /* DJGPP */
-                        afsi_log("NCBLISTEN completed, call from %s",rname);
-                        osi_Log1(afsd_logp, "SMB session startup, %d ongoing o
-ps",
-                                 ongoingOps);
-                         time(&now);
-                         fprintf(stderr, "%s: New session starting from host %s
-\n",
-                                 asctime(localtime(&now)), rname);
-                         fflush(stderr);
+            afsi_log("NCBLISTEN completed, call from %s",rname);
+            osi_Log1(afsd_logp, "SMB session startup, %d ongoing ops",
+                  ongoingOps);
+            time(&now);
+            fprintf(stderr, "%s: New session %d starting from host "
+                                "%s\n",
+                 asctime(localtime(&now)), ncbp->ncb_lsn, rname);
+            fflush(stderr);
 #endif /* !DJGPP */
                }
 
                 /* now ncbp->ncb_lsn is the connection ID */
-                vcp = smb_FindVC(ncbp->ncb_lsn, SMB_FLAG_CREATE);
+                vcp = smb_FindVC(ncbp->ncb_lsn, SMB_FLAG_CREATE, ncbp->ncb_lana_num);
                vcp->flags |= flags;
+                strcpy(vcp->rname, rname);
 
                /* Allocate slot in session arrays */
                /* Re-use dead session if possible, otherwise add one more */
@@ -5796,6 +6052,8 @@ ps",
                        }
                }
                LSNs[i] = ncbp->ncb_lsn;
+               lanas[i] = ncbp->ncb_lana_num;
+               
                if (i == numSessions) {
                        /* Add new NCB for new session */
                        InitNCBslot(numNCBs);
@@ -5811,6 +6069,8 @@ ps",
                } else {
                        thrd_SetEvent(SessionEvents[i]);
                }
+               /* unlock */
+               lock_ReleaseMutex(&smb_ListenerLock);
 
         }      /* dispatch while loop */
 }
@@ -5818,119 +6078,173 @@ ps",
 /* initialize Netbios */
 void smb_NetbiosInit()
 {
-        NCB *ncbp;
+    NCB *ncbp;
 #ifdef DJGPP
-        dos_ptr dos_ncb;
+    dos_ptr dos_ncb;
 #endif /* DJGPP */
-        int i, lana, code;
-        char s[100];
-        int delname_tried=0;
-        int len;
-
-       /* setup the NCB system */
-       ncbp = GetNCB();
+    int i, lana, code, l;
+    char s[100];
+    int delname_tried=0;
+    int len;
+    int lana_found = 0;
+
+    /* setup the NCB system */
+    ncbp = GetNCB();
 #ifdef DJGPP
-        dos_ncb = ((smb_ncb_t *)ncbp)->dos_ncb;
+    dos_ncb = ((smb_ncb_t *)ncbp)->dos_ncb;
 #endif /* DJGPP */
 
 #ifndef DJGPP
-       /* reset the adaptor: in Win32, this is required for every process, and
+    if (smb_LANadapter == -1) {
+        ncbp->ncb_command = NCBENUM;
+        ncbp->ncb_buffer = &lana_list;
+        ncbp->ncb_length = sizeof(lana_list);
+        code = Netbios(ncbp);
+        if (code != 0) {
+            sprintf(s, "Netbios NCBENUM error code %d", code);
+            afsi_log(s);
+            osi_panic(s, __FILE__, __LINE__);
+        }
+    }
+    else {
+        lana_list.length = 1;
+        lana_list.lana[0] = smb_LANadapter;
+    }
+         
+    for (i = 0; i < lana_list.length; i++) {
+        /* reset the adaptor: in Win32, this is required for every process, and
          * acts as an init call, not as a real hardware reset.
          */
         ncbp->ncb_command = NCBRESET;
         ncbp->ncb_callname[0] = 100;
         ncbp->ncb_callname[2] = 100;
-       ncbp->ncb_lana_num = smb_LANadapter;
+        ncbp->ncb_lana_num = lana_list.lana[i];
         code = Netbios(ncbp);
         if (code == 0) code = ncbp->ncb_retcode;
-       if (code != 0) {
-               sprintf(s, "Netbios NCBRESET error code %d", code);
-               afsi_log(s);
-               osi_panic(s, __FILE__, __LINE__);
-       }
+        if (code != 0) {
+           sprintf(s, "Netbios NCBRESET lana %d error code %d", lana_list.lana[i], code);
+           afsi_log(s);
+           lana_list.lana[i] = 255;  /* invalid lana */
+        }
+        else {
+            sprintf(s, "Netbios NCBRESET lana %d succeeded", lana_list.lana[i]);
+            afsi_log(s);
+        }
+    }
+#else
+    /* for DJGPP, there is no NCBENUM and NCBRESET is a real reset.  so
+       we will just fake the LANA list */
+    if (smb_LANadapter == -1) {
+        for (i = 0; i < 8; i++)
+           lana_list.lana[i] = i;
+        lana_list.length = 8;
+    }
+    else {
+        lana_list.length = 1;
+        lana_list.lana[0] = smb_LANadapter;
+    }
 #endif /* !DJGPP */
 
-  try_addname:
-       /* and declare our name so we can receive connections */
-       memset(ncbp, 0, sizeof(*ncbp));
-       ncbp->ncb_lana_num = smb_LANadapter;
+ try_addname:
+    /* and declare our name so we can receive connections */
+    memset(ncbp, 0, sizeof(*ncbp));
+    len=lstrlen(smb_localNamep);
+    memset(smb_sharename,' ',NCBNAMSZ);
+    memcpy(smb_sharename,smb_localNamep,len);
+#if 0
+    /*ncbp->ncb_lana_num = smb_LANadapter;*/
+    strcpy(ncbp->ncb_name, smb_localNamep);
+    len = strlen(smb_localNamep);
+    for(i=len; i<NCBNAMSZ; i++) ncbp->ncb_name[i] = ' ';
+#endif
+    /* Keep the name so we can unregister it later */
+    for (l = 0; l < lana_list.length; l++) {
+        lana = lana_list.lana[l];
+
         ncbp->ncb_command = NCBADDNAME;
-       strcpy(ncbp->ncb_name, smb_localNamep);
-        len = strlen(smb_localNamep);
-        for(i=len; i<NCBNAMSZ; i++) ncbp->ncb_name[i] = ' ';
-        /* Keep the name so we can unregister it later */
-        memcpy(smb_sharename,ncbp->ncb_name,NCBNAMSZ);
-        lana = smb_LANadapter;
-
-        do {        /* try multiple LANA numbers until we find one that works */
-          ncbp->ncb_lana_num = lana;
+        ncbp->ncb_lana_num = lana;
+        memcpy(ncbp->ncb_name,smb_sharename,NCBNAMSZ);
 #ifndef DJGPP
-          code = Netbios(ncbp);
+        code = Netbios(ncbp);
 #else /* DJGPP */
-          code = Netbios(ncbp, dos_ncb);
+        code = Netbios(ncbp, dos_ncb);
 #endif /* !DJGPP */
           
-          afsi_log("Netbios NCBADDNAME code=%d retcode=%d complete=%d",code,
-                   ncbp->ncb_retcode,ncbp->ncb_cmd_cplt);
-          {
-            char name[200];
-            int i;
-            for (i=0;i<NCBNAMSZ;++i)
-              name[i] = ncbp->ncb_name[i];
-            name[i] = '\0';
+        afsi_log("Netbios NCBADDNAME lana=%d code=%d retcode=%d complete=%d",
+                 lana, code, ncbp->ncb_retcode,ncbp->ncb_cmd_cplt);
+        {
+            char name[NCBNAMSZ+1];
+            name[NCBNAMSZ]=0;
+            memcpy(name,ncbp->ncb_name,NCBNAMSZ);
             afsi_log("Netbios NCBADDNAME added new name >%s<",name);
-          }
+        }
 
-          if (code == 0)
-          {
-            code = ncbp->ncb_retcode;
-            smb_LANadapter = lana;     /* correct LANA number */
-            break;
-          }
-          else
-          {
+        if (code == 0) code = ncbp->ncb_retcode;
+        if (code == 0) {
+            fprintf(stderr, "Netbios NCBADDNAME succeeded on lana %d\n", lana);
+#ifdef DJGPP
+            /* we only use one LANA with djgpp */
+            lana_list.lana[0] = lana;
+            lana_list.length = 1;
+#endif   
+        }
+        else {
             sprintf(s, "Netbios NCBADDNAME lana %d error code %d", lana, code);
             afsi_log(s);
-            if (code != NRC_BRIDGE)    /* invalid LANA num */
-              break;
-            else
-              lana = (lana + 1) % 8;
-          }
-        } while (lana != smb_LANadapter);  /* quit when we loop back to orig. */
-        
-        if (code == NRC_DUPNAME)
-        {
-          /* Name already exists; try to delete it */
-          memset(ncbp, 0, sizeof(*ncbp));
-          ncbp->ncb_command = NCBDELNAME;
-          memcpy(ncbp->ncb_name,smb_sharename,NCBNAMSZ);
-          ncbp->ncb_lana_num = smb_LANadapter;
+            fprintf(stderr, "Netbios NCBADDNAME lana %d error code %d\n", lana, code);
+            if (code == NRC_BRIDGE) {    /* invalid LANA num */
+                lana_list.lana[l] = 255;
+                continue;
+            }
+            else if (code == NRC_DUPNAME) {
+                /* Name already exists; try to delete it */
+                memset(ncbp, 0, sizeof(*ncbp));
+                ncbp->ncb_command = NCBDELNAME;
+                memcpy(ncbp->ncb_name,smb_sharename,NCBNAMSZ);
+                ncbp->ncb_lana_num = lana;
 #ifndef DJGPP
-          code = Netbios(ncbp);
+                code = Netbios(ncbp);
 #else
-          code = Netbios(ncbp, dos_ncb);
+                code = Netbios(ncbp, dos_ncb);
 #endif /* DJGPP */
-          if (code == 0) code = ncbp->ncb_retcode;
-          if (code != 0) {
-            fprintf(stderr, "Netbios NCBDELNAME error code %d", code);
-          }
-          fflush(stderr);
-          if (code == 0 && !delname_tried)
-          {
-            delname_tried = 1;
-            goto try_addname;
-          }
+                if (code == 0) code = ncbp->ncb_retcode;
+                else
+                    fprintf(stderr, "Netbios NCBDELNAME lana %d error code %d\n", lana, code);
+                fflush(stderr);
+                if (code != 0 || delname_tried) {
+                    lana_list.lana[l] = 255;
+                }
+                else if (code == 0) {
+                    if (!delname_tried) {
+                        lana--;
+                        delname_tried = 1;
+                        continue;
+                    }
+                }
+            }
+            else {
+                sprintf(s, "Netbios NCBADDNAME lana %d error code %d", lana, code);
+                afsi_log(s);
+                lana_list.lana[l] = 255;  /* invalid lana */
+                osi_panic(s, __FILE__, __LINE__);
+            }
         }
+        if (code == 0) {
+            lana_found = 1;   /* at least one worked */
+#ifdef DJGPP
+            break;
+#endif
+        }
+    }
 
-        if (code != 0)
-          osi_panic(s, __FILE__, __LINE__);
+    osi_assert(lana_list.length >= 0);
+    if (!lana_found) {
+        sprintf(s, "No valid LANA numbers found!");
+        osi_panic(s, __FILE__, __LINE__);
+    }
         
-        fprintf(stderr, "Using LAN Adapter %d\n", smb_LANadapter, code);
-        afsi_log("Netbios NCBADDNAME lana=%d name number=%d", smb_LANadapter,
-                 ncbp->ncb_num);
-
-       /* we're done with the NCB now */
-        FreeNCB(ncbp);
+    /* we're done with the NCB now */
+    FreeNCB(ncbp);
 }
 
 void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
@@ -6007,6 +6321,8 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
        /* Raw I/O data structures */
        lock_InitializeMutex(&smb_RawBufLock, "smb raw buffer lock");
 
+       lock_InitializeMutex(&smb_ListenerLock, "smb listener lock");
+       
        /* 4 Raw I/O buffers */
 #ifndef DJGPP
        smb_RawBufs = GlobalAlloc(GMEM_FIXED, 65536);
@@ -6159,10 +6475,13 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt,
 
        /* Start listeners, waiters, servers, and daemons */
 
-        phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Listener,
-               NULL, 0, &lpid, "smb_Listener");
-       osi_assert(phandle != NULL);
-       thrd_CloseHandle(phandle);
+       for (i = 0; i < lana_list.length; i++) {
+               if (lana_list.lana[i] == 255) continue;
+               phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Listener,
+                       (void*)lana_list.lana[i], 0, &lpid, "smb_Listener");
+               osi_assert(phandle != NULL);
+               thrd_CloseHandle(phandle);
+       }
 
 #ifndef DJGPP
         phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_ClientWaiter,
@@ -6227,7 +6546,7 @@ void smb_Shutdown(void)
           
           /*fprintf(stderr, "NCBHANGUP session %d LSN %d\n", i, LSNs[i]);*/
           ncbp->ncb_command = NCBHANGUP;
-          ncbp->ncb_lana_num = smb_LANadapter;
+          ncbp->ncb_lana_num = lanas[i];  /*smb_LANadapter;*/
           ncbp->ncb_lsn = LSNs[i];
           code = Netbios(ncbp, dos_ncb);
           /*fprintf(stderr, "returned from NCBHANGUP session %d LSN %d\n", i, LS
@@ -6238,15 +6557,21 @@ void smb_Shutdown(void)
           }
         }
 
+#if 1
         /* Delete Netbios name */
-        ncbp->ncb_command = NCBDELNAME;
-        memcpy(ncbp->ncb_name,smb_sharename,NCBNAMSZ);
-        ncbp->ncb_lana_num = smb_LANadapter;
-        code = Netbios(ncbp, dos_ncb);
-        if (code == 0) code = ncbp->ncb_retcode;
-        if (code != 0) {
-          fprintf(stderr, "Netbios NCBDELNAME error code %d", code);
-        }
-        fflush(stderr);
+       for (i = 0; i < lana_list.length; i++) {
+               if (lana_list.lana[i] == 255) continue;
+               ncbp->ncb_command = NCBDELNAME;
+               ncbp->ncb_lana_num = lana_list.lana[i];
+               memcpy(ncbp->ncb_name,smb_sharename,NCBNAMSZ);
+               code = Netbios(ncbp, dos_ncb);
+               if (code == 0) code = ncbp->ncb_retcode;
+               if (code != 0) {
+                       fprintf(stderr, "Netbios NCBDELNAME lana %d error code %d",
+                       ncbp->ncb_lana_num, code);
+               }
+               fflush(stderr);
+       }
+#endif
 }
 #endif /* DJGPP */
index 0bba63413227496ea1698cebe0e330c2146a9797..e3a9c2076d84bc5eb2d74f559b8fdf6b6c2d111a 100644 (file)
@@ -124,8 +124,10 @@ typedef struct smb_vc {
         struct smb_fid *fidsp;         /* the first child in the open file list */
        struct smb_user *justLoggedOut; /* ready for profile upload? */
        unsigned long logoffTime;       /* tick count when logged off */
-       struct cm_user *logonDLLUser;   /* integrated logon user */
+       /*struct cm_user *logonDLLUser; /* integrated logon user */
        unsigned char errorCount;
+        char rname[17];
+       int lana;
 } smb_vc_t;
 
                                        /* have we negotiated ... */
@@ -144,10 +146,19 @@ typedef struct smb_user {
         osi_mutex_t mx;
         long userID;                   /* the session identifier */
         struct smb_vc *vcp;            /* back ptr to virtual circuit */
-       struct cm_user *userp;          /* CM user structure */
-       char *name;                     /* user name */
+  struct smb_username *unp;        /* user name struct */
 } smb_user_t;
 
+typedef struct smb_username {
+       struct smb_username *nextp;             /* next sibling */
+        long refCount;                 /* ref count */
+        long flags;                    /* flags; locked by mx */
+        osi_mutex_t mx;
+       struct cm_user *userp;          /* CM user structure */
+        char *name;                    /* user name */
+  char *machine;                  /* machine name */
+} smb_username_t;
+
 #define SMB_USERFLAG_DELETE    1       /* delete struct when ref count zero */
 
 /* one per tree-connect */
@@ -194,6 +205,9 @@ typedef struct smb_ioctl {
        
         /* flags */
         long flags;
+
+        /* fid pointer */
+        struct smb_fid *fidp;
 } smb_ioctl_t;
 
 /* flags for smb_ioctl_t */
@@ -265,6 +279,7 @@ typedef struct smb_dirListPatch {
        osi_queue_t q;
         char *dptr;            /* ptr to attr, time, data, sizel, sizeh */
        cm_fid_t fid;
+  cm_dirEntry_t *dep;   /* temp */
 } smb_dirListPatch_t;
 
 /* waiting lock list elements */
@@ -315,7 +330,7 @@ extern void smb_DosUTimeFromUnixTime(long *dosUTimep, long unixTime);
 
 extern void smb_UnixTimeFromDosUTime(long *unixTimep, long dosUTime);
 
-extern smb_vc_t *smb_FindVC(unsigned short lsn, int flags);
+extern smb_vc_t *smb_FindVC(unsigned short lsn, int flags, int lana);\r
 
 extern void smb_ReleaseVC(smb_vc_t *vcp);
 
@@ -434,5 +449,7 @@ extern BOOL smb_IsLegalFilename(char *filename);
 #include "smb3.h"
 #include "smb_ioctl.h"
 #include "smb_iocons.h"
+\r
+cm_user_t *smb_FindOrCreateUser(smb_vc_t *vcp, char *usern);\r
 
 #endif /* whole file */
index bb0eec68015bf439f0ca33cde30935a7c8d2c143..207f9f8fbe4a1a92b22885e00326afb895b08356 100644 (file)
@@ -7,6 +7,8 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+//#define NOSERVICE 1 
+
 #include <afs/param.h>
 #include <afs/stds.h>
 
@@ -42,14 +44,16 @@ smb_tran2Packet_t *smb_tran2AssemblyQueuep;
 cm_user_t *smb_GetTran2User(smb_vc_t *vcp, smb_tran2Packet_t *inp)
 {
        smb_user_t *uidp;
-        cm_user_t *up;
+        cm_user_t *up = NULL;
         
         uidp = smb_FindUID(vcp, inp->uid, 0);
         if (!uidp) return NULL;
         
        lock_ObtainMutex(&uidp->mx);
-        up = uidp->userp;
-        cm_HoldUser(up);
+        if (uidp->unp) {
+          up = uidp->unp->userp;
+          cm_HoldUser(up);
+        }
        lock_ReleaseMutex(&uidp->mx);
 
         smb_ReleaseUID(uidp);
@@ -107,119 +111,123 @@ unsigned char *smb_ParseString(unsigned char *inp, char **chainpp)
 
 long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
 {
-       char *tp;
-       char *usern, *pwd, *pwdx;
-       smb_user_t *uidp, *dead_uidp;
-       unsigned short newUid;
-       unsigned long caps;
-       cm_user_t *userp;
-       char *s1 = " ";
-
-       /* Check for bad conns */
-       if (vcp->flags & SMB_VCFLAG_REMOTECONN)
-               return CM_ERROR_REMOTECONN;
-
-       /* For NT LM 0.12 and up, get capabilities */
-       if (vcp->flags & SMB_VCFLAG_USENT) {
-               caps = smb_GetSMBParm(inp, 11);
-               if (caps & 0x40)
-                       vcp->flags |= SMB_VCFLAG_STATUS32;
-               /* for now, ignore other capability bits */
-       }
-
-       /* Parse the data */
-       tp = smb_GetSMBData(inp, NULL);
-       if (vcp->flags & SMB_VCFLAG_USENT)
-               pwdx = smb_ParseString(tp, &tp);
-       pwd = smb_ParseString(tp, &tp);
-       usern = smb_ParseString(tp, &tp);
-
-       /* Create a new UID and cm_user_t structure */
-       userp = cm_NewUser();
-       lock_ObtainMutex(&vcp->mx);
-       newUid = vcp->uidCounter++;
-       lock_ReleaseMutex(&vcp->mx);
-
-       /* Create a new smb_user_t structure and connect them up */
-       uidp = smb_FindUID(vcp, newUid, SMB_FLAG_CREATE);
-       lock_ObtainMutex(&uidp->mx);
-       uidp->userp = userp;
-       uidp->name = strdup(usern);
-       lock_ReleaseMutex(&uidp->mx);
-       smb_ReleaseUID(uidp);
-        
-       if (dead_vcp) {
-               dead_uidp = dead_vcp->usersp;
-               while (dead_uidp) {
-                       if (dead_uidp->userp
-                           && strcmp(dead_uidp->name, usern) == 0)
-                               break;
-                       dead_uidp = dead_uidp->nextp;
-               }
-       }
-
-       /* transfer tokens from dead vcp */
-       if (dead_vcp && dead_uidp) {
-               cm_user_t *dead_userp;
-               s1 = ", tokens from terminated session";
-               dead_userp = dead_uidp->userp;
-               cm_ResetACLCache(dead_userp);
-               userp->cellInfop = dead_userp->cellInfop;
-               dead_userp->cellInfop = NULL;
-               dead_vcp = NULL;
-       }
-
-       /* transfer tokens from integrated logon */
-       if (vcp->logonDLLUser) {
-               s1 = ", tokens from integrated logon";
-               cm_ResetACLCache(vcp->logonDLLUser);
-               userp->cellInfop = vcp->logonDLLUser->cellInfop;
-               vcp->logonDLLUser->cellInfop = NULL;
-               vcp->logonDLLUser = NULL;
-       }
-
-       /* transfer tokens for logoff profile upload */
-       if (vcp->justLoggedOut) {
-               cm_user_t *logout_userp;
-               if (GetTickCount() - vcp->logoffTime <
-                       1000 * smb_LogoffTransferTimeout
-                   && strcmp(vcp->justLoggedOut->name, usern) == 0) {
-                       s1 = ", tokens from logoff";
-                       logout_userp = vcp->justLoggedOut->userp;
-                       cm_ResetACLCache(logout_userp);
-                       userp->cellInfop = logout_userp->cellInfop;
-                       logout_userp->cellInfop = NULL;
+    char *tp;
+    char *usern, *pwd, *pwdx;
+    smb_user_t *uidp, *dead_uidp;
+    unsigned short newUid;
+    unsigned long caps;
+    cm_user_t *userp;
+    smb_username_t *unp;
+    char *s1 = " ";
+
+    /* Check for bad conns */
+    if (vcp->flags & SMB_VCFLAG_REMOTECONN)
+        return CM_ERROR_REMOTECONN;
+
+    /* For NT LM 0.12 and up, get capabilities */
+    if (vcp->flags & SMB_VCFLAG_USENT) {
+        caps = smb_GetSMBParm(inp, 11);
+        if (caps & 0x40)
+            vcp->flags |= SMB_VCFLAG_STATUS32;
+        /* for now, ignore other capability bits */
+    }
+
+    /* Parse the data */
+    tp = smb_GetSMBData(inp, NULL);
+    if (vcp->flags & SMB_VCFLAG_USENT)
+        pwdx = smb_ParseString(tp, &tp);
+    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);
                }
-               vcp->justLoggedOut = NULL;
-       }
-       else if (loggedOut) {
-               cm_user_t *logout_userp;
-               if (GetTickCount() - loggedOutTime <
-                       1000 * smb_LogoffTransferTimeout
-                   && strcmp(loggedOutName, usern) == 0) {
-                       s1 = ", tokens from logoff";
-                       logout_userp = loggedOutUserp->userp;
-                       cm_ResetACLCache(logout_userp);
-                       userp->cellInfop = logout_userp->cellInfop;
-                       logout_userp->cellInfop = NULL;
+#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
+       of the users tokens disappearing.
+
+       To avoid this problem, we look for an existing smb_user_t record
+       based on the users name, and use that one if we find it.
+    */
+
+    uidp = smb_FindUserByNameThisSession(vcp, usern);
+    if (uidp) {   /* already there, so don't create a new one */
+        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
+        smb_ReleaseUID(uidp);
+    }
+    else {
+      /* do a global search for the username/machine name pair */
+        unp = smb_FindUserByName(usern, vcp->rname, SMB_FLAG_CREATE);
+
+        /* Create a new UID and cm_user_t structure */
+        userp = unp->userp;
+        if (!userp)
+          userp = cm_NewUser();
+        lock_ObtainMutex(&vcp->mx);
+        newUid = vcp->uidCounter++;
+        lock_ReleaseMutex(&vcp->mx);
+
+        /* Create a new smb_user_t structure and connect them up */
+        lock_ObtainMutex(&unp->mx);
+        unp->userp = userp;
+        lock_ReleaseMutex(&unp->mx);
+
+        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);
                }
-               smb_ReleaseUID(loggedOutUserp);
-               loggedOutUserp = NULL;
-               free(loggedOutName);
-               loggedOutName = NULL;
-               loggedOut = 0;
-       }
-
-       /* Return UID to the client */
-       ((smb_t *)outp)->uid = newUid;
-       /* Also to the next chained message */
-       ((smb_t *)inp)->uid = newUid;
-
-       osi_Log3(afsd_logp, "SMB3 session setup name %s creating ID %d%s",
-                       osi_LogSaveString(afsd_logp, usern), newUid, osi_LogSaveString(afsd_logp, s1));
-       smb_SetSMBParm(outp, 2, 0);
-        smb_SetSMBDataLength(outp, 0);
-        return 0;
+#endif
+        lock_ReleaseMutex(&uidp->mx);
+        smb_ReleaseUID(uidp);
+    }
+
+ done:
+    /* Return UID to the client */
+    ((smb_t *)outp)->uid = newUid;
+    /* Also to the next chained message */
+    ((smb_t *)inp)->uid = newUid;
+
+    osi_Log3(afsd_logp, "SMB3 session setup name %s creating ID %d%s",
+             osi_LogSaveString(afsd_logp, usern), newUid, osi_LogSaveString(afsd_logp, s1));
+    smb_SetSMBParm(outp, 2, 0);
+    smb_SetSMBDataLength(outp, 0);
+    return 0;
 }
 
 long smb_ReceiveV3UserLogoffX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
@@ -236,27 +244,13 @@ long smb_ReceiveV3UserLogoffX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *ou
         if (uidp) {
                char *s1 = NULL, *s2 = NULL;
 
-               /* Also, this is not logon session any more */
-               if (uidp->userp == vcp->logonDLLUser) {
-                       s1 = ", was logon session";
-                       vcp->logonDLLUser = NULL;
-               }
-
-               /* But its tokens might be needed later */
-               if (uidp->userp && !(uidp->userp->flags & CM_USERFLAG_WASLOGON)
-                   && smb_LogoffTokenTransfer) {
-                       s2 = ", pre-logout effect";
-                       vcp->justLoggedOut = uidp;
-                       vcp->logoffTime = GetTickCount();
-               }
-
                if (s2 == NULL) s2 = " ";
                if (s1 == NULL) {s1 = s2; s2 = " ";}
 
                osi_Log4(afsd_logp, "SMB3 user logoffX uid %d name %s%s%s",
                         uidp->userID,
-                        osi_LogSaveString(afsd_logp, uidp->name),
-                        s1, s2);
+                        osi_LogSaveString(afsd_logp,
+                 (uidp->unp) ? uidp->unp->name: " "), s1, s2);
 
                lock_ObtainMutex(&uidp->mx);
                uidp->flags |= SMB_USERFLAG_DELETE;
@@ -1227,7 +1221,7 @@ long smb_ReceiveTran2QPathInfo(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t
                 smb_FreeTran2Packet(outp);
                 return 0;
         }
-        
+
         lock_ObtainMutex(&scp->mx);
         code = cm_SyncOp(scp, NULL, userp, &req, 0,
                CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
@@ -2320,6 +2314,9 @@ long smb_ReceiveTran2SearchDir(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t
                                curPatchp->fid.volume = scp->fid.volume;
                                curPatchp->fid.vnode = ntohl(dep->fid.vnode);
                                curPatchp->fid.unique = ntohl(dep->fid.unique);
+
+                                /* temp */
+                                curPatchp->dep = dep;
                        }
 
                        if (searchFlags & 4)
@@ -4135,3 +4132,40 @@ void smb3_Init()
 {
        lock_InitializeMutex(&smb_Dir_Watch_Lock, "Directory Watch List Lock");
 }
+
+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);
+    if (!unp->userp) {
+        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
+    return unp->userp;
+}
+
index ca40f64ac8156cd09f6f3c4ffee78b28cb955c1b..9e06d8822e229a7f7acfe00cd009cc3b61375e6a 100644 (file)
@@ -27,7 +27,8 @@
 
 smb_ioctlProc_t *smb_ioctlProcsp[SMB_IOCTL_MAXPROCS];
 
-extern unsigned char smb_LANadapter;
+/*extern unsigned char smb_LANadapter;*/
+extern LANA_ENUM lana_list;
 
 void smb_InitIoctl(void)
 {
@@ -86,6 +87,7 @@ void smb_SetupIoctlFid(smb_fid_t *fidp, cm_space_t *prefix)
                iop = malloc(sizeof(*iop));
                 memset(iop, 0, sizeof(*iop));
                 fidp->ioctlp = iop;
+                               iop->fidp = fidp;
         }
        if (prefix) {
                copyPrefix = cm_GetSpace();
@@ -183,11 +185,6 @@ long smb_IoctlRead(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp,
                return code;
         }
 
-       if (iop->flags & SMB_IOCTLFLAG_LOGON) {
-               vcp->logonDLLUser = userp;
-               userp->flags |= CM_USERFLAG_WASLOGON;
-       }
-
        leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
         if (count > leftToCopy) count = leftToCopy;
         
@@ -278,9 +275,13 @@ long smb_IoctlV3Read(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp, smb_pack
                smb_user_t *uidp;
 
                uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
-               osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
-                        uidp->userID, userp,
-                        osi_LogSaveString(afsd_logp, uidp->name));
+               if (uidp && uidp->unp)
+                   osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
+                            uidp->userID, userp,
+                            osi_LogSaveString(afsd_logp, uidp->unp->name));
+               else
+                   osi_Log2(afsd_logp, "Ioctl uid %d user %x no name",
+                            uidp->userID, userp);
                smb_ReleaseUID(uidp);
        }
 
@@ -293,11 +294,6 @@ long smb_IoctlV3Read(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp, smb_pack
                return code;
         }
 
-       if (iop->flags & SMB_IOCTLFLAG_LOGON) {
-               vcp->logonDLLUser = userp;
-               userp->flags |= CM_USERFLAG_WASLOGON;
-       }
-
        leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
         if (count > leftToCopy) count = leftToCopy;
         
@@ -370,9 +366,13 @@ long smb_IoctlReadRaw(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp,
                smb_user_t *uidp;
 
                uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
-               osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
-                        uidp->userID, userp,
-                        osi_LogSaveString(afsd_logp, uidp->name));
+               if (uidp && uidp->unp)
+                   osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
+                            uidp->userID, userp,
+                            osi_LogSaveString(afsd_logp, uidp->unp->name));
+               else
+                   osi_Log2(afsd_logp, "Ioctl uid %d user %x no name",
+                            uidp->userID, userp);
                smb_ReleaseUID(uidp);
        }
 
@@ -385,11 +385,6 @@ long smb_IoctlReadRaw(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp,
                return code;
        }
 
-       if (iop->flags & SMB_IOCTLFLAG_LOGON) {
-               vcp->logonDLLUser = userp;
-               userp->flags |= CM_USERFLAG_WASLOGON;
-       }
-
        leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
 
        ncbp = outp->ncbp;
@@ -398,7 +393,8 @@ long smb_IoctlReadRaw(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp,
        ncbp->ncb_length = (unsigned short) leftToCopy;
        ncbp->ncb_lsn = (unsigned char) vcp->lsn;
        ncbp->ncb_command = NCBSEND;
-        ncbp->ncb_lana_num = smb_LANadapter;
+    /*ncbp->ncb_lana_num = smb_LANadapter;*/
+       ncbp->ncb_lana_num = vcp->lana;
 
 #ifndef DJGPP
        ncbp->ncb_buffer = iop->outCopied + iop->outAllocp;
index ed046ae4c035736db23156495336cfd01d47c9d4..b7f8138e7ba9be734e9e6522faf18383dfcd8b87 100644 (file)
@@ -18,14 +18,43 @@ if not exist "Media\Transarc AFS" mkdir "Media\Transarc AFS"
 if not exist "Registry Entries" mkdir "Registry Entries"
 if not exist "Script Files" mkdir "Script Files"
 if not exist "Setup Files" mkdir "Setup Files"
-
-if not exist "Setup Files\Uncompressed Files" mkdir "Setup Files\Uncompressed Files"
-if not exist "Setup Files\Uncompressed Files\Language Independent" mkdir "Setup Files\Uncompressed Files\Language Independent"
-if not exist "Setup Files\Uncompressed Files\Language Independent\OS Independent" mkdir "Setup Files\Uncompressed Files\Language Independent\OS Independent"
-if not exist "Setup Files\Compressed Files" mkdir "Setup Files\Compressed Files"
-if not exist "Setup Files\Compressed Files\Language Independent" mkdir "Setup Files\Compressed Files\Language Independent"
-if not exist "Setup Files\Compressed Files\Language Independent\OS Independent" mkdir "Setup Files\Compressed Files\Language Independent\OS Independent"
-
+\r
+set sub1=Uncompressed Files\r
+call :gencomp\r
+set sub1=Compressed Files\r
+call :gencomp\r
+goto shell\r
+\r
+:gencomp\r
+if not exist "Setup Files\%sub1%" mkdir "Setup Files\%sub1%"\r
+set sub2=Language Independent\r
+call :gencomp2\r
+set sub2=0009-English\r
+call :gencomp2\r
+set sub2=0007-German\r
+call :gencomp2\r
+set sub2=0011-Japanese\r
+call :gencomp2\r
+set sub2=0012-Korean\r
+call :gencomp2\r
+set sub2=0416-Portuguese (Brazilian)\r
+call :gencomp2\r
+set sub2=0404-Chinese (Taiwan)\r
+call :gencomp2\r
+set sub2=000a-Spanish\r
+call :gencomp2\r
+set sub2=0804-Chinese (PRC)\r
+call :gencomp2\r
+goto :eof\r
+\r
+:gencomp2\r
+rem echo ]%sub1%] ]%sub2%]\r
+if not exist "Setup Files\%sub1%\%sub2%" mkdir "Setup Files\%sub1%\%sub2%"
+if not exist "Setup Files\%sub1%\%sub2%\OS Independent" mkdir "Setup Files\%sub1%\%sub2%\OS Independent"
+if not exist "Setup Files\%sub1%\%sub2%\Intel 32" mkdir "Setup Files\%sub1%\%sub2%\Intel 32"
+goto :eof\r
+\r
+:shell\r
 if not exist "Shell Objects" mkdir "Shell Objects"
 if not exist "String Tables" mkdir "String Tables"
 if not exist "String Tables\0009-English" mkdir "String Tables\0009-English"
@@ -38,4 +67,4 @@ if not exist "String Tables\0416-Portuguese (Brazilian)" mkdir "String Tables\04
 if not exist "String Tables\000a-Spanish" mkdir "String Tables\000a-Spanish"
 if not exist "Text Substitutions" mkdir "Text Substitutions"
 
-
+:eof
\ No newline at end of file
index 8b31e9c9de3f9573f5670359473d09223eaa2524..79495238dbe55ab6122c0e8abd938f9039815ed4 100644 (file)
@@ -3,7 +3,7 @@
 ---FileGroup---=
 HKLM0=Software\TransarcCorporation\AFS Client\CurrentVersion
 HKLM1=Software\TransarcCorporation\AFS Client
-HKLM2=Software\TransarcCorporation\AFS Client\3.6
+HKLM2=Software\TransarcCorporation\AFS Client\1.0 4.01
 HKLM3=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon
 HKCR0=CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}
 HKLM4=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
@@ -11,6 +11,7 @@ HKCR1=CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32
 HKLM5=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider
 HKCR2=*\shellex\ContextMenuHandlers\AFS Client Shell Extension
 HKCR3=FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension
+HKLM6=SYSTEM\CurrentControlSet\Services\NetBT\Parameters\r
 
 [Client:HKCR:*\shellex\ContextMenuHandlers\AFS Client Shell Extension]
 ---Comment---=
@@ -41,7 +42,7 @@ TypesSupported=N,7
 HKLM0=Software\TransarcCorporation\AFS Server\CurrentVersion
 HKLM1=System\CurrentControlSet\Services\EventLog\Application\AFS Service
 HKLM2=Software\TransarcCorporation\AFS Server
-HKLM3=Software\TransarcCorporation\AFS Server\3.6
+HKLM3=Software\TransarcCorporation\AFS Server\1.0 4.01
 
 [WinNT_Client_NoUninstall:HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\File Manager\AddOns]
 ---Comment---=
@@ -53,22 +54,22 @@ AFS Client FME=S,<TARGETDIR>\Client\Program\afs_fme.dll
 ---FileGroup---=
 HKLM0=Software\TransarcCorporation\AFS Control Center\CurrentVersion
 HKLM1=Software\TransarcCorporation\AFS Control Center
-HKLM2=Software\TransarcCorporation\AFS Control Center\3.6
+HKLM2=Software\TransarcCorporation\AFS Control Center\1.0 4.01
 
-[Client:HKLM:Software\TransarcCorporation\AFS Client\3.6]
-PatchLevel=N,0
-BetaLevel=N,0
+[Client:HKLM:Software\TransarcCorporation\AFS Client\1.0 4.01]
+PatchLevel=N,401
+BetaLevel=N,1
 Revision=N,0
 ---Comment---=
 (Default)=S,
-MajorVersion=N,3
+MajorVersion=N,1
 Title=S,<CLIENT_TITLE>
 InstallDateString=S,<INSTALL_DATE>
 PathName=S,<TARGETDIR>\Client
 Software Type=S,File System
-MinorVersion=N,6
+MinorVersion=N,0
 ReleaseType=S,<RELEASE_TYPE>
-VersionString=S,3.6
+VersionString=S,1.0 4.01
 Description=S,<CLIENT_DESC>
 
 [Client_NoUninstall]
@@ -85,19 +86,19 @@ HKLM0=SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved
 (Default)=S,
 Gateway=S,
 
-[Control_Center:HKLM:Software\TransarcCorporation\AFS Control Center\3.6]
-PatchLevel=N,0
-BetaLevel=N,0
+[Control_Center:HKLM:Software\TransarcCorporation\AFS Control Center\1.0 4.01]
+PatchLevel=N,401
+BetaLevel=N,1
 Revision=N,0
 ---Comment---=
 (Default)=S,
-MajorVersion=N,3
+MajorVersion=N,1
 InstallDateString=S,<INSTALL_DATE>
 PathName=S,<TARGETDIR>\Control Center
 Software Type=S,File System
-MinorVersion=N,6
+MinorVersion=N,0
 ReleaseType=S,<RELEASE_TYPE>
-VersionString=S,3.6
+VersionString=S,1.0 4.01
 Description=S,AFS Control Center for Windows NT
 
 [Client_NoUninstall:HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
@@ -110,18 +111,18 @@ Description=S,AFS Control Center for Windows NT
 (Default)=S,
 
 [Control_Center:HKLM:Software\TransarcCorporation\AFS Control Center\CurrentVersion]
-PatchLevel=N,0
-BetaLevel=N,0
+PatchLevel=N,401
+BetaLevel=N,1
 Revision=N,0
 ---Comment---=
 (Default)=S,
-MajorVersion=N,3
+MajorVersion=N,1
 InstallDateString=S,<INSTALL_DATE>
 PathName=S,<TARGETDIR>\Control Center
 Software Type=S,File System
-MinorVersion=N,6
+MinorVersion=N,0
 ReleaseType=S,<RELEASE_TYPE>
-VersionString=S,3.6
+VersionString=S,1.0 4.01
 Description=S,AFS Control Center for Windows NT
 
 [Light_Client]
@@ -143,7 +144,7 @@ IsGateway=N,0
 ---FileGroup---=
 HKLM0=Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion
 HKLM1=Software\TransarcCorporation\AFS Supplemental Documentation
-HKLM2=Software\TransarcCorporation\AFS Supplemental Documentation\3.6
+HKLM2=Software\TransarcCorporation\AFS Supplemental Documentation\1.0 4.01
 
 [Data]
 Set0=Server
@@ -156,19 +157,19 @@ Set6=Full_Client
 Set7=Docs
 
 [Client:HKLM:Software\TransarcCorporation\AFS Client\CurrentVersion]
-PatchLevel=N,0
-BetaLevel=N,0
+PatchLevel=N,401
+BetaLevel=N,1
 Revision=N,0
 ---Comment---=
 (Default)=S,
-MajorVersion=N,3
+MajorVersion=N,1
 Title=S,<CLIENT_TITLE>
 InstallDateString=S,<INSTALL_DATE>
 PathName=S,<TARGETDIR>\Client
 Software Type=S,File System
-MinorVersion=N,6
+MinorVersion=N,0
 ReleaseType=S,<RELEASE_TYPE>
-VersionString=S,3.6
+VersionString=S,1.0 4.01
 Description=S,<CLIENT_DESC>
 
 [Full_Client]
@@ -177,33 +178,33 @@ Description=S,<CLIENT_DESC>
 HKLM0=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
 
 [Docs:HKLM:Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion]
-PatchLevel=N,0
-BetaLevel=N,0
+PatchLevel=N,401
+BetaLevel=N,1
 Revision=N,0
 ---Comment---=
 (Default)=S,
-MajorVersion=N,3
+MajorVersion=N,1
 InstallDateString=S,<INSTALL_DATE>
 PathName=S,<TARGETDIR>\Documentation
 Software Type=S,File System
-MinorVersion=N,6
+MinorVersion=N,0
 ReleaseType=S,<RELEASE_TYPE>
-VersionString=S,3.6
+VersionString=S,1.0 4.01
 Description=S,AFS System Administration Documentation
 
-[Server:HKLM:Software\TransarcCorporation\AFS Server\3.6]
-PatchLevel=N,0
-BetaLevel=N,0
+[Server:HKLM:Software\TransarcCorporation\AFS Server\1.0 4.01]
+PatchLevel=N,401
+BetaLevel=N,1
 Revision=N,0
 ---Comment---=
 (Default)=S,
-MajorVersion=N,3
+MajorVersion=N,1
 InstallDateString=S,<INSTALL_DATE>
 PathName=S,<TARGETDIR>\Server
 Software Type=S,File System
-MinorVersion=N,6
+MinorVersion=N,0
 ReleaseType=S,<RELEASE_TYPE>
-VersionString=S,3.6
+VersionString=S,1.0 4.01
 Description=S,AFS Server for Windows NT
 
 [Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]
@@ -228,19 +229,19 @@ AFS Client FME=S,<TARGETDIR>\Client\Program\afs_fme.dll
 ---FileGroup---=
 HKLM0=SOFTWARE\Microsoft\Windows NT\CurrentVersion\File Manager\AddOns
 
-[Docs:HKLM:Software\TransarcCorporation\AFS Supplemental Documentation\3.6]
-PatchLevel=N,0
-BetaLevel=N,0
+[Docs:HKLM:Software\TransarcCorporation\AFS Supplemental Documentation\1.0 4.01]
+PatchLevel=N,401
+BetaLevel=N,1
 Revision=N,0
 ---Comment---=
 (Default)=S,
-MajorVersion=N,3
+MajorVersion=N,1
 InstallDateString=S,<INSTALL_DATE>
 PathName=S,<TARGETDIR>\Documentation
 Software Type=S,File System
-MinorVersion=N,6
+MinorVersion=N,0
 ReleaseType=S,<RELEASE_TYPE>
-VersionString=S,3.6
+VersionString=S,1.0 4.01
 Description=S,AFS System Administration Documentation
 
 [General]
@@ -252,18 +253,18 @@ Version=1.00.000
 (Default)=S,{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}
 
 [Server:HKLM:Software\TransarcCorporation\AFS Server\CurrentVersion]
-PatchLevel=N,0
-BetaLevel=N,0
+PatchLevel=N,401
+BetaLevel=N,1
 Revision=N,0
 ---Comment---=
 (Default)=S,
-MajorVersion=N,3
+MajorVersion=N,1
 InstallDateString=S,<INSTALL_DATE>
 PathName=S,<TARGETDIR>\Server
 Software Type=S,File System
-MinorVersion=N,6
+MinorVersion=N,0
 ReleaseType=S,<RELEASE_TYPE>
-VersionString=S,3.6
+VersionString=S,1.0 4.01
 Description=S,AFS Server for Windows NT
 
 [Client:HKCR:CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}]
index ab12b9e4cd8295eff91570f3c0bf7c967375cc51..06b4fe2b1c106869c77e86256d8f71ff32c71577 100644 (file)
@@ -81,10 +81,7 @@ rem -------------- Client_System32_Files.fgl ---------------------------
 echo [TopDir] > Client_System32_Files.fgl
 echo file0=%IS5_DEST%\root.client\usr\vice\etc\afs_cpa.cpl >> Client_System32_Files.fgl
 echo file1=%MSVCDIR%\REDIST\Msvcrt.dll >> Client_System32_Files.fgl
-echo file2=%SYSTEMROOT%\system32\Msvcrtd.dll >> Client_System32_Files.fgl
-echo file3=%MSVCDIR%\REDIST\Mfc42.dll >> Client_System32_Files.fgl
-echo file4=%SYSTEMROOT%\system32\mfc42d.dll >> Client_System32_Files.fgl
-echo file5=%SYSTEMROOT%\system32\mfco42d.dll >> Client_System32_Files.fgl
+echo file2=%MSVCDIR%\REDIST\Mfc42.dll >> Client_System32_Files.fgl
 echo.  >> Client_System32_Files.fgl
 echo [General] >> Client_System32_Files.fgl
 echo Type=FILELIST >> Client_System32_Files.fgl
@@ -159,11 +156,8 @@ rem -------------- Light_Client_System32_Files.fgl ---------------------
 
 echo [TopDir] > Light_Client_System32_Files.fgl
 echo file0=%MSVCDIR%\REDIST\Msvcrt.dll >> Light_Client_System32_Files.fgl
-echo file1=%SYSTEMROOT%\system32\Msvcrtd.dll >> Light_Client_System32_Files.fgl
-echo file2=%MSVCDIR%\REDIST\Mfc42.dll >> Light_Client_System32_Files.fgl
-echo file3=%SYSTEMROOT%\system32\mfc42d.dll >> Light_Client_System32_Files.fgl
-echo file4=%SYSTEMROOT%\system32\mfco42d.dll >> Light_Client_System32_Files.fgl
-echo file5=%IS5_DEST%\root.client\usr\vice\etc\afs_cpa.cpl >> Light_Client_System32_Files.fgl
+echo file1=%MSVCDIR%\REDIST\Mfc42.dll >> Light_Client_System32_Files.fgl
+echo file2=%IS5_DEST%\root.client\usr\vice\etc\afs_cpa.cpl >> Light_Client_System32_Files.fgl
 echo.  >> Light_Client_System32_Files.fgl
 echo [General] >> Light_Client_System32_Files.fgl
 echo Type=FILELIST >> Light_Client_System32_Files.fgl
@@ -218,11 +212,8 @@ rem -------------- Light95_Client_System32_Files.fgl ---------------------
 
 echo [TopDir] > Light95_Client_System32_Files.fgl
 echo file0=%MSVCDIR%\REDIST\Msvcrt.dll >> Light95_Client_System32_Files.fgl
-echo file1=%SYSTEMROOT%\system32\Msvcrtd.dll >> Light95_Client_System32_Files.fgl
-echo file2=%MSVCDIR%\REDIST\Mfc42.dll >> Light95_Client_System32_Files.fgl
-echo file3=%SYSTEMROOT%\system32\mfc42d.dll >> Light95_Client_System32_Files.fgl
-echo file4=%SYSTEMROOT%\system32\mfco42d.dll >> Light95_Client_System32_Files.fgl
-echo file5=%IS5_DEST%\root.client\usr\vice\etc\afs_cpa.cpl >> Light95_Client_System32_Files.fgl
+echo file1=%MSVCDIR%\REDIST\Mfc42.dll >> Light95_Client_System32_Files.fgl
+echo file2=%IS5_DEST%\root.client\usr\vice\etc\afs_cpa.cpl >> Light95_Client_System32_Files.fgl
 echo.  >> Light95_Client_System32_Files.fgl
 echo [General] >> Light95_Client_System32_Files.fgl
 echo Type=FILELIST >> Light95_Client_System32_Files.fgl
@@ -290,7 +281,6 @@ rem -------------- Server_System32_Files.fgl ---------------------------
 echo [TopDir] > Server_System32_Files.fgl
 echo file0=%IS5_DEST%\root.server\usr\afs\bin\afsserver.cpl >> Server_System32_Files.fgl
 echo file1=%MSVCDIR%\REDIST\Msvcrt.dll >> Server_System32_Files.fgl
-echo file2=%SYSTEMROOT%\system32\Msvcrtd.dll >> Server_System32_Files.fgl
 echo.  >> Server_System32_Files.fgl
 echo [General] >> Server_System32_Files.fgl
 echo Type=FILELIST >> Server_System32_Files.fgl
@@ -346,7 +336,6 @@ rem -------------- Control_Center_System32_Files.fgl--------------------
 echo [TopDir] > Control_Center_System32_Files.fgl
 echo file0=%IS5_DEST%\root.client\usr\vice\etc\afs_cpa.cpl >> Control_Center_System32_Files.fgl
 echo file1=%MSVCDIR%\REDIST\Msvcrt.dll >> Control_Center_System32_Files.fgl
-echo file2=%SYSTEMROOT%\system32\Msvcrtd.dll >> Control_Center_System32_Files.fgl
 echo.  >> Control_Center_System32_Files.fgl
 echo [General] >> Control_Center_System32_Files.fgl
 echo Type=FILELIST >> Control_Center_System32_Files.fgl
@@ -373,12 +362,12 @@ call :Generate_Release_Notes_File_Group
 rem Trad_Chinese
 set FILEGROUP=Release_Notes_Trad_Chinese_Files.fgl
 set IS5_DOC=%IS5_DOCROOT%\install\Documentation\zh_TW
-call :Generate_Release_Notes_File_Group
-
-rem Simp_Chinese
-set FILEGROUP=Release_Notes_Simp_Chinese_Files.fgl
-set IS5_DOC=%IS5_DOCROOT%\install\Documentation\zh_CN
-call :Generate_Release_Notes_File_Group
+call :Generate_Release_Notes_File_Group\r
+\r
+rem Simp_Chinese\r
+set FILEGROUP=Release_Notes_Simp_Chinese_Files.fgl\r
+set IS5_DOC=%IS5_DOCROOT%\install\Documentation\zh_CN\r
+call :Generate_Release_Notes_File_Group\r
 
 rem German
 set FILEGROUP=Release_Notes_German_Files.fgl
@@ -428,8 +417,8 @@ rem -------------- Generate the Install Guide file groups ---------------
 
 rem English
 set FILEGROUP=Install_Guide_English_Files.fgl
-set IS5_DOC=%IS5_DOCROOT%\install\Documentation\en_US\Html
-call :Generate_Install_Guide_File_Group
+set IS5_DOC=%IS5_DOCROOT%\install\Documentation\en_US\Html\r
+call :Generate_Install_Guide_File_Group\r
 
 rem Japanese
 set FILEGROUP=Install_Guide_Japanese_Files.fgl
@@ -448,9 +437,9 @@ call :Generate_Install_Guide_File_Group
 
 rem Simp_Chinese
 set FILEGROUP=Install_Guide_Simp_Chinese_Files.fgl
-set IS5_DOC=%IS5_DOCROOT%\install\Documentation\zh_CN\Html
+set IS5_DOC=%IS5_DOCROOT%\install\Documentation\zh_CN\Html\r
 call :Generate_Install_Guide_File_Group
-
+\r
 rem German
 set FILEGROUP=Install_Guide_German_Files.fgl
 set IS5_DOC=%IS5_DOCROOT%\install\Documentation\de_DE\Html
@@ -465,10 +454,10 @@ rem Portuguese
 set FILEGROUP=Install_Guide_Portuguese_Files.fgl
 set IS5_DOC=%IS5_DOCROOT%\install\Documentation\pt_BR\Html
 call :Generate_Install_Guide_File_Group
-
+\r
 goto Sys_Admin_Guide_Files
 
-:Generate_Install_Guide_File_Group
+:Generate_Install_Guide_File_Group\r
 echo [TopDir] > %FILEGROUP%
 echo file0=%IS5_DOC%\InstallGd\awqbg000.htm >> %FILEGROUP%
 echo file1=%IS5_DOC%\InstallGd\awqbg002.htm >> %FILEGROUP%
@@ -932,21 +921,21 @@ set IS5_LANG=ko_KR
 set IS5_DOC=%IS5_DOCROOT%\install\Documentation\ko_KR\Html
 call :Generate_Doc_Misc_File_Group
 copy %AFSROOT%\src\WINNT\license\lang\%IS5_LANG%.rtf %AFSROOT%\src\WINNT\install\InstallShield5\lang\%IS5_LANG%\license.rtf
-
+\r
 rem Trad_Chinese
 set FILEGROUP=Doc_Misc_Trad_Chinese_Files.fgl
 set IS5_LANG=zh_TW
 set IS5_DOC=%IS5_DOCROOT%\install\Documentation\zh_TW\Html
 call :Generate_Doc_Misc_File_Group
-copy %AFSROOT%\src\WINNT\license\lang\%IS5_LANG%.rtf %AFSROOT%\src\WINNT\install\InstallShield5\lang\%IS5_LANG%\license.rtf
-
+copy %AFSROOT%\src\WINNT\license\lang\%IS5_LANG%.rtf %AFSROOT%\src\WINNT\install\InstallShield5\lang\%IS5_LANG%\license.rtf\r
+\r
 rem Simp_Chinese
 set FILEGROUP=Doc_Misc_Simp_Chinese_Files.fgl
 set IS5_LANG=zh_CN
 set IS5_DOC=%IS5_DOCROOT%\install\Documentation\zh_CN\Html
 call :Generate_Doc_Misc_File_Group
 copy %AFSROOT%\src\WINNT\license\lang\%IS5_LANG%.rtf %AFSROOT%\src\WINNT\install\InstallShield5\lang\%IS5_LANG%\license.rtf
-
+\r
 rem German
 set FILEGROUP=Doc_Misc_German_Files.fgl
 set IS5_LANG=de_DE
@@ -970,7 +959,7 @@ copy %AFSROOT%\src\WINNT\license\lang\%IS5_LANG%.rtf %AFSROOT%\src\WINNT\install
 
 goto Doc_Files
 
-:Generate_Doc_Misc_File_Group
+:Generate_Doc_Misc_File_Group\r
 echo [TopDir] > %FILEGROUP%
 echo file0=%IS5_DOC%\banner.gif >> %FILEGROUP%
 echo file1=%IS5_DOC%\books.gif >> %FILEGROUP%
@@ -1262,7 +1251,7 @@ echo file0=%IS5_INCL%\afs\afs_args.h >> Client_Afs_Header_Files.fgl
 echo file1=%IS5_INCL%\afs\debug.h >> Client_Afs_Header_Files.fgl
 echo file2=%IS5_INCL%\afs\param.h >> Client_Afs_Header_Files.fgl
 echo file3=%IS5_INCL%\afs\afs_sysnames.h >> Client_Afs_Header_Files.fgl
-echo file4=%IS5_INCL%\afs\bnode.h >> Client_Afs_Header_Files.fgl
+echo file4=%IS5_INCL%\afs\permit_xprt.h >> Client_Afs_Header_Files.fgl
 echo file5=%IS5_INCL%\afs\stds.h >> Client_Afs_Header_Files.fgl
 echo file6=%IS5_INCL%\afs\icl.h >> Client_Afs_Header_Files.fgl
 echo file7=%IS5_INCL%\afs\procmgmt.h >> Client_Afs_Header_Files.fgl
@@ -1349,6 +1338,7 @@ echo file87=%IS5_INCL%\afs\volser.h >> Client_Afs_Header_Files.fgl
 echo file88=%IS5_INCL%\afs\volint.h >> Client_Afs_Header_Files.fgl
 echo file89=%IS5_INCL%\afs\fs_stats.h >> Client_Afs_Header_Files.fgl
 echo file90=%IS5_INCL%\afs\bosint.h >> Client_Afs_Header_Files.fgl
+echo file91=%IS5_INCL%\afs\bnode.h >> Client_Afs_Header_Files.fgl
 echo. >> Client_Afs_Header_Files.fgl
 echo [General] >> Client_Afs_Header_Files.fgl
 echo Type=FILELIST >> Client_Afs_Header_Files.fgl
@@ -1425,3 +1415,4 @@ echo [General] >> Client_Sample_Files.fgl
 echo Type=FILELIST >> Client_Sample_Files.fgl
 echo Version=1.00.000 >> Client_Sample_Files.fgl
 
+:EOF\r
index db7f8f3abd991f8b3ebebf248a7f0b7bfb2e2fc4..c679e5ad7776d45b92a279ea7895414c507e6845 100644 (file)
@@ -22,9 +22,16 @@ prep: $(CELLSERVDB) AFS_component_version_number.txt
     CompileScript.bat
 
 build:
-    BuildSetup.bat
-    xcopy/s/e "Media\Transarc AFS\Disk Images\disk1\*.*" $(DESTDIR)\WinInstall
-    copy AFS_component_version_number.txt $(DESTDIR)\WinInstall\Version.txt
-    del /q "Media\Transarc AFS\Disk Images\disk1\*.*"
+    BuildSetup.bat\r
+    xcopy/s/e/y "Media\Transarc AFS\Disk Images\disk1\*.*" $(DESTDIR)\WinInstall
+    copy AFS_component_version_number.txt $(DESTDIR)\WinInstall\Version.txt\r
+    $(DEL) /q "Media\Transarc AFS\Disk Images\disk1\*.*"
+!IF ((EXIST("$(ISWEB)")) &&("$(ISWEB)"!=""))\r
+!      IF (!EXIST($(DESTDIR)\Wininstall\PackageWeb))
+               $(MKDIR) $(DESTDIR)\Wininstall\PackageWeb
+!      ENDIF
+       $(DEL) /q $(DESTDIR)\Wininstall\PackageWeb\*.*\r
+       $(ISWEB)\Pftwwiz.exe $(AFSROOT)\src\winnt\install\InstallShield5\PackageWeb.pfw -s -a \r
+!ENDIF\r
 
 install: prep build
index a088d556ca352855fbc44aa46b65900b0651bb65..65364751dac87de46e7394f8f31b2361e486bbaa 100644 (file)
@@ -1,5 +1,3 @@
-# This file must change to specify a cell.
-# The "511.01.01.01" represents an IP address.
 >PutCellNameHere              # CellName Comment
 511.01.01.01                   #DBServerMachineName1
 511.02.02.02                   #DBServerMachineName2
index 1fbc3fd404d29d9d0e614d6c40d18e2f68e2e6cc..aab0f0f60beb0045c735605f6f6116724a7c8b4b 100644 (file)
@@ -3,34 +3,34 @@ DEFAULT_INSTALL_DIR=IBM\AFS
 NOTHING_SELECTED_MSG=You must select something to install before continuing.
 DOWNGRADE_LIGHT_CLIENT_MSG=Downgrade AFS Light Client
 SETUP_FINISHED_MSG=Setup has finished installing AFS® for Windows on your computer.
-TITLE_MAIN=AFS® for Windows 3.6
-SEVERE_DIALOG_TITLE=AFS® for Windows
+TITLE_MAIN=Open AFS for Windows 1.0 4.01
+SEVERE_DIALOG_TITLE=Open AFS for Windows
 UPGRADE_CLIENT_MSG=Upgrade AFS Client
-PRODUCT_VERSION_MINOR=6
+PRODUCT_VERSION_MINOR=0
 CONFIGURING_AFS_CLIENT_SERVICE=Configuring the AFS Client service
 PRODUCT_NAME_CC=AFS Control Center
 PRODUCT_NAME_SERVER=AFS Server
 UPGRADE_CC_MSG=Upgrade AFS Control Center
 DOWNGRADE_SERVER_MSG=Downgrade AFS Server
-UNINST_DISPLAY_NAME_LIGHT_CLIENT=AFS Light 3.6
+UNINST_DISPLAY_NAME_LIGHT_CLIENT=AFS Light 1.0 4.01
 PRODUCT_NAME_LIGHT_CLIENT=AFS Light
 ERROR_COMPONENT=Component:
 COMPANY_NAME=TransarcCorporation
 REINSTALL_CLIENT_MSG=Reinstall AFS Client
 DOWNGRADE_CC_MSG=Downgrade AFS Control Center
-UNINST_DISPLAY_NAME_DOCS=AFS Supplemental Documentation 3.6
+UNINST_DISPLAY_NAME_DOCS=AFS Supplemental Documentation 1.0 4.01
 UNINST_KEY_SERVER=AFS Server
 VIEW_README_PROMPT_MSG=View the readme file
 INSTALL_LIGHT_CLIENT_MSG=AFS Light Client
-PRODUCT_VERSION_TITLE=3.6
-UNINST_DISPLAY_NAME_CC=AFS Control Center 3.6
+PRODUCT_VERSION_TITLE=1.0 4.01
+UNINST_DISPLAY_NAME_CC=AFS Control Center 1.0 4.01
 ERROR_FILEGROUP=File Group:
 ERROR_MOVEDATA=An error occurred during the move data process: %d
 CONFIGURING_AFS_SERVER_SERVICE=Configuring the AFS Server service
 CLIENT_DESC=AFS Client
 SET_NETWORK_PROVIDER_ERROR=Unable to configure the AFS Client as a Network Provider.
-PRODUCT_VERSION_MAJOR=3
-UNINST_DISPLAY_NAME_SERVER=AFS Server 3.6
+PRODUCT_VERSION_MAJOR=1
+UNINST_DISPLAY_NAME_SERVER=AFS Server 1.0 4.01
 SETUPUTILS_NOT_FOUND=The file InstallUtils.dll could not be loaded.  Setup cannot continue.
 LIGHT_CLIENT_ALREADY_INSTALLED_MSG=AFS Light is already installed on this computer.
 SETUP_TYPE_MSG=Select the AFS® for Windows products that you wish to install:
@@ -68,13 +68,13 @@ UNINST_KEY_CC=AFS Control Center
 UNINST_KEY_CLIENT=AFS Client
 UPGRADE_DOCS_MSG=Upgrade AFS Supplemental Documentation
 DOWNGRADE_PREP_MSG=Preparing to downgrade the %s.  Please wait...this may be a lengthy process.
-PRODUCT_VERSION_PATCH_LEVEL=0
+PRODUCT_VERSION_PATCH_LEVEL=401
 NON_UPGRADABLE_SOFTWARE_INSTALLED_ERROR_MSG=Non-upgradable versions of this product are installed on your computer.  These \nversions must be uninstalled before the current versions can be installed.
 CANT_INSTALL_BOTH_CLIENTS_MSG=Please select only one of the AFS Clients to install.  You cannot install both.
 UNINST_KEY_LIGHT_CLIENT=AFS Light
 UPGRADE_LIGHT_CLIENT_MSG=Upgrade AFS Light Client
 UNINST_KEY_DOCS=AFS Supplemental Documentation
-UNINST_DISPLAY_NAME_CLIENT=AFS Client 3.6
+UNINST_DISPLAY_NAME_CLIENT=AFS Client 1.0 4.01
 REINSTALL_DOCS_MSG=Reinstall AFS Supplemental Documentation
 UPGRADE_PREP_MSG=Preparing to upgrade the %s.  Please wait...this may be a lengthy process.
 MUST_BE_AN_ADMIN_MSG=You must be a member of the local Administrators group on this Windows system in order to install this product.
index 6cefd61a1af7bf4041f9ae414b321c98d9657093..eba949add63a8d64effded3ebce87cddbea2ff38 100644 (file)
Binary files a/src/WINNT/install/InstallShield5/setup.bmp and b/src/WINNT/install/InstallShield5/setup.bmp differ
index a9a6b45af65238d633b616d110dd6678a9078ed2..6c4472191b16c3d2fbe17372e8503d779538b043 100644 (file)
@@ -1,6 +1,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-// Copyright (C) 1998  Transarc Corporation.
+// Copyright (C) 1998  OpenAFS
 // All rights reserved.
 //
 //
@@ -16,6 +16,7 @@
     #include "sdlang.h"
     #include "sddialog.h"
 
+
 ////////////////////// string defines ////////////////////////////
 
        // If the user places a file with this name in the same directory as
@@ -2056,12 +2057,16 @@ end;
 ///////////////////////////////////////////////////////////////////////////////
 function AddPath(szPath)
 begin
-    LongPathToShortPath(szPath);
-
-    if (AddToPath(szPath) < 0) then
-        ShowError(@ADD_PATH_ERROR, WARNING);
+   LongPathToShortPath(szPath);
+   if (bWin98 || bWin95) then
+          if (EzBatchAddPath ("Path", szPath, "", AFTER) < 0) then
+                ShowError(@ADD_PATH_ERROR, WARNING);
+           endif;
+    else
+          if (AddToPath(szPath) < 0) then
+                ShowError(@ADD_PATH_ERROR, WARNING);
+           endif;
     endif;
-
        return 0;
 end;
 
@@ -2736,3 +2741,5 @@ end;
 
 
 
+
+
index 3b3837f955a8a8b8197f2c35ad2f13d3356fff5c..d0f8d46436a40f827c2f667878419ef03aafca95 100644 (file)
@@ -6,6 +6,7 @@
 #      directory or online at http://www.openafs.org/dl/license10.html
 
 
+
 !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME)
 !INCLUDE ..\..\..\config\NTMakefile.version
 OUTDIR = $(DESTDIR)\WinInstall
@@ -14,12 +15,10 @@ OUTDIR = $(DESTDIR)\WinInstall
 
 COMPONENTS = \
        INSTALL.BAT \
-       UNINSTALL.BAT \
        afsd.pif \
        cellservdb \
-       readme.doc \
+       readme.RTF \
        license.txt \
-       AFSD.EXE \
        templet.reg \
        runonce.pif \
        $(DESTDIR)\bin\util_cr.exe \
@@ -38,11 +37,11 @@ COMPONENTS = \
        $(DESTDIR)\lib\win95\pthread.dll \
        $(DESTDIR)\lib\afsrpc.dll
                
-
-$(COMPONENTS)::
+$(COMPONENTS)::\r
+       $(DESTDIR)\bin\util_cr.exe ~ $@ "Missing $@"
        $(COPY) $@ $(DESTDIR)\WinInstall\.
 
-!IF (EXIST(ISBUILD.H))
+!IF (EXIST(ISBUILD.MAK))
 !INCLUDE ISBUILD.MAK
 !ENDIF
 
@@ -57,9 +56,7 @@ clean ::
     $(DEL) $(OUTDIR)\DiskIm~1\Disk1\*
     $(DEL) $(OUTDIR)\DiskIm~1\WebInstall\*
 
-.SILENT:
 prep :
-       if not exist $(DESTDIR)\WinInstall\sock.vxd $(DESTDIR)\bin\util_cr.exe ~ "SOCK.VXD is missing from $(DESTDIR)\WinInstall\."
-       if not exist $(DESTDIR)\WinInstall\mmap.vxd $(DESTDIR)\bin\util_cr.exe ~ "MMAP.VXD is missing from $(DESTDIR)\WinInstall\."
-       if not exist $(DESTDIR)\WinInstall\afsd.exe $(DESTDIR)\bin\util_cr.exe ~ "AFSD.EXE is missing from $(DESTDIR)\WinInstall\."
-
+       $(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\sock.vxd" "SOCK.VXD is missing from $(DESTDIR)\WinInstall\."
+       $(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\MMAP.vxd" "MMAP.VXD is missing from $(DESTDIR)\WinInstall\."
+       $(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\AFSD.EXE" "AFSD.EXE is missing from $(DESTDIR)\WinInstall\."
index 6473cae0e7eab2d850d354319689591a8de25342..2efcf2de2968ece50837c37aca19b59b24e9667c 100644 (file)
Binary files a/src/WINNT/license/lang/en_US.ide and b/src/WINNT/license/lang/en_US.ide differ
index 3d332712508776356e6db834ab36e6b70daf1c82..fc2aa88f0cf296c08475b404b3b26e958f45df68 100644 (file)
@@ -44,9 +44,9 @@ $(PTHR95_DLLFILE): $(PTHR95_DLLOBJS)
 pthread_95.obj: pthread.c
        $(C2OBJ) pthread.c -DAFS_WIN95_ENV /Fopthread_95.obj
 
-install: $(PTHR_DLLFILE) $(LIBINCLUDES)
-
-install9x: $(PTHR95_DLLFILE) install
+install: $(PTHR95_DLLFILE) $(PTHR_DLLFILE) $(LIBINCLUDES)
+\r
+install9x: install\r
 
 pthread.res: pthread.rc AFS_component_version_number.h
        $(RC) $*.rc
index 9bb79336ab4598b56cb98d2dad0dbb4d349d6871..4f4c1404ba2389d5f0d98edcf3efa011098db831 100644 (file)
@@ -47,6 +47,9 @@ RSC=rc.exe
 
 HLPDIR= .\HELP
 
+prep : 
+       $(DESTDIR)\bin\util_cr.exe ~ "$(MSSDK)\Include\windows.h" "MSSDK must point to SDK include headers "
+
 !IF  "$(AFSDEV_BUILDTYPE)" == "FREE"
 
 INTDIR=.
@@ -54,7 +57,7 @@ HLP=hcrtf.exe
 HLP_PROJ = /x
 # Begin Custom Macros
 # End Custom Macros
-
+\r
 INSTALL : prep "$(OUTDIR)\WinAfsLoad.exe" "$(OUTDIRHLP)\afswin9x.HLP" "$(OUTDIR)\afswin9x.CNT"
 
 CLEAN ::
@@ -330,7 +333,3 @@ SOURCE=.\WinAfsLoadDlg.cpp
 
 install9x: install
 
-.SILENT:
-prep : 
-       if not exist $(MSSDK)\Include\$(NULL) $(DESTDIR)\bin\util_cr.exe ~ "MSSDK must point to SDK include headers "
-
index 0a06bf9ba9056b1a2e67f9692b1955156ab2ddc1..fc57153ecd0f5d841494f2832ef0336b6cfc4859 100644 (file)
@@ -13,8 +13,8 @@ DESTDIR=DEST/
 SRCDIR=DEST/
 
 # compilation and link editor flags
-DBG=-g
-#OPTMZ=-O2
+#DBG=-g
+OPTMZ=-O2
 #PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
 # Put -O2 here to _ensure_ all Makefiles pick it up.
 XCFLAGS= ${DBG} -Dfds_bits=fd_bits
index 6d1673a9d0b140249c34d6638796c85c7947f6f7..9d27966e789aae27968ee376b75d617ed0c338d1 100644 (file)
@@ -26,7 +26,7 @@ INCFILES =\
        $(INCFILEDIR)\afs_sysnames.h \
        $(INCFILEDIR)\stds.h \
        $(INCFILEDIR)\icl.h 
-
+\r
 
 $(INCFILEDIR)\param.h: param.$(SYS_NAME).h
        $(COPY) $? $@
@@ -90,7 +90,29 @@ idirs: doclink
                $(MKDIR) $(DESTDIR)\root.client\usr\vice\etc
 !      ENDIF
 
-
+INCCOPY = \\r
+       $(DESTDIR)\bin\rmbat.bat \\r
+       $(DESTDIR)\bin\rmbat.rsp \\r
+       $(DESTDIR)\bin\NTBUILD.bat\r
+\r
+$(DESTDIR)\bin\rmbat.bat:..\rmbat.bat\r
+       $(COPY) $? $@
+       util_cr + $@
+\r
+$(DESTDIR)\bin\rmbat.rsp:..\rmbat.rsp\r
+       $(COPY) $? $@
+\r
+$(DESTDIR)\bin\NTBUILD.bat:..\NTBUILD.bat\r
+       $(COPY) $? $@
+       util_cr + $@
+\r
+$(DESTDIR)\bin\NTLang.bat: NTLang.bat util_cr.exe
+       $(COPY) NTLang.bat $(DESTDIR)\bin
+       util_cr + $(DESTDIR)\bin\NTLang.bat
+\r
+$(DESTDIR)\NTDllmap.txt:NTDllmap.txt\r
+       $(COPY) $? $@
+\r
 # Create link to docs needed for media build; allow to fail in case
 # symlink not available, e.g. if using a 3.4a client, since most builds
 # aren't media builds.
@@ -111,34 +133,29 @@ NTMakefile.version: NTMakefile.version-CML NTMakefile.version-NOCML
                $(COPY) NTMakefile.version-NOCML NTMakefile.version
 !      ENDIF
 
-$(DESTDIR)\bin\util_cr.exe: util_cr.exe
-       $(COPY) util_cr.exe $(DESTDIR)\bin
-
-$(DESTDIR)\bin\touch.exe: touch.exe
-       $(COPY) touch.exe $(DESTDIR)\bin
-
-$(DESTDIR)\bin\mkvers.exe: mkvers.exe
-       $(COPY) mkvers.exe $(DESTDIR)\bin
-
-
-$(DESTDIR)\NTDllmap.txt: NTDllmap.txt
-       $(COPY) NTDllmap.txt $(DESTDIR)
-
-
-# $$$: make CR/LF when doing copy here
-$(DESTDIR)\bin\NTLang.bat: NTLang.bat util_cr.exe
-       $(COPY) NTLang.bat $(DESTDIR)\bin
-       util_cr + $(DESTDIR)\bin\NTLang.bat
-
-util_cr.obj : util_cr.c
-       $(cc) $(cflags) $(cdebug) $(cvarsdll) $(afscflags) $(afscdefs) $*.c
-
+INCTOOLS = \\r
+       $(DESTDIR)\bin\mkvers.exe \\r
+       $(DESTDIR)\bin\util_cr.exe \\r
+       $(DESTDIR)\bin\touch.exe\r
+\r
+#mkvers.exe : mkvers.obj
+#      $(EXECONLINK)
+\r
+$(DESTDIR)\bin\mkvers.exe:mkvers.exe\r
+       $(COPY) mkvers.exe $(DESTDIR)\bin\.
+
+$(DESTDIR)\bin\util_cr.exe:util_cr.exe\r
+       $(COPY) util_cr.exe $(DESTDIR)\bin\.
+\r
 util_cr.exe : util_cr.obj
        $(EXECONLINK)
+\r
+$(DESTDIR)\bin\touch.exe:touch.exe\r
+       $(COPY) touch.exe $(DESTDIR)\bin\.
 
 langsetup: $(DESTDIR)\bin\NTLang.bat
 
-install: idirs version $(DESTDIR)\bin\touch.exe $(DESTDIR)\bin\util_cr.exe $(INCFILES) $(DESTDIR)\NTDllmap.txt langsetup
+install: idirs $(INCTOOLS) $(INCCOPY) version $(INCFILES) $(DESTDIR)\NTDllmap.txt langsetup 
 
 install9x: install
 
@@ -149,4 +166,9 @@ clean_version:
 
 clean::
        $(DEL) $(DESTDIR)\LIB\*.DLL
-       $(DEL) $(DESTDIR)\bin\mkvers.exe
\ No newline at end of file
+       $(DEL) $(DESTDIR)\bin\mkver.exe\r
+       $(DEL) $(DESTDIR)\bin\touch.exe\r
+       $(DEL) $(DESTDIR)\bin\util_cr.exe\r
+       $(DEL) mkver.exe\r
+       $(DEL) touch.exe\r
+       $(DEL) util_cr.exe
\ No newline at end of file
index d5e3428a412b70b3feebb6b958d46d6354db2f1f..54b095fe7937894b40d32ee48f0d5b19ba1408cd 100644 (file)
@@ -114,6 +114,7 @@ DESTDIR = $(AFSROOT)\DEST
 # Command macros.
 COPY = copy
 DEL = -del
+#DEL = $(DESTDIR)\BIN\rmbat       # win 98 must use batch file
 MKDIR = mkdir
 REN = ren
 ECHO = echo
index a5b801b9979d6d37893eb4ff2fd57517243847ee..22e2feb952768e385f99b49abae0562cbd13f37b 100644 (file)
@@ -124,7 +124,7 @@ DESTDIR = $(AFSROOT)\DEST
 COPY = copy
 #DEL = del
 #DEL = rm -f       # to delete multiple files on one command line
-DEL = $(AFSROOT)\src\rmbat        # win 98 must use batch file
+DEL = $(DESTDIR)\BIN\rmbat        # win 98 must use batch file
 MKDIR = mkdir
 REN = ren
 ECHO = echo
index 1b05d795ac481e265dff3407f7dbe75b6f15c8d5..ded70a5e507cba5245fb78e3b2089c8cb6de19aa 100644 (file)
@@ -9,7 +9,8 @@
 */
 
 #include "stdio.h"
-#include "io.h"
+#include "io.h"\r
+#include <assert.h>
 #include "string.h"
 #include "process.h"
 #include "windows.h"
@@ -23,7 +24,7 @@ void usuage()
        OR util_cr * \"-[register key value]\" ; aremove register key value\n\
        OR util_cr & file.ini \"SectionKey=value\" ; update ini-ipr-pwf file\n\
        OR util_cr ~  ;force error\n");
-       exit(1);
+       exit(0xc000);
 }
 
 
@@ -46,7 +47,7 @@ void Addkey (const char *hkey,const char *subkey,const char *stag,const char *sv
        if(!result)
        {
                printf("AFS Error - Could Not create a registration key\n");
-               exit(1);
+               exit(0xc000);
        }
        if (stag==NULL) return;
        if ((sval)&&(strlen(sval)))
@@ -65,7 +66,7 @@ void Addkey (const char *hkey,const char *subkey,const char *stag,const char *sv
        if(result!=ERROR_SUCCESS)
        {
                printf("AFS Error - Could Not create a registration key\n");
-               exit(1);
+               exit(0xc000);
        }
 }
 
@@ -85,7 +86,7 @@ void Subkey(const char *hkey,const char *subkey)
        if(result!=ERROR_SUCCESS)
        {
                printf("AFS Error - Could Not create a registration key\n");
-               exit(1);
+               exit(0xc000);
        }
 }
 
@@ -96,13 +97,16 @@ int main(int argc, char* argv[])
        int l,i;
        char **pvar,*ch;
        long len;
-       typedef char * CHARP;
+       typedef char * CHARP;\r
 
        if (argc<3)
                usuage();
        if (strcmp(argv[1],"~")==0)
-       {
-               exit(2);
+       {       //check for file presence\r
+               if (fopen(argv[2],"r"))\r
+                       return(0);
+               printf("Error---%s\n",argv[3]);\r
+               exit(0xc000);
        }
        if (strcmp(argv[1],"*")==0)
        {               /* "[HKEY_CLASSES_ROOT\CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}]  @=AFS Client Shell Extension" */
@@ -117,7 +121,7 @@ int main(int argc, char* argv[])
                        if ((ssub==NULL) || (skey==NULL))
                        {
                                printf("format error parameter %s\n",argv[i]);
-                               exit(1);
+                               exit(0xc000);
                        }
                        option=(*ssub=='-');
                        stag=strtok(NULL,"\0");
@@ -158,7 +162,7 @@ int main(int argc, char* argv[])
                        if ((ssect==NULL) || (skey==NULL))
                        {
                                printf("format error parameter %s\n",argv[i]);
-                               exit(1);
+                               exit(0xc000);
                        }
                        while(*skey==' ') 
                                skey++;
@@ -167,9 +171,9 @@ int main(int argc, char* argv[])
                        if (sval==NULL)
                        {
                                printf("format error parameter %s\n",argv[i]);
-                               exit(1);
+                               exit(0xc000);
                        }
-                       printf("parameters %s %s %s %s\n",ssect,skey,sval,argv[2]);
+//                     printf("parameters %s %s %s %s\n",ssect,skey,sval,argv[2]);
                        if (WritePrivateProfileString(ssect,skey,sval,argv[2])==0)
                        {
                                LPVOID lpMsgBuf;
@@ -186,7 +190,7 @@ int main(int argc, char* argv[])
                                );
                                printf("Error writing profile string - %s",lpMsgBuf);
                                LocalFree( lpMsgBuf );
-                               exit(1);
+                               exit(0xc000);
                        }
                        argc-=1;
                }
@@ -197,7 +201,7 @@ int main(int argc, char* argv[])
        {
                file=fopen(fname,"rb");
                if (file==NULL)
-                       exit(2);
+                       exit(0xc000);
                len=filelength(_fileno(file));
                ch=(char *)malloc(len+2);
                *ch++=0;        /* a small hack to allow matching /r/n if /n is first character*/
@@ -220,7 +224,7 @@ int main(int argc, char* argv[])
                strcpy(fname,argv[2]);
                file=fopen(fname,"rb");
                if (file==NULL)
-                       exit(2);
+                       exit(0xc000);
                len=filelength(_fileno(file));
                ch=(char *)malloc(len+1);
                len=fread(ch,sizeof(char),len,file);
@@ -238,7 +242,7 @@ int main(int argc, char* argv[])
                strcat(fname,".et");
        file=fopen(fname,"rb");
        if (file==NULL)
-               exit(2);
+               exit(0xc000);
        len=filelength(_fileno(file));
        ch=(char *)malloc(len+1);
        len=fread(ch,sizeof(char),len,file);
index d5e5ad7b08b824668be4b856b599bd85e4aa6dd1..eec4a84a5f61358cb2c0f7f0c3b5833f21173f22 100644 (file)
@@ -17,6 +17,7 @@
 #include <sys/types.h>
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
+#define snprintf _snprintf
 #else
 #include <sys/socket.h>
 #include <netdb.h>
index 4c7f9fc5a3a47499ac66bc069841ec5f5cc2ee52..d24af7c895a9e5111bdb5b93e55fe346bca9df43 100644 (file)
@@ -8,9 +8,9 @@
  */
 
 #define        IGNORE_STDS_H   1
-#ifndef AFS_DJGPP_ENV
+/*#ifndef AFS_DJGPP_ENV*/
 #include <afs/param.h>
-#endif /* AFS_DJGPP_ENV */
+/*#endif /* AFS_DJGPP_ENV */
 
 #if defined(RIOS)
 
@@ -1187,14 +1187,23 @@ LEAF(returnto,1)
        .set    newsp,16
 
 
+#ifdef AFS_DJGPP_ENV
+.globl _PRE_Block
+.globl _savecontext
+_savecontext:
+#else
 .globl PRE_Block
 .globl savecontext
-
 savecontext:
+#endif /* AFS_DJGPP_ENV */
        pushl   %ebp                    /* New Frame! */
        movl    %esp,%ebp
        pusha                           /* Push all registers */
+#ifdef AFS_DJGPP_ENV
+       movl    $1,_PRE_Block           /* Pre-emption code */
+#else
        movl    $1,PRE_Block            /* Pre-emption code */
+#endif /* AFS_DJGPP_ENV */
        movl    area1(%ebp),%eax        /* eax = base of savearea */
        movl    %esp,(%eax)             /* area->topstack = esp */
        movl    newsp(%ebp),%eax        /* get new sp into eax */
@@ -1206,7 +1215,11 @@ L1:
 
 /* Shouldnt be here....*/
 
+#ifdef AFS_DJGPP_ENV
+       call    _abort
+#else
        call    abort
+#endif /* AFS_DJGPP_ENV */
 
 /*
  * returnto(area2)
@@ -1216,21 +1229,33 @@ L1:
 /* stack offset */
        .set    area2,8
 
+#ifdef AFS_DJGPP_ENV
+.globl _returnto
+_returnto:
+#else
 .globl returnto
-
 returnto:
+#endif /* AFS_DJGPP_ENV */
        pushl   %ebp
        movl    %esp, %ebp              /* New frame, to get correct pointer */
        movl    area2(%ebp),%eax        /* eax = area2 */
        movl    (%eax),%esp             /* restore esp */
        popa 
+#ifdef AFS_DJGPP_ENV
+       movl    $0,_PRE_Block           /* clear it up... */
+#else
        movl    $0,PRE_Block            /* clear it up... */
+#endif /* AFS_DJGPP_ENV */
        popl    %ebp
        ret
 
 /* I see, said the blind man, as he picked up his hammer and saw! */
        pushl   $1234
+#ifdef AFS_DJGPP_ENV
+       call    _abort
+#else
        call    abort
+#endif /* AFS_DJGPP_ENV */
 
 
 #endif /* AFS_NCR_ENV */
index 08148a7dc75fedf5c3991268ee7db84c9cc783a0..ccc332870ca16d2837046969ace7ae914c3c21a5 100644 (file)
@@ -11,6 +11,6 @@ if [%1]==[-f] shift
 if [%1]==[/f] shift
 if [%1]==[-F] shift
 if [%1]==[/F] shift
-if not [%1]==[] del %1 <%AFSROOT%\src\rmbat.rsp
+if not [%1]==[] del %1 <%AFSROOT%\DEST\BIN\rmbat.rsp
 if not [%1]==[] shift
-if not [%1]==[] %AFSROOT%\src\rmbat %1 %2 %3 %4 %5 %6 %7 %8 
+if not [%1]==[] %AFSROOT%\DEST\BIN\rmbat %1 %2 %3 %4 %5 %6 %7 %8 
index 975fbec8256d3e8a3797e7a3611380f27c49f4ac..5758d80da18237cc9e7b00b928e906bb0a1cfff9 100644 (file)
@@ -1 +1 @@
-y
+y\r
index ec83898a9a618d7b9cdc34a0c4ad9e2b1402661d..18739c4f983ac473592cb9d18f249d9431a0ae63 100644 (file)
@@ -37,11 +37,11 @@ XMIT_H = rx_xmit_nt.h
 
 XDROBJS_djgpp = xdr.o xdr_rec.o xdr_stdio.o \
        xdr_float.o  xdr_refernce.o  xdr_update.o \
-       xdr_array.o xdr_mem.o 
+       xdr_array.o xdr_mem.o xdr_rx.o xdr_afsuuid.o
 
 RXOBJS_djgpp = rx_clock.o rx_event.o rx_user.o rx_lwp.o rx.o rx_null.o rx_globals.o \
                rx_getaddr.o rx_misc.o rx_packet.o rx_rdwr.o  rx_trace.o rx_conncache.o \
-               $(XMIT)
+               xdr_int64.o $(XMIT)
 
 BASICINCLS = ${SRCDIR}include/lwp.h ${SRCDIR}include/lock.h \
             rx_clock.h rx_queue.h rx_event.h
index fa2981f85c8e00d37a9d4f1c55e629f7a6727be5..8be9093b9eeb85f27960b15396a72219e4382f75 100644 (file)
@@ -21,6 +21,7 @@
 #include <osi.h>
 
 #include <cm.h>
+#include <cm_dir.h>
 #include <cm_cell.h>
 #include <cm_user.h>
 #include <cm_conn.h>
@@ -28,9 +29,8 @@
 #include <cm_buf.h>
 #include <cm_utils.h>
 #include <cm_ioctl.h>
-
+\r
 #include <smb.h>
-#include <cm.h>
 #include <pioctl_nt.h>
 
 static char AFSConfigKeyName[] =
index 1a859162a3c8b0314cfc8c9e3917e0535083437d..6848183f0bb0b4a47bbbc1e3e87fbaf82c1db800 100644 (file)
@@ -47,8 +47,8 @@ BUTMINCLUDE = -I$(DESTDIR)\include
 BUTCOBJS   = dbentries.obj tcprocs.obj lwps.obj tcmain.obj list.obj recoverDb.obj \
             tcudbprocs.obj dump.obj tcstatus.obj butc_xbsa.obj \
              $(LWPOBJS) $(BUCOORDOBJS)
-BUTCINCLUDE= -I. -I$(DESTDIR)\include -I$(XBSADIR)\
-BUTCLIBS   = $(DESTDIR)\lib\afs\afsbudb.lib \
+BUTCINCLUDE= -I. -I$(DESTDIR)\include -I$(XBSADIR)
+BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib  \
             $(DESTDIR)\lib\afs\afsbubasics.lib \
             $(VOLSERLIBS) \
              $(BUTMLIBS) \
@@ -93,7 +93,7 @@ include ..\config\NTMakefile.version
 # nmake /nologo /f ntmakefile install
 #----------------------------------------------- BUTC
 
-$(BUTCEXE): $(BUTCOBJS) $(BUTCLIBS)
+$(BUTCEXE): $(BUTCOBJS) $(BUTCLIBS)\r
        $(EXECONLINK)
        $(EXEPREP)