diff options
author | Jeremy Allison <jra@samba.org> | 2013-01-24 11:02:30 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2013-03-14 10:51:40 +0100 |
commit | 7df430f06690d0e30083a18a9c7bf7ace3b6953c (patch) | |
tree | aaa8b82f3b1dd9228ff3b6fed663dc04d0181844 | |
parent | a63b0eaed7bfb59d1fe6082a2edc4eb31cbca3d7 (diff) | |
download | samba-7df430f06690d0e30083a18a9c7bf7ace3b6953c.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>
(cherry picked from commit 6603013f8f03773d141c33fd1c4923197a5350c8)
-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 ac471aa6ee9..a708fd83dd2 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -6187,7 +6187,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 |