Changeset 233 for branches/samba-3.2.x/source/smbd/close.c
- Timestamp:
- May 27, 2009, 11:39:15 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/smbd/close.c
r232 r233 168 168 ****************************************************************************/ 169 169 170 staticNTSTATUS delete_all_streams(connection_struct *conn, const char *fname)170 NTSTATUS delete_all_streams(connection_struct *conn, const char *fname) 171 171 { 172 172 struct stream_struct *stream_info; … … 468 468 struct timespec ts[2]; 469 469 NTSTATUS status; 470 int ret = -1; 470 471 471 472 ZERO_STRUCT(sbuf); … … 482 483 /* Ensure we have a valid stat struct for the source. */ 483 484 if (fsp->fh->fd != -1) { 484 if (SMB_VFS_FSTAT(fsp, &sbuf) == -1) { 485 return map_nt_error_from_unix(errno); 486 } 485 ret = SMB_VFS_FSTAT(fsp, &sbuf); 487 486 } else { 488 if (SMB_VFS_STAT(fsp->conn,fsp->fsp_name,&sbuf) == -1) { 489 return map_nt_error_from_unix(errno); 490 } 487 if (fsp->posix_open) { 488 ret = SMB_VFS_LSTAT(fsp->conn,fsp->fsp_name,&sbuf); 489 } else { 490 ret = SMB_VFS_STAT(fsp->conn,fsp->fsp_name,&sbuf); 491 } 492 } 493 494 if (ret == -1) { 495 return map_nt_error_from_unix(errno); 491 496 } 492 497 … … 576 581 577 582 saved_status4 = update_write_time_on_close(fsp); 583 if (NT_STATUS_EQUAL(saved_status4, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { 584 /* Someone renamed the file or a parent directory containing 585 * this file. We can't do anything about this, we don't have 586 * an "update timestamp by fd" call in POSIX. Eat the error. */ 587 588 saved_status4 = NT_STATUS_OK; 589 } 578 590 579 591 if (NT_STATUS_IS_OK(status)) {
Note:
See TracChangeset
for help on using the changeset viewer.