[SCM] Samba Shared Repository - branch v3-5-test updated
Karolin Seeger
kseeger at samba.org
Sat Sep 25 06:49:53 MDT 2010
The branch, v3-5-test has been updated
via 24f9210 Fix bug #7693 - smbd changing mode of files on rename
from 2ee2ea9 s3:smbd: Align change notify replies on 4-byte boundary
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test
- Log -----------------------------------------------------------------
commit 24f9210fe1e2280e08a7b2dd2cb33e7af4c1c002
Author: Jeremy Allison <jra at samba.org>
Date: Wed Sep 22 12:26:13 2010 -0700
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.
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/fileio.c | 13 +++++++------
source3/smbd/reply.c | 5 +++--
2 files changed, 10 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 1c27fef..9754b71 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -312,14 +312,15 @@ ssize_t write_file(struct smb_request *req,
fsp->modified = True;
if (SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st) == 0) {
- int dosmode;
trigger_write_time_update(fsp);
- dosmode = dos_mode(fsp->conn, fsp->fsp_name);
- if ((lp_store_dos_attributes(SNUM(fsp->conn)) ||
- MAP_ARCHIVE(fsp->conn)) &&
- !IS_DOS_ARCHIVE(dosmode)) {
- file_set_dosmode(fsp->conn, fsp->fsp_name,
+ if (!fsp->posix_open &&
+ (lp_store_dos_attributes(SNUM(fsp->conn)) ||
+ MAP_ARCHIVE(fsp->conn))) {
+ int dosmode = dos_mode(fsp->conn, fsp->fsp_name);
+ if (!IS_DOS_ARCHIVE(dosmode)) {
+ file_set_dosmode(fsp->conn, fsp->fsp_name,
dosmode | aARCH, NULL, false);
+ }
}
/*
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index c9c80e8..e0ee8d2 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -5846,8 +5846,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_posix_pathnames() &&
+ (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) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list