diff options
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r-- | source3/smbd/trans2.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 77a13ad186..2b0925d195 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -3312,6 +3312,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * time_t create_time, mtime, atime; struct timespec create_time_ts, mtime_ts, atime_ts; files_struct *fsp = NULL; + struct file_id fileid; TALLOC_CTX *data_ctx = NULL; struct ea_list *ea_list = NULL; uint32 access_mask = 0x12019F; /* Default - GENERIC_EXECUTE mapping from Windows */ @@ -3378,7 +3379,8 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * return UNIXERROR(ERRDOS,ERRbadpath); } - delete_pending = get_delete_on_close_flag(file_id_sbuf(&sbuf)); + fileid = vfs_file_id_from_sbuf(conn, &sbuf); + delete_pending = get_delete_on_close_flag(fileid); } else { /* * Original code - this is an open file. @@ -3391,7 +3393,8 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * return(UNIXERROR(ERRDOS,ERRbadfid)); } pos = fsp->fh->position_information; - delete_pending = get_delete_on_close_flag(file_id_sbuf(&sbuf)); + fileid = vfs_file_id_from_sbuf(conn, &sbuf); + delete_pending = get_delete_on_close_flag(fileid); access_mask = fsp->access_mask; } } else { @@ -3446,7 +3449,8 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * return UNIXERROR(ERRDOS,ERRbadpath); } - delete_pending = get_delete_on_close_flag(file_id_sbuf(&sbuf)); + fileid = vfs_file_id_from_sbuf(conn, &sbuf); + delete_pending = get_delete_on_close_flag(fileid); if (delete_pending) { return ERROR_NT(NT_STATUS_DELETE_PENDING); } @@ -3572,8 +3576,10 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd mtime_ts = fsp->pending_modtime; } } else { + files_struct *fsp1; /* Do we have this path open ? */ - files_struct *fsp1 = file_find_di_first(file_id_sbuf(&sbuf)); + fileid = vfs_file_id_from_sbuf(conn, &sbuf); + fsp1 = file_find_di_first(fileid); if (fsp1 && !null_timespec(fsp1->pending_modtime)) { /* the pending modtime overrides the current modtime */ mtime_ts = fsp1->pending_modtime; |