Changeset 309 for branches/samba-3.3.x/source/smbd/trans2.c
- Timestamp:
- Aug 4, 2009, 8:51:22 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/smbd/trans2.c
r222 r309 4938 4938 if (setting_write_time) { 4939 4939 /* 4940 * This was a setfileinfo on an open file.4940 * This was a Windows setfileinfo on an open file. 4941 4941 * NT does this a lot. We also need to 4942 4942 * set the time here, as it can be read by … … 6016 6016 bool delete_on_fail = False; 6017 6017 enum perm_type ptype; 6018 files_struct *all_fsps = NULL; 6019 bool modify_mtime = true; 6020 struct file_id id; 6018 6021 6019 6022 if (total_data < 100) { … … 6162 6165 6163 6166 /* Deal with any time changes. */ 6164 6165 return smb_set_file_time(conn, 6167 id = vfs_file_id_from_sbuf(conn, psbuf); 6168 for(all_fsps = file_find_di_first(id); all_fsps; 6169 all_fsps = file_find_di_next(all_fsps)) { 6170 /* 6171 * We're setting the time explicitly for UNIX. 6172 * Cancel any pending changes over all handles. 6173 */ 6174 all_fsps->update_write_time_on_close = false; 6175 TALLOC_FREE(all_fsps->update_write_time_event); 6176 } 6177 6178 /* 6179 * Override the "setting_write_time" 6180 * parameter here as it almost does what 6181 * we need. Just remember if we modified 6182 * mtime and send the notify ourselves. 6183 */ 6184 if (null_timespec(ts[1])) { 6185 modify_mtime = false; 6186 } 6187 6188 status = smb_set_file_time(conn, 6166 6189 fsp, 6167 6190 fname, 6168 6191 psbuf, 6169 6192 ts, 6170 true); 6193 false); 6194 6195 if (modify_mtime) { 6196 notify_fname(conn, NOTIFY_ACTION_MODIFIED, 6197 FILE_NOTIFY_CHANGE_LAST_WRITE, fname); 6198 } 6199 return status; 6171 6200 } 6172 6201 … … 6795 6824 } 6796 6825 6797 if (!CAN_WRITE(conn)) {6798 reply_doserror(req, ERRSRV, ERRaccess);6799 return;6800 }6801 6802 6826 if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) { 6803 6827 reply_nterror(req, NT_STATUS_INVALID_LEVEL); 6804 6828 return; 6829 } 6830 6831 if (!CAN_WRITE(conn)) { 6832 /* Allow POSIX opens. The open path will deny 6833 * any non-readonly opens. */ 6834 if (info_level != SMB_POSIX_PATH_OPEN) { 6835 reply_doserror(req, ERRSRV, ERRaccess); 6836 return; 6837 } 6805 6838 } 6806 6839 … … 7109 7142 7110 7143 DEBUG(3,("call_trans2mkdir : name = %s\n", directory)); 7144 7145 status = resolve_dfspath(ctx, 7146 conn, 7147 req->flags2 & FLAGS2_DFS_PATHNAMES, 7148 directory, 7149 &directory); 7150 if (!NT_STATUS_IS_OK(status)) { 7151 if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) { 7152 reply_botherror(req, 7153 NT_STATUS_PATH_NOT_COVERED, 7154 ERRSRV, ERRbadpath); 7155 } 7156 reply_nterror(req, status); 7157 return; 7158 } 7111 7159 7112 7160 status = unix_convert(ctx, conn, directory, False, &directory, NULL, &sbuf);
Note:
See TracChangeset
for help on using the changeset viewer.