Changeset 335 for branches/samba-3.2.x/source/smbd/trans2.c
- Timestamp:
- Sep 24, 2009, 9:15:13 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/smbd/trans2.c
r272 r335 4920 4920 if (setting_write_time) { 4921 4921 /* 4922 * This was a setfileinfo on an open file.4922 * This was a Windows setfileinfo on an open file. 4923 4923 * NT does this a lot. We also need to 4924 4924 * set the time here, as it can be read by … … 5997 5997 bool delete_on_fail = False; 5998 5998 enum perm_type ptype; 5999 files_struct *all_fsps = NULL; 6000 bool modify_mtime = true; 6001 struct file_id id; 5999 6002 6000 6003 if (total_data < 100) { … … 6143 6146 6144 6147 /* Deal with any time changes. */ 6145 6146 return smb_set_file_time(conn, 6148 id = vfs_file_id_from_sbuf(conn, psbuf); 6149 for(all_fsps = file_find_di_first(id); all_fsps; 6150 all_fsps = file_find_di_next(all_fsps)) { 6151 /* 6152 * We're setting the time explicitly for UNIX. 6153 * Cancel any pending changes over all handles. 6154 */ 6155 all_fsps->update_write_time_on_close = false; 6156 TALLOC_FREE(all_fsps->update_write_time_event); 6157 } 6158 6159 /* 6160 * Override the "setting_write_time" 6161 * parameter here as it almost does what 6162 * we need. Just remember if we modified 6163 * mtime and send the notify ourselves. 6164 */ 6165 if (null_timespec(ts[1])) { 6166 modify_mtime = false; 6167 } 6168 6169 status = smb_set_file_time(conn, 6147 6170 fsp, 6148 6171 fname, 6149 6172 psbuf, 6150 6173 ts, 6151 true); 6174 false); 6175 6176 if (modify_mtime) { 6177 notify_fname(conn, NOTIFY_ACTION_MODIFIED, 6178 FILE_NOTIFY_CHANGE_LAST_WRITE, fname); 6179 } 6180 return status; 6152 6181 } 6153 6182 … … 6776 6805 } 6777 6806 6778 if (!CAN_WRITE(conn)) {6779 reply_doserror(req, ERRSRV, ERRaccess);6780 return;6781 }6782 6783 6807 if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) { 6784 6808 reply_nterror(req, NT_STATUS_INVALID_LEVEL); 6785 6809 return; 6810 } 6811 6812 if (!CAN_WRITE(conn)) { 6813 /* Allow POSIX opens. The open path will deny 6814 * any non-readonly opens. */ 6815 if (info_level != SMB_POSIX_PATH_OPEN) { 6816 reply_doserror(req, ERRSRV, ERRaccess); 6817 return; 6818 } 6786 6819 } 6787 6820 … … 7090 7123 7091 7124 DEBUG(3,("call_trans2mkdir : name = %s\n", directory)); 7125 7126 status = resolve_dfspath(ctx, 7127 conn, 7128 req->flags2 & FLAGS2_DFS_PATHNAMES, 7129 directory, 7130 &directory); 7131 if (!NT_STATUS_IS_OK(status)) { 7132 if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { 7133 reply_botherror(req, 7134 NT_STATUS_PATH_NOT_COVERED, 7135 ERRSRV, ERRbadpath); 7136 } 7137 reply_nterror(req, status); 7138 return; 7139 } 7092 7140 7093 7141 status = unix_convert(ctx, conn, directory, False, &directory, NULL, &sbuf);
Note:
See TracChangeset
for help on using the changeset viewer.