Ignore:
Timestamp:
May 24, 2009, 7:45:16 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 branch to 3.3.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/smbd/close.c

    r221 r222  
    468468        struct timespec ts[2];
    469469        NTSTATUS status;
     470        int ret = -1;
    470471
    471472        ZERO_STRUCT(sbuf);
     
    482483        /* Ensure we have a valid stat struct for the source. */
    483484        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);
    487486        } 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);
    491496        }
    492497
     
    576581
    577582        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        }
    578590
    579591        if (NT_STATUS_IS_OK(status)) {
Note: See TracChangeset for help on using the changeset viewer.