mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3:dir - Introduce a function to map a directory cookie to a 32-bit wire cookie.
Make this an identity for now. https://bugzilla.samba.org/show_bug.cgi?id=2662 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
584de2078d
commit
5afc25eceb
@ -894,6 +894,15 @@ void dptr_init_search_op(struct dptr_struct *dptr)
|
||||
SMB_VFS_INIT_SEARCH_OP(dptr->conn, dptr->dir_hnd->dir);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Map a native directory offset to a 32-bit cookie.
|
||||
****************************************************************************/
|
||||
|
||||
static uint32_t map_dir_offset_to_wire(struct dptr_struct *dptr, long offset)
|
||||
{
|
||||
return (uint32_t)offset;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Fill the 5 byte server reserved dptr field.
|
||||
****************************************************************************/
|
||||
@ -908,7 +917,7 @@ bool dptr_fill(struct smbd_server_connection *sconn,
|
||||
DEBUG(1,("filling null dirptr %d\n",key));
|
||||
return(False);
|
||||
}
|
||||
wire_offset = (uint32_t)TellDir(dptr->dir_hnd);
|
||||
wire_offset = map_dir_offset_to_wire(dptr,TellDir(dptr->dir_hnd));
|
||||
DEBUG(6,("fill on key %u dirptr 0x%lx now at %d\n",key,
|
||||
(long)dptr->dir_hnd,(int)wire_offset));
|
||||
buf[0] = key;
|
||||
|
Loading…
Reference in New Issue
Block a user