summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-02 08:53:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:08 -0500
commit4b15f31f106f1dd69fdda721b5c3b787f5245a80 (patch)
tree34e14d007c0dc257723fff1379cb0968bfb6f410 /source3/smbd/trans2.c
parenta0a9a301d258ffdd6e1f35a9d4d32c555237556c (diff)
downloadsamba-4b15f31f106f1dd69fdda721b5c3b787f5245a80.tar.gz
samba-4b15f31f106f1dd69fdda721b5c3b787f5245a80.tar.bz2
samba-4b15f31f106f1dd69fdda721b5c3b787f5245a80.zip
r24120: add a file_id_create() hook into the VFS layer
it's needed for some cluster filesystems to overload this function. metze (This used to be commit cdaa24e8047399002e4b287a31a8340a665e580f)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c14
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;