diff options
author | Jeremy Allison <jra@samba.org> | 2009-11-17 14:55:02 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-11-17 14:55:02 -0800 |
commit | a770caed0ff66ddc2d63ac83d20f4cd7fcc2caf5 (patch) | |
tree | 479bcb278bcd0ccd20f9506c976d47cb6f41e356 /source3/smbd/open.c | |
parent | a31838eb3c40f4b70c629f94620f435214e414d4 (diff) | |
download | samba-a770caed0ff66ddc2d63ac83d20f4cd7fcc2caf5.tar.gz samba-a770caed0ff66ddc2d63ac83d20f4cd7fcc2caf5.tar.bz2 samba-a770caed0ff66ddc2d63ac83d20f4cd7fcc2caf5.zip |
Remove "store create time" code, cause create time to be stored
in the "user.DOSATTRIB" EA. From the docs:
In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store
the create time for a file as well as the DOS attributes. This is done in a backwards compatible
way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this
extended attribute by earlier versions of Samba, but they will not be able to read the create
time stored there. Storing the create time separately from the normal filesystem meta-data
allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem.
Passes make test but will need more testing.
Jeremy.
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r-- | source3/smbd/open.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 85b7d9106d..1f48daf904 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1495,7 +1495,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, } return print_fsp_open(req, conn, smb_fname->base_name, - req->vuid, fsp, &smb_fname->st); + req->vuid, fsp); } if (!parent_dirname(talloc_tos(), smb_fname->base_name, &parent_dir, @@ -3243,7 +3243,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, } } - if (!fsp->is_directory && S_ISDIR(smb_fname->st.st_ex_mode)) { + if (!fsp->is_directory && S_ISDIR(fsp->fsp_name->st.st_ex_mode)) { status = NT_STATUS_ACCESS_DENIED; goto fail; } @@ -3251,7 +3251,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, /* Save the requested allocation size. */ if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) { if (allocation_size - && (allocation_size > smb_fname->st.st_ex_size)) { + && (allocation_size > fsp->fsp_name->st.st_ex_size)) { fsp->initial_allocation_size = smb_roundup( fsp->conn, allocation_size); if (fsp->is_directory) { @@ -3266,7 +3266,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, } } else { fsp->initial_allocation_size = smb_roundup( - fsp->conn, (uint64_t)smb_fname->st.st_ex_size); + fsp->conn, (uint64_t)fsp->fsp_name->st.st_ex_size); } } @@ -3276,18 +3276,8 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, if (pinfo != NULL) { *pinfo = info; } - if ((fsp->fh != NULL) && (fsp->fh->fd != -1)) { - SMB_VFS_FSTAT(fsp, &smb_fname->st); - fsp->fsp_name->st = smb_fname->st; - } - /* Try and make a create timestamp, if required. */ - if ((info == FILE_WAS_CREATED) || (info == FILE_WAS_OVERWRITTEN)) { - if (lp_store_create_time(SNUM(conn))) { - set_create_timespec_ea(conn, fsp, - smb_fname, smb_fname->st.st_ex_btime); - } - } + smb_fname->st = fsp->fsp_name->st; return NT_STATUS_OK; |