return true;
}
+bool defer_smb1_sharing_violation(struct smb_request *req)
+{
+ bool ok;
+ int timeout_usecs;
+
+ if (!lp_defer_sharing_violations()) {
+ return false;
+ }
+
+ /*
+ * Try every 200msec up to (by default) one second. To be
+ * precise, according to behaviour note <247> in [MS-CIFS],
+ * the server tries 5 times. But up to one second should be
+ * close enough.
+ */
+
+ timeout_usecs = lp_parm_int(
+ SNUM(req->conn),
+ "smbd",
+ "sharedelay",
+ SHARING_VIOLATION_USEC_WAIT);
+
+ ok = setup_poll_open(
+ req,
+ (struct file_id) {0},
+ (struct timeval) { .tv_usec = timeout_usecs },
+ (struct timeval) { .tv_usec = 200000 });
+ return ok;
+}
+
/****************************************************************************
On overwrite open ensure that the attributes match.
****************************************************************************/
uint16_t break_to);
struct deferred_open_record;
bool is_deferred_open_async(const struct deferred_open_record *rec);
+bool defer_smb1_sharing_violation(struct smb_request *req);
NTSTATUS create_directory(connection_struct *conn, struct smb_request *req,
struct smb_filename *smb_dname);
void msg_file_was_renamed(struct messaging_context *msg,