summaryrefslogtreecommitdiff
path: root/source3/smbd/dir.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-07-20 18:21:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:14 -0500
commitaa63997c2341e565c8a81716ed44bca3d6c27798 (patch)
tree798c2c0daadf96fa140186b816a12b13e664c2bf /source3/smbd/dir.c
parentecafd3754f35a2109a3a1eecbbdd72ade06b8502 (diff)
downloadsamba-aa63997c2341e565c8a81716ed44bca3d6c27798.tar.gz
samba-aa63997c2341e565c8a81716ed44bca3d6c27798.tar.bz2
samba-aa63997c2341e565c8a81716ed44bca3d6c27798.zip
r8655: Still trying to fix #2889. We don't need the DPTR_MASK after
all, now thinking it might be to do with flags2... Jeremy. (This used to be commit a3ceabf7c678b5e7f77cc073cf535498ffc67eb6)
Diffstat (limited to 'source3/smbd/dir.c')
-rw-r--r--source3/smbd/dir.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 4f59205feb..949e31210f 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -641,8 +641,6 @@ BOOL dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, S
Fill the 5 byte server reserved dptr field.
****************************************************************************/
-#define DPTR_MASK ((uint32)(((uint32)1)<<31))
-
BOOL dptr_fill(char *buf1,unsigned int key)
{
unsigned char *buf = (unsigned char *)buf1;
@@ -655,13 +653,8 @@ BOOL dptr_fill(char *buf1,unsigned int key)
offset = (uint32)TellDir(dptr->dir_hnd);
DEBUG(6,("fill on key %u dirptr 0x%lx now at %d\n",key,
(long)dptr->dir_hnd,(int)offset));
- if (offset != (uint32)-1 && (offset & DPTR_MASK)) {
- DEBUG(0,("dptr_fill: Error - offset 0x%x has bit 32 set. Can't use in server state.\n",
- (unsigned int)offset ));
- return False;
- }
buf[0] = key;
- SIVAL(buf,1,offset | DPTR_MASK);
+ SIVAL(buf,1,offset);
return(True);
}
@@ -685,7 +678,7 @@ struct dptr_struct *dptr_fetch(char *buf,int *num)
if (offset == (uint32)-1) {
seekoff = -1;
} else {
- seekoff = (long)(offset & ~DPTR_MASK);
+ seekoff = (long)offset;
}
SeekDir(dptr->dir_hnd,seekoff);
DEBUG(3,("fetching dirptr %d for path %s at offset %d\n",