diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-06-14 10:32:43 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-06-14 18:13:31 +0200 |
commit | 47f837c105ee7b70b7e80e41772b7c9470bbe153 (patch) | |
tree | 89d577d7b125953e008ee5fd6cc81006593812de /source3/smbd/proto.h | |
parent | 5662166b231f64ba2003f917057b8ffb8886b8bc (diff) | |
download | samba-47f837c105ee7b70b7e80e41772b7c9470bbe153.tar.gz samba-47f837c105ee7b70b7e80e41772b7c9470bbe153.tar.bz2 samba-47f837c105ee7b70b7e80e41772b7c9470bbe153.zip |
s3:smbd: add a fsp_persistent_id() function
This calculates a 64-bit value that most likely uniquely identifies
the files_struct globally to the server.
* 32-bit random gen_id
* 16-bit truncated open_time
* 16-bit fnum (valatile_id)
Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent
fileid in SMB2.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
metze
Diffstat (limited to 'source3/smbd/proto.h')
-rw-r--r-- | source3/smbd/proto.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index e7bc3eb5b4..53d9e2dd37 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -387,6 +387,7 @@ bool file_find_subpath(files_struct *dir_fsp); void file_sync_all(connection_struct *conn); void file_free(struct smb_request *req, files_struct *fsp); files_struct *file_fsp(struct smb_request *req, uint16 fid); +uint64_t fsp_persistent_id(const struct files_struct *fsp); struct files_struct *file_fsp_smb2(struct smbd_smb2_request *smb2req, uint64_t persistent_id, uint64_t volatile_id); |