s3:smbd: add a fsp_persistent_id() function
commitcb5a0b1bc311667818ab45bb1837dc67a241a379
authorStefan Metzmacher <metze@samba.org>
Thu, 14 Jun 2012 08:32:43 +0000 (14 10:32 +0200)
committerKarolin Seeger <kseeger@samba.org>
Sun, 17 Jun 2012 19:01:26 +0000 (17 21:01 +0200)
tree79ee785e33287c629e38e8845ccc1d779812a27a
parent8c1159461a0c5a948cd04cdf969e54e1fa83387e
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

Signed-off-by: Jeremy Allison <jra@samba.org>
source3/smbd/files.c
source3/smbd/proto.h