diff options
author | Jeremy Allison <jra@samba.org> | 2010-09-22 12:26:13 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-09-22 12:26:13 -0700 |
commit | 314dc23ecfb5fc014f9c2ef70bd508eb837632b0 (patch) | |
tree | 75fcf4bd2238731ebd7efc6b3d3534b86760be9b /source3/smbd/reply.c | |
parent | cf6e773e1a75b1d7d32dfa952d3bb743db6e1b7c (diff) | |
download | samba-314dc23ecfb5fc014f9c2ef70bd508eb837632b0.tar.gz samba-314dc23ecfb5fc014f9c2ef70bd508eb837632b0.tar.xz samba-314dc23ecfb5fc014f9c2ef70bd508eb837632b0.zip |
Fix bug #7693 - smbd changing mode of files on rename
When using "map archive", don't change the archive bit on
renames or writes with UNIX extensions turned on.
Jeremy.
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index ff77507471d..3e8e716b6af 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -6096,8 +6096,9 @@ NTSTATUS rename_internals_fsp(connection_struct *conn, "%s -> %s\n", smb_fname_str_dbg(fsp->fsp_name), smb_fname_str_dbg(smb_fname_dst))); - if (lp_map_archive(SNUM(conn)) || - lp_store_dos_attributes(SNUM(conn))) { + if (!lp_unix_extensions() && + (lp_map_archive(SNUM(conn)) || + lp_store_dos_attributes(SNUM(conn)))) { /* We must set the archive bit on the newly renamed file. */ if (SMB_VFS_STAT(conn, smb_fname_dst) == 0) { |