diff options
author | Ralph Boehme <slow@samba.org> | 2019-09-26 10:41:37 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-10-16 19:25:13 +0000 |
commit | c79e39571910d52cb9336212417f072df82a98b2 (patch) | |
tree | ae148abca189e464731876c5cac9045709e2a316 | |
parent | f98033600613e1c26d233063a99d2a7f7207a74f (diff) | |
download | samba-c79e39571910d52cb9336212417f072df82a98b2.tar.gz |
s3:smbd: add a comment explaining the File-ID semantics when a file is created
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14137
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit c190f3efa9eb4f633df28074b481ff884b67e65f)
-rw-r--r-- | source3/smbd/open.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 8586b467d2e..5524f80af20 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3708,6 +3708,15 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, fsp->initial_delete_on_close = True; } + /* + * If we created a file and it's not a stream, this is the point where + * we set the itime (aka invented time) that get's stored in the DOS + * attribute xattr. The value is going to be either what the filesystem + * provided or a copy of the creation date. + * + * Either way, we turn the itime into a File-ID, unless the filesystem + * provided one (unlikely). + */ if (info == FILE_WAS_CREATED && !is_named_stream(smb_fname)) { smb_fname->st.st_ex_iflags &= ~ST_EX_IFLAG_CALCULATED_ITIME; |