diff options
author | Jeremy Allison <jra@samba.org> | 2013-01-24 11:02:30 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2013-01-28 11:07:38 +0100 |
commit | 468f9eddcbf27806539a4017ea87e901fc4197f5 (patch) | |
tree | b7b912824f84846c4d3a312ecbc3ab7a57f9ceda | |
parent | 6f49537c86556c660a9ea05a3889420d3d93a72c (diff) | |
download | samba-468f9eddcbf27806539a4017ea87e901fc4197f5.tar.gz |
Fix bug #9587 - archive flag is always set on directories.
Creating a directory to a Samba share sets the attributes to 'D' only
(correct) - only when creating a new file should the 'A' attribute
be set.
However, doing a rename of that directory sets the 'A' attribute in error.
This should only be done on a file rename. smbclient regression test to follow.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
(cherry picked from commit 3d46a077dd0999cc0c6032379147811c8bb660fb)
-rw-r--r-- | source3/smbd/reply.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index e3c09cad742..7b19817b8b5 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -6416,7 +6416,8 @@ 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_posix_pathnames() && + if (!fsp->is_directory && + !lp_posix_pathnames() && (lp_map_archive(SNUM(conn)) || lp_store_dos_attributes(SNUM(conn)))) { /* We must set the archive bit on the newly |