summaryrefslogtreecommitdiff
path: root/source3/smbd/fileio.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-04-02 18:46:19 +0000
committerJeremy Allison <jra@samba.org>2004-04-02 18:46:19 +0000
commit722aa118c66b020c2b9f2b595e1af50429f13986 (patch)
tree8308634feee7548ab22ccab11cb4818f2e9d9b62 /source3/smbd/fileio.c
parent044c6f513dca21d4fc01db4a686c75d43d4952d2 (diff)
downloadsamba-722aa118c66b020c2b9f2b595e1af50429f13986.tar.gz
samba-722aa118c66b020c2b9f2b595e1af50429f13986.tar.bz2
samba-722aa118c66b020c2b9f2b595e1af50429f13986.zip
Added per-share parameter "store dos attributes". When set, will store
dos attributes in an EA. Based on an original patch from tridge, but modified somewhat to cover all cases. Jeremy. (This used to be commit ed653cd468213e0be901bc654aa3748ce5837947)
Diffstat (limited to 'source3/smbd/fileio.c')
-rw-r--r--source3/smbd/fileio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index 3462a3b9fa..c2fb6e3456 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -176,8 +176,9 @@ ssize_t write_file(files_struct *fsp, char *data, SMB_OFF_T pos, size_t n)
if (SMB_VFS_FSTAT(fsp,fsp->fd,&st) == 0) {
int dosmode = dos_mode(fsp->conn,fsp->fsp_name,&st);
fsp->size = (SMB_BIG_UINT)st.st_size;
- if (MAP_ARCHIVE(fsp->conn) && !IS_DOS_ARCHIVE(dosmode))
- file_chmod(fsp->conn,fsp->fsp_name,dosmode | aARCH,&st);
+ if ((lp_store_dos_attributes(SNUM(fsp->conn)) || MAP_ARCHIVE(fsp->conn)) && !IS_DOS_ARCHIVE(dosmode)) {
+ file_set_dosmode(fsp->conn,fsp->fsp_name,dosmode | aARCH,&st);
+ }
/*
* If this is the first write and we have an exclusive oplock then setup