Index: openafs/src/JAVA/libjafs/File.c
diff -c openafs/src/JAVA/libjafs/File.c:1.4.4.1 openafs/src/JAVA/libjafs/File.c:1.4.4.2
*** openafs/src/JAVA/libjafs/File.c:1.4.4.1 Tue Apr 10 14:39:44 2007
--- openafs/src/JAVA/libjafs/File.c Sun Nov 30 15:24:36 2008
***************
*** 20,25 ****
--- 20,26 ----
*/
#include
+ #include
#include
#include "Internal.h"
Index: openafs/src/WINNT/afsd/afsd_service.c
diff -c openafs/src/WINNT/afsd/afsd_service.c:1.52.4.31 openafs/src/WINNT/afsd/afsd_service.c:1.52.4.32
*** openafs/src/WINNT/afsd/afsd_service.c:1.52.4.31 Thu Nov 6 14:18:51 2008
--- openafs/src/WINNT/afsd/afsd_service.c Mon Dec 29 17:38:25 2008
***************
*** 91,96 ****
--- 91,98 ----
cm_DumpSCache(afsi_file, "a", 0);
cm_DumpBufHashTable(afsi_file, "a", 0);
smb_DumpVCP(afsi_file, "a", 0);
+ rx_DumpPackets(afsi_file, "a");
+ rx_DumpCalls(afsi_file, "a");
afsi_log("--- end dump ---");
#ifdef DEBUG
Index: openafs/src/WINNT/afsd/cm_btree.c
diff -c openafs/src/WINNT/afsd/cm_btree.c:1.1.2.22 openafs/src/WINNT/afsd/cm_btree.c:1.1.2.24
*** openafs/src/WINNT/afsd/cm_btree.c:1.1.2.22 Sun Oct 19 19:19:33 2008
--- openafs/src/WINNT/afsd/cm_btree.c Fri Dec 26 18:40:23 2008
***************
*** 1582,1588 ****
normchar_t * entry = NULL;
if (op->scp->dirBplus == NULL ||
! op->dataVersion != op->scp->dirDataVersion) {
rc = EINVAL;
goto done;
}
--- 1582,1588 ----
normchar_t * entry = NULL;
if (op->scp->dirBplus == NULL ||
! op->dataVersion > op->scp->dirDataVersion) {
rc = EINVAL;
goto done;
}
***************
*** 1678,1684 ****
LARGE_INTEGER start, end;
if (op->scp->dirBplus == NULL ||
! op->dataVersion != op->scp->dirDataVersion) {
rc = EINVAL;
goto done;
}
--- 1678,1684 ----
LARGE_INTEGER start, end;
if (op->scp->dirBplus == NULL ||
! op->dataVersion > op->scp->dirDataVersion) {
rc = EINVAL;
goto done;
}
***************
*** 2176,2182 ****
afs_uint32 count = 0, slot, numentries;
Nptr leafNode = NONODE, nextLeafNode;
Nptr firstDataNode, dataNode, nextDataNode;
! cm_direnum_t * enump;
long rc = 0;
char buffer[512];
--- 2176,2182 ----
afs_uint32 count = 0, slot, numentries;
Nptr leafNode = NONODE, nextLeafNode;
Nptr firstDataNode, dataNode, nextDataNode;
! cm_direnum_t * enump = NULL;
long rc = 0;
char buffer[512];
***************
*** 2188,2193 ****
--- 2188,2194 ----
if (scp->dirBplus == NULL) {
osi_Log0(afsd_logp, "cm_BPlusDirEnumerate No BPlus Tree");
+ rc = CM_ERROR_WOULDBLOCK;
goto done;
}
Index: openafs/src/WINNT/afsd/cm_buf.c
diff -c openafs/src/WINNT/afsd/cm_buf.c:1.31.2.46 openafs/src/WINNT/afsd/cm_buf.c:1.31.2.48
*** openafs/src/WINNT/afsd/cm_buf.c:1.31.2.46 Fri Aug 29 22:15:07 2008
--- openafs/src/WINNT/afsd/cm_buf.c Fri Nov 21 11:53:00 2008
***************
*** 217,223 ****
buf_Sync(int quitOnShutdown)
{
cm_buf_t **bpp, *bp, *prevbp;
! long wasDirty = 0;
cm_req_t req;
/* go through all of the dirty buffers */
--- 217,223 ----
buf_Sync(int quitOnShutdown)
{
cm_buf_t **bpp, *bp, *prevbp;
! afs_uint32 wasDirty = 0;
cm_req_t req;
/* go through all of the dirty buffers */
***************
*** 232,245 ****
*/
lock_ObtainMutex(&bp->mx);
! if (bp->flags & CM_BUF_DIRTY) {
/* start cleaning the buffer; don't touch log pages since
* the log code counts on knowing exactly who is writing
* a log page at any given instant.
*/
cm_InitReq(&req);
req.flags |= CM_REQ_NORETRY;
! wasDirty |= buf_CleanAsyncLocked(bp, &req);
}
/* the buffer may or may not have been dirty
--- 232,248 ----
*/
lock_ObtainMutex(&bp->mx);
! if (bp->flags & CM_BUF_DIRTY && !(bp->flags & CM_BUF_REDIR)) {
/* start cleaning the buffer; don't touch log pages since
* the log code counts on knowing exactly who is writing
* a log page at any given instant.
*/
+ afs_uint32 dirty;
+
cm_InitReq(&req);
req.flags |= CM_REQ_NORETRY;
! buf_CleanAsyncLocked(bp, &req, &dirty);
! wasDirty |= dirty;
}
/* the buffer may or may not have been dirty
***************
*** 688,697 ****
*
* Returns non-zero if the buffer was dirty.
*/
! long buf_CleanAsyncLocked(cm_buf_t *bp, cm_req_t *reqp)
{
! long code = 0;
! long isdirty = 0;
cm_scache_t * scp = NULL;
osi_hyper_t offset;
--- 691,700 ----
*
* Returns non-zero if the buffer was dirty.
*/
! afs_uint32 buf_CleanAsyncLocked(cm_buf_t *bp, cm_req_t *reqp, afs_uint32 *pisdirty)
{
! afs_uint32 code = 0;
! afs_uint32 isdirty = 0;
cm_scache_t * scp = NULL;
osi_hyper_t offset;
***************
*** 758,770 ****
break;
};
- if (!(bp->flags & CM_BUF_DIRTY)) {
- /* remove buffer from dirty buffer queue */
-
- }
-
- /* do logging after call to GetLastError, or else */
-
/* if someone was waiting for the I/O that just completed or failed,
* wake them up.
*/
--- 761,766 ----
***************
*** 773,779 ****
osi_Log1(buf_logp, "buf_WaitIO Waking bp 0x%p", bp);
osi_Wakeup((LONG_PTR) bp);
}
! return isdirty;
}
/* Called with a zero-ref count buffer and with the buf_globalLock write locked.
--- 769,779 ----
osi_Log1(buf_logp, "buf_WaitIO Waking bp 0x%p", bp);
osi_Wakeup((LONG_PTR) bp);
}
!
! if (pisdirty)
! *pisdirty = isdirty;
!
! return code;
}
/* Called with a zero-ref count buffer and with the buf_globalLock write locked.
***************
*** 960,966 ****
* have the WRITING flag set, so we won't get
* back here.
*/
! buf_CleanAsync(bp, &req);
/* now put it back and go around again */
buf_Release(bp);
--- 960,966 ----
* have the WRITING flag set, so we won't get
* back here.
*/
! buf_CleanAsync(bp, &req, NULL);
/* now put it back and go around again */
buf_Release(bp);
***************
*** 1272,1284 ****
}
/* clean a buffer synchronously */
! long buf_CleanAsync(cm_buf_t *bp, cm_req_t *reqp)
{
long code;
osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
lock_ObtainMutex(&bp->mx);
! code = buf_CleanAsyncLocked(bp, reqp);
lock_ReleaseMutex(&bp->mx);
return code;
--- 1272,1284 ----
}
/* clean a buffer synchronously */
! long buf_CleanAsync(cm_buf_t *bp, cm_req_t *reqp, afs_uint32 *pisdirty)
{
long code;
osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
lock_ObtainMutex(&bp->mx);
! code = buf_CleanAsyncLocked(bp, reqp, pisdirty);
lock_ReleaseMutex(&bp->mx);
return code;
***************
*** 1409,1415 ****
cm_InitReq(&req);
req.flags |= CM_REQ_NORETRY;
! buf_CleanAsync(bp, &req);
buf_CleanWait(NULL, bp, FALSE);
/* relock and release buffer */
--- 1409,1415 ----
cm_InitReq(&req);
req.flags |= CM_REQ_NORETRY;
! buf_CleanAsync(bp, &req, NULL);
buf_CleanWait(NULL, bp, FALSE);
/* relock and release buffer */
***************
*** 1623,1629 ****
lock_ObtainMutex(&bp->mx);
/* start cleaning the buffer, and wait for it to finish */
! buf_CleanAsyncLocked(bp, reqp);
buf_WaitIO(scp, bp);
lock_ReleaseMutex(&bp->mx);
--- 1623,1629 ----
lock_ObtainMutex(&bp->mx);
/* start cleaning the buffer, and wait for it to finish */
! buf_CleanAsyncLocked(bp, reqp, NULL);
buf_WaitIO(scp, bp);
lock_ReleaseMutex(&bp->mx);
***************
*** 1741,1747 ****
if (cm_FidCmp(&bp->fid, &scp->fid) == 0) {
lock_ObtainMutex(&bp->mx);
if (bp->flags & CM_BUF_DIRTY) {
! if (userp) {
cm_HoldUser(userp);
if (bp->userp)
cm_ReleaseUser(bp->userp);
--- 1741,1747 ----
if (cm_FidCmp(&bp->fid, &scp->fid) == 0) {
lock_ObtainMutex(&bp->mx);
if (bp->flags & CM_BUF_DIRTY) {
! if (userp && userp != bp->userp) {
cm_HoldUser(userp);
if (bp->userp)
cm_ReleaseUser(bp->userp);
***************
*** 1771,1777 ****
bp->dirtyCounter++;
break;
default:
! wasDirty = buf_CleanAsyncLocked(bp, reqp);
if (bp->flags & CM_BUF_ERROR) {
code = bp->error;
if (code == 0)
--- 1771,1777 ----
bp->dirtyCounter++;
break;
default:
! code = buf_CleanAsyncLocked(bp, reqp, &wasDirty);
if (bp->flags & CM_BUF_ERROR) {
code = bp->error;
if (code == 0)
***************
*** 1862,1872 ****
StringCbPrintfA(output, sizeof(output),
"%s bp=0x%08X, hash=%d, fid (cell=%d, volume=%d, "
"vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
! "flags=0x%x, cmFlags=0x%x, refCount=%d\r\n",
cookie, (void *)bp, i, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->offset.HighPart,
bp->offset.LowPart, bp->dataVersion, bp->flags,
! bp->cmFlags, bp->refCount);
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
}
}
--- 1862,1872 ----
StringCbPrintfA(output, sizeof(output),
"%s bp=0x%08X, hash=%d, fid (cell=%d, volume=%d, "
"vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
! "flags=0x%x, cmFlags=0x%x, error=0x%x, refCount=%d\r\n",
cookie, (void *)bp, i, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->offset.HighPart,
bp->offset.LowPart, bp->dataVersion, bp->flags,
! bp->cmFlags, bp->error, bp->refCount);
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
}
}
***************
*** 1880,1890 ****
StringCbPrintfA(output, sizeof(output),
"%s bp=0x%08X, fid (cell=%d, volume=%d, "
"vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
! "flags=0x%x, cmFlags=0x%x, refCount=%d\r\n",
cookie, (void *)bp, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->offset.HighPart,
bp->offset.LowPart, bp->dataVersion, bp->flags,
! bp->cmFlags, bp->refCount);
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
}
StringCbPrintfA(output, sizeof(output), "%s - Done dumping buf_FreeListEndp.\r\n", cookie);
--- 1880,1890 ----
StringCbPrintfA(output, sizeof(output),
"%s bp=0x%08X, fid (cell=%d, volume=%d, "
"vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
! "flags=0x%x, cmFlags=0x%x, error=0x%x, refCount=%d\r\n",
cookie, (void *)bp, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->offset.HighPart,
bp->offset.LowPart, bp->dataVersion, bp->flags,
! bp->cmFlags, bp->error, bp->refCount);
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
}
StringCbPrintfA(output, sizeof(output), "%s - Done dumping buf_FreeListEndp.\r\n", cookie);
***************
*** 1896,1906 ****
StringCbPrintfA(output, sizeof(output),
"%s bp=0x%08X, fid (cell=%d, volume=%d, "
"vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
! "flags=0x%x, cmFlags=0x%x, refCount=%d\r\n",
cookie, (void *)bp, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->offset.HighPart,
bp->offset.LowPart, bp->dataVersion, bp->flags,
! bp->cmFlags, bp->refCount);
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
}
StringCbPrintfA(output, sizeof(output), "%s - Done dumping buf_dirtyListp.\r\n", cookie);
--- 1896,1906 ----
StringCbPrintfA(output, sizeof(output),
"%s bp=0x%08X, fid (cell=%d, volume=%d, "
"vnode=%d, unique=%d), offset=%x:%08x, dv=%I64d, "
! "flags=0x%x, cmFlags=0x%x, error=0x%x, refCount=%d\r\n",
cookie, (void *)bp, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->offset.HighPart,
bp->offset.LowPart, bp->dataVersion, bp->flags,
! bp->cmFlags, bp->error, bp->refCount);
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
}
StringCbPrintfA(output, sizeof(output), "%s - Done dumping buf_dirtyListp.\r\n", cookie);
Index: openafs/src/WINNT/afsd/cm_buf.h
diff -c openafs/src/WINNT/afsd/cm_buf.h:1.12.4.17 openafs/src/WINNT/afsd/cm_buf.h:1.12.4.18
*** openafs/src/WINNT/afsd/cm_buf.h:1.12.4.17 Thu Jul 24 15:33:53 2008
--- openafs/src/WINNT/afsd/cm_buf.h Sat Nov 15 12:10:27 2008
***************
*** 160,168 ****
extern long buf_GetNew(struct cm_scache *, osi_hyper_t *, cm_buf_t **);
! extern long buf_CleanAsyncLocked(cm_buf_t *, cm_req_t *);
! extern long buf_CleanAsync(cm_buf_t *, cm_req_t *);
extern void buf_CleanWait(cm_scache_t *, cm_buf_t *, afs_uint32 locked);
--- 160,168 ----
extern long buf_GetNew(struct cm_scache *, osi_hyper_t *, cm_buf_t **);
! extern afs_uint32 buf_CleanAsyncLocked(cm_buf_t *, cm_req_t *, afs_uint32 *);
! extern afs_uint32 buf_CleanAsync(cm_buf_t *, cm_req_t *, afs_uint32 *);
extern void buf_CleanWait(cm_scache_t *, cm_buf_t *, afs_uint32 locked);
Index: openafs/src/WINNT/afsd/cm_callback.c
diff -c openafs/src/WINNT/afsd/cm_callback.c:1.41.4.51 openafs/src/WINNT/afsd/cm_callback.c:1.41.4.52
*** openafs/src/WINNT/afsd/cm_callback.c:1.41.4.51 Sat Sep 13 00:20:48 2008
--- openafs/src/WINNT/afsd/cm_callback.c Tue Dec 23 15:42:56 2008
***************
*** 357,364 ****
port = rx_PortOf(peerp);
tsp = cm_FindServerByIP(host, CM_SERVER_FILE);
! if (tsp)
cellp = tsp->cellp;
if (!cellp)
osi_Log2(afsd_logp, "SRXAFSCB_CallBack from host 0x%x port %d",
--- 357,366 ----
port = rx_PortOf(peerp);
tsp = cm_FindServerByIP(host, CM_SERVER_FILE);
! if (tsp) {
cellp = tsp->cellp;
+ cm_PutServer(tsp);
+ }
if (!cellp)
osi_Log2(afsd_logp, "SRXAFSCB_CallBack from host 0x%x port %d",
Index: openafs/src/WINNT/afsd/cm_daemon.h
diff -c openafs/src/WINNT/afsd/cm_daemon.h:1.4.4.3 openafs/src/WINNT/afsd/cm_daemon.h:1.4.4.4
*** openafs/src/WINNT/afsd/cm_daemon.h:1.4.4.3 Mon Dec 24 00:24:14 2007
--- openafs/src/WINNT/afsd/cm_daemon.h Fri Dec 26 18:29:32 2008
***************
*** 41,46 ****
extern void cm_QueueBKGRequest(cm_scache_t *scp, cm_bkgProc_t *procp, afs_uint32 p1,
afs_uint32 p2, afs_uint32 p3, afs_uint32 p4, cm_user_t *userp);
! #define CM_MAX_DAEMONS 8
#endif /* __CM_DAEMON_H_ENV_ */
--- 41,46 ----
extern void cm_QueueBKGRequest(cm_scache_t *scp, cm_bkgProc_t *procp, afs_uint32 p1,
afs_uint32 p2, afs_uint32 p3, afs_uint32 p4, cm_user_t *userp);
! #define CM_MAX_DAEMONS 64
#endif /* __CM_DAEMON_H_ENV_ */
Index: openafs/src/WINNT/afsd/cm_dir.c
diff -c openafs/src/WINNT/afsd/cm_dir.c:1.4.4.21 openafs/src/WINNT/afsd/cm_dir.c:1.4.4.22
*** openafs/src/WINNT/afsd/cm_dir.c:1.4.4.21 Sun Oct 19 19:19:33 2008
--- openafs/src/WINNT/afsd/cm_dir.c Fri Dec 26 18:34:37 2008
***************
*** 600,605 ****
--- 600,607 ----
LARGE_INTEGER start;
LARGE_INTEGER end;
+ lock_AssertNone(&op->scp->rw);
+
QueryPerformanceCounter(&start);
osi_Log2(afsd_logp, "cm_DirLookup for op 0x%p, entry[%s]",
***************
*** 1498,1510 ****
contents just to make sure that we don't end up with buffers
that was locally modified. */
! if (op->scp->flags & CM_SCACHEFLAG_LOCAL) {
! lock_ReleaseWrite(&op->scp->rw);
! code = cm_FlushFile(op->scp, op->userp, &op->req);
! if (code != 0)
! return code;
! lock_ObtainWrite(&op->scp->rw);
! }
offset = ConvertLongToLargeInteger(0);
while (LargeIntegerLessThan(offset, op->scp->length)) {
--- 1500,1507 ----
contents just to make sure that we don't end up with buffers
that was locally modified. */
! if (op->scp->flags & CM_SCACHEFLAG_LOCAL)
! op->scp->bufDataVersionLow = op->scp->dataVersion;
offset = ConvertLongToLargeInteger(0);
while (LargeIntegerLessThan(offset, op->scp->length)) {
Index: openafs/src/WINNT/afsd/cm_ioctl.c
diff -c openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.66 openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.67
*** openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.66 Mon Nov 3 14:56:07 2008
--- openafs/src/WINNT/afsd/cm_ioctl.c Mon Dec 29 17:38:25 2008
***************
*** 3018,3023 ****
--- 3018,3025 ----
cm_DumpSCache(hLogFile, cookie, 1);
cm_DumpBufHashTable(hLogFile, cookie, 1);
smb_DumpVCP(hLogFile, cookie, 1);
+ rx_DumpCalls(hLogFile, cookie);
+ rx_DumpPackets(hLogFile, cookie);
CloseHandle(hLogFile);
Index: openafs/src/WINNT/afsd/cm_server.c
diff -c openafs/src/WINNT/afsd/cm_server.c:1.25.2.37 openafs/src/WINNT/afsd/cm_server.c:1.25.2.38
*** openafs/src/WINNT/afsd/cm_server.c:1.25.2.37 Sat Sep 13 00:20:48 2008
--- openafs/src/WINNT/afsd/cm_server.c Tue Dec 23 15:42:56 2008
***************
*** 926,931 ****
--- 926,936 ----
tsp->addr.sin_addr.S_un.S_addr == ipaddr)
break;
}
+
+ /* bump ref count if we found the server */
+ if (tsp)
+ cm_GetServerNoLock(tsp);
+
lock_ReleaseRead(&cm_serverLock);
return tsp;
Index: openafs/src/WINNT/afsd/cm_vnodeops.c
diff -c openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.93 openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.94
*** openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.93 Tue Oct 21 21:25:38 2008
--- openafs/src/WINNT/afsd/cm_vnodeops.c Fri Dec 26 18:26:18 2008
***************
*** 3307,3318 ****
--- 3307,3353 ----
cm_dirOp_t newDirOp;
fschar_t * newNamep = NULL;
int free_oldNamep = FALSE;
+ cm_scache_t *oldScp = NULL, *newScp = NULL;
if (cOldNamep == NULL || cNewNamep == NULL ||
cm_ClientStrLen(cOldNamep) == 0 ||
cm_ClientStrLen(cNewNamep) == 0)
return CM_ERROR_INVAL;
+ /*
+ * Before we permit the operation, make sure that we do not already have
+ * an object in the destination directory that has a case-insensitive match
+ * for this name UNLESS the matching object is the object we are renaming.
+ */
+ code = cm_Lookup(oldDscp, cOldNamep, 0, userp, reqp, &oldScp);
+ if (code) {
+ osi_Log2(afsd_logp, "cm_Rename oldDscp 0x%p cOldName %S old name lookup failed",
+ oldDscp, osi_LogSaveStringW(afsd_logp, cOldNamep));
+ goto done;
+ }
+
+ code = cm_Lookup(newDscp, cNewNamep, CM_FLAG_CASEFOLD, userp, reqp, &newScp);
+ if (code == 0) {
+ /* found a matching object with the new name */
+ if (cm_FidCmp(&oldScp->fid, &newScp->fid)) {
+ /* and they don't match so return an error */
+ osi_Log2(afsd_logp, "cm_Rename newDscp 0x%p cNewName %S new name already exists",
+ newDscp, osi_LogSaveStringW(afsd_logp, cNewNamep));
+ code = CM_ERROR_EXISTS;
+ }
+ cm_ReleaseSCache(newScp);
+ newScp = NULL;
+ } else if (code == CM_ERROR_AMBIGUOUS_FILENAME) {
+ code = CM_ERROR_EXISTS;
+ } else {
+ code = 0;
+ }
+ cm_ReleaseSCache(oldScp);
+ oldScp = NULL;
+
+ if (code)
+ goto done;
+
if (oldNamep == NULL) {
code = -1;
#ifdef USE_BPLUS
Index: openafs/src/WINNT/afsd/fs.c
diff -c openafs/src/WINNT/afsd/fs.c:1.32.4.26 openafs/src/WINNT/afsd/fs.c:1.32.4.27
*** openafs/src/WINNT/afsd/fs.c:1.32.4.26 Mon Nov 3 14:56:07 2008
--- openafs/src/WINNT/afsd/fs.c Sun Nov 30 15:24:38 2008
***************
*** 9,14 ****
--- 9,15 ----
#include
#include
+ #include
#include
#include
Index: openafs/src/WINNT/afsd/smb.c
diff -c openafs/src/WINNT/afsd/smb.c:1.118.2.105 openafs/src/WINNT/afsd/smb.c:1.118.2.111
*** openafs/src/WINNT/afsd/smb.c:1.118.2.105 Tue Oct 21 21:25:38 2008
--- openafs/src/WINNT/afsd/smb.c Wed Dec 17 11:19:42 2008
***************
*** 914,920 ****
return vcp;
}
! int smb_IsStarMask(clientchar_t *maskp)
{
int i;
clientchar_t tc;
--- 914,920 ----
return vcp;
}
! static int smb_Is8Dot3StarMask(clientchar_t *maskp)
{
int i;
clientchar_t tc;
***************
*** 927,932 ****
--- 927,945 ----
return 0;
}
+ static int smb_IsStarMask(clientchar_t *maskp)
+ {
+ int i;
+ clientchar_t tc;
+
+ while (*maskp) {
+ tc = *maskp++;
+ if (tc == _C('?') || tc == _C('*') || tc == _C('>'))
+ return 1;
+ }
+ return 0;
+ }
+
#ifdef DEBUG_SMB_REFCOUNT
void smb_ReleaseVCInternalDbg(smb_vc_t *vcp, char * file, long line)
#define smb_ReleaseVCInternal(a) smb_ReleaseVCInternalDbg(a, file, line)
***************
*** 2989,2995 ****
/* map CM_ERROR_* errors to NT 32-bit status codes */
/* NT Status codes are listed in ntstatus.h not winerror.h */
! if (code == CM_ERROR_NOSUCHCELL) {
NTStatus = 0xC000000FL; /* No such file */
}
else if (code == CM_ERROR_NOSUCHVOLUME) {
--- 3002,3011 ----
/* map CM_ERROR_* errors to NT 32-bit status codes */
/* NT Status codes are listed in ntstatus.h not winerror.h */
! if (code == 0) {
! NTStatus = 0;
! }
! else if (code == CM_ERROR_NOSUCHCELL) {
NTStatus = 0xC000000FL; /* No such file */
}
else if (code == CM_ERROR_NOSUCHVOLUME) {
***************
*** 3085,3091 ****
NTStatus = 0xC0000033L; /* Object name invalid */
}
else if (code == CM_ERROR_WOULDBLOCK) {
! NTStatus = 0xC0000055L; /* Lock not granted */
}
else if (code == CM_ERROR_SHARING_VIOLATION) {
NTStatus = 0xC0000043L; /* Sharing violation */
--- 3101,3107 ----
NTStatus = 0xC0000033L; /* Object name invalid */
}
else if (code == CM_ERROR_WOULDBLOCK) {
! NTStatus = 0xC00000D8L; /* Can't wait */
}
else if (code == CM_ERROR_SHARING_VIOLATION) {
NTStatus = 0xC0000043L; /* Sharing violation */
***************
*** 3141,3146 ****
--- 3157,3164 ----
}
else if (code == CM_ERROR_LOCK_NOT_GRANTED) {
NTStatus = 0xC0000055L; /* Lock Not Granted */
+ } else if (code == ENOMEM) {
+ NTStatus = 0xC0000017L; /* Out of Memory */
} else {
NTStatus = 0xC0982001L; /* SMB non-specific error */
}
***************
*** 4070,4079 ****
tidp = smb_FindTID(vcp, newTid, SMB_FLAG_CREATE);
uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
userp = smb_GetUserFromUID(uidp);
shareFound = smb_FindShare(vcp, uidp, shareName, &sharePath);
! if (uidp)
! smb_ReleaseUID(uidp);
if (!shareFound) {
smb_ReleaseTID(tidp, FALSE);
return CM_ERROR_BADSHARENAME;
--- 4088,4098 ----
tidp = smb_FindTID(vcp, newTid, SMB_FLAG_CREATE);
uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
+ if (!uidp)
+ return CM_ERROR_BADSMB;
userp = smb_GetUserFromUID(uidp);
shareFound = smb_FindShare(vcp, uidp, shareName, &sharePath);
! smb_ReleaseUID(uidp);
if (!shareFound) {
smb_ReleaseTID(tidp, FALSE);
return CM_ERROR_BADSHARENAME;
***************
*** 4562,4568 ****
memcpy(dsp->mask, mask, 12);
/* track if this is likely to match a lot of entries */
! if (smb_IsStarMask(mask))
starPattern = 1;
else
starPattern = 0;
--- 4581,4587 ----
memcpy(dsp->mask, mask, 12);
/* track if this is likely to match a lot of entries */
! if (smb_Is8Dot3StarMask(mask))
starPattern = 1;
else
starPattern = 0;
***************
*** 5935,5944 ****
osi_Log0(smb_logp, "Can't rename. Target already exists");
code = CM_ERROR_EXISTS;
}
-
- if (tmpscp != NULL)
- cm_ReleaseSCache(tmpscp);
-
goto done;
}
--- 5954,5959 ----
Index: openafs/src/WINNT/afsd/smb3.c
diff -c openafs/src/WINNT/afsd/smb3.c:1.95.2.83 openafs/src/WINNT/afsd/smb3.c:1.95.2.85
*** openafs/src/WINNT/afsd/smb3.c:1.95.2.83 Sun Oct 19 19:19:33 2008
--- openafs/src/WINNT/afsd/smb3.c Sat Dec 27 23:41:48 2008
***************
*** 2746,2751 ****
--- 2746,2752 ----
/* attributes, defined in WINNT.H:
* FILE_CASE_SENSITIVE_SEARCH 0x1
* FILE_CASE_PRESERVED_NAMES 0x2
+ * FILE_UNICODE_ON_DISK 0x4
* FILE_VOLUME_QUOTAS 0x10
* 0x4000
* If bit 0x4000 is not set, Windows 95 thinks
***************
*** 2755,2768 ****
qi.u.FSattributeInfo.attributes = 0x4003;
/* The maxCompLength is supposed to be in bytes */
#ifdef SMB_UNICODE
! if ((vcp->flags & SMB_VCFLAG_USEUNICODE) == SMB_VCFLAG_USEUNICODE)
! qi.u.FSattributeInfo.maxCompLength = MAX_PATH * sizeof(wchar_t);
! else {
! #endif
! qi.u.FSattributeInfo.maxCompLength = MAX_PATH;
! #ifdef SMB_UNICODE
! }
#endif
smb_UnparseString(op, qi.u.FSattributeInfo.FSname, _C("AFS"), &sz, SMB_STRF_IGNORENUL);
qi.u.FSattributeInfo.FSnameLength = sz;
--- 2756,2764 ----
qi.u.FSattributeInfo.attributes = 0x4003;
/* The maxCompLength is supposed to be in bytes */
#ifdef SMB_UNICODE
! qi.u.FSattributeInfo.attributes |= 0x04;
#endif
+ qi.u.FSattributeInfo.maxCompLength = 255;
smb_UnparseString(op, qi.u.FSattributeInfo.FSname, _C("AFS"), &sz, SMB_STRF_IGNORENUL);
qi.u.FSattributeInfo.FSnameLength = sz;
Index: openafs/src/WINNT/afsd/smb_ioctl.c
diff -c openafs/src/WINNT/afsd/smb_ioctl.c:1.25.2.17 openafs/src/WINNT/afsd/smb_ioctl.c:1.25.2.18
*** openafs/src/WINNT/afsd/smb_ioctl.c:1.25.2.17 Tue Sep 2 17:21:35 2008
--- openafs/src/WINNT/afsd/smb_ioctl.c Mon Nov 17 14:08:39 2008
***************
*** 349,354 ****
--- 349,356 ----
count = smb_GetSMBParm(inp, 5);
uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
+ if (!uidp)
+ return CM_ERROR_BADSMB;
userp = smb_GetUserFromUID(uidp);
osi_assertx(userp != NULL, "null cm_user_t");
iop->uidp = uidp;
Index: openafs/src/WINNT/afsd/symlink.c
diff -c openafs/src/WINNT/afsd/symlink.c:1.8.4.7 openafs/src/WINNT/afsd/symlink.c:1.8.4.8
*** openafs/src/WINNT/afsd/symlink.c:1.8.4.7 Thu Jun 26 08:45:12 2008
--- openafs/src/WINNT/afsd/symlink.c Sun Nov 30 15:24:38 2008
***************
*** 9,14 ****
--- 9,15 ----
#include
#include
+ #include
#include
#include
Index: openafs/src/WINNT/client_config/NTMakefile
diff -c openafs/src/WINNT/client_config/NTMakefile:1.11.4.6 openafs/src/WINNT/client_config/NTMakefile:1.11.4.7
*** openafs/src/WINNT/client_config/NTMakefile:1.11.4.6 Wed Jul 2 08:48:46 2008
--- openafs/src/WINNT/client_config/NTMakefile Fri Dec 26 21:27:56 2008
***************
*** 110,116 ****
$(EXEFILE) : $(EXEOBJS) $(EXEOBJSc) $(EXERES) $(AFSDOBJS) $(EXELIBS)
$(EXEGUILINK) $(VCLIBS)
!IF ("$(AFSVER_CL)" == "1400")
! if exist $@.manifest mt.exe -manifest afs_config.exe.manifest $(MANIFEST) -out:$(MANIFEST)
!ELSE
$(COPY) afs_config.exe.manifest $(MANIFEST)
!ENDIF
--- 110,116 ----
$(EXEFILE) : $(EXEOBJS) $(EXEOBJSc) $(EXERES) $(AFSDOBJS) $(EXELIBS)
$(EXEGUILINK) $(VCLIBS)
!IF ("$(AFSVER_CL)" == "1400")
! if exist $@.manifest mt.exe -manifest afs_config.exe.manifest -out:$(MANIFEST)
!ELSE
$(COPY) afs_config.exe.manifest $(MANIFEST)
!ENDIF
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.40 openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.41
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.40 Fri Nov 7 19:06:39 2008
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm Mon Dec 29 17:51:32 2008
***************
*** 57,63 ****
OpenAFS for Windows
! Version 1.5.55
--- 57,63 ----
OpenAFS for Windows
! Version 1.5.56
***************
*** 78,84 ****
·
OpenAFS for Windows 1.5.55
Release Notes
--- 78,84 ----
·
OpenAFS for Windows 1.5.56
Release Notes
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.38 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.39
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.38 Fri Nov 7 19:06:51 2008
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm Mon Dec 29 17:51:37 2008
***************
*** 18,24 ****
.shape {behavior:url(#default#VML);}
!
OpenAFS for Windows 1.5.55 Release Notes
! OpenAFS for Windows 1.5.56 Release Notes
! OpenAFS for Windows 1.5.55 Release Notes
! OpenAFS for Windows 1.5.56 Release Notes
! OpenAFS for Windows 1.5.55 (with Unicode Support)
Release Notes
The Andrew File System (AFS) is a location-independent
--- 1226,1232 ----
!
OpenAFS for Windows 1.5.56 (with Unicode Support)
Release Notes
The Andrew File System (AFS) is a location-independent
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.39 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.40
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.39 Fri Nov 7 19:06:52 2008
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm Mon Dec 29 17:51:37 2008
***************
*** 12,18 ****
!
OpenAFS for Windows 1.5.55 Table of Contents