summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-02-25 13:15:53 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-02-25 13:15:53 +1100
commitd8b70278e20b276566a3893d288101ff4826df61 (patch)
tree07ef73d8545fefcdcd9d8867763b1e4439b20aaa /source3/smbd/trans2.c
parent7040d94149d8538c0b731b9e62b9b4c7807841b6 (diff)
parentebe1aa9340d190b2ebcfd2c96f68c7771cccdf01 (diff)
downloadsamba-d8b70278e20b276566a3893d288101ff4826df61.tar.gz
samba-d8b70278e20b276566a3893d288101ff4826df61.tar.bz2
samba-d8b70278e20b276566a3893d288101ff4826df61.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into master-devel
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 759e520866..433b8a008d 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4972,6 +4972,7 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
****************************************************************************/
static NTSTATUS smb_set_file_dosmode(connection_struct *conn,
+ files_struct *fsp,
const char *fname,
SMB_STRUCT_STAT *psbuf,
uint32 dosmode)
@@ -4980,6 +4981,14 @@ static NTSTATUS smb_set_file_dosmode(connection_struct *conn,
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
+ if (fsp) {
+ if (fsp->base_fsp) {
+ fname = fsp->base_fsp->fsp_name;
+ } else {
+ fname = fsp->fsp_name;
+ }
+ }
+
if (dosmode) {
if (S_ISDIR(psbuf->st_mode)) {
dosmode |= aDIR;
@@ -5723,12 +5732,11 @@ static NTSTATUS smb_set_file_basic_info(connection_struct *conn,
/* Set the attributes */
dosmode = IVAL(pdata,32);
- status = smb_set_file_dosmode(conn, fname, psbuf, dosmode);
+ status = smb_set_file_dosmode(conn, fsp, fname, psbuf, dosmode);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
-
/* access time */
ft.atime = interpret_long_date(pdata+8);