fsp->conn = conn;
fsp->close_write_time = make_omit_timespec();
+ GetTimeOfDay(&fsp->open_time);
+ fsp_set_gen_id(fsp);
+ /*
+ * A new fsp invalidates the positive and
+ * negative fsp_fi_cache as the new fsp is pushed
+ * at the start of the list and we search from
+ * a cache hit to the *end* of the list.
+ */
+ ZERO_STRUCT(conn->sconn->fsp_fi_cache);
+
DLIST_ADD(sconn->files, fsp);
sconn->num_files += 1;
NTSTATUS file_new(struct smb_request *req, connection_struct *conn,
files_struct **result)
{
- struct smbd_server_connection *sconn = conn->sconn;
files_struct *fsp;
NTSTATUS status;
return status;
}
- GetTimeOfDay(&fsp->open_time);
-
status = fsp_bind_smb(fsp, req);
if (!NT_STATUS_IS_OK(status)) {
file_free(NULL, fsp);
return status;
}
- fsp_set_gen_id(fsp);
-
/*
* Create an smb_filename with "" for the base_name. There are very
* few NULL checks, so make sure it's initialized with something. to
DBG_INFO("new file %s\n", fsp_fnum_dbg(fsp));
- /* A new fsp invalidates the positive and
- negative fsp_fi_cache as the new fsp is pushed
- at the start of the list and we search from
- a cache hit to the *end* of the list. */
-
- ZERO_STRUCT(sconn->fsp_fi_cache);
-
*result = fsp;
return NT_STATUS_OK;
}
return status;
}
- GetTimeOfDay(&fsp->open_time);
- fsp_set_gen_id(fsp);
- ZERO_STRUCT(conn->sconn->fsp_fi_cache);
-
fsp->fsp_flags.is_pathref = true;
status = fsp_attach_smb_fname(fsp, full_fname);