s3:smbd: add a fsp_persistent_id() function
authorStefan Metzmacher <metze@samba.org>
Thu, 14 Jun 2012 08:32:43 +0000 (10:32 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 14 Jun 2012 16:13:31 +0000 (18:13 +0200)
commit47f837c105ee7b70b7e80e41772b7c9470bbe153
tree89d577d7b125953e008ee5fd6cc81006593812de
parent5662166b231f64ba2003f917057b8ffb8886b8bc
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
source3/smbd/files.c
source3/smbd/proto.h