}
/*
- * Right now we don't clean up immediately. Re-open the 2nd connection.
+ * Give the suicidal smbd a bit of time to really pass away
*/
-#if 1
- cli_shutdown(cli2);
- if (!torture_open_connection(&cli2, 0)) {
- return false;
- }
- status = cli_ntcreate(
- cli2, fname, 0, FILE_GENERIC_READ|FILE_GENERIC_WRITE,
- FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0, &fnum2, NULL);
- if (!NT_STATUS_IS_OK(status)) {
- printf("open of %s failed (%s)\n", fname, nt_errstr(status));
- return false;
- }
-#endif
+ smb_msleep(1000);
+
status = cli_smbwrite(cli2, fnum2, &buf, 0, 1, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("write failed: %s\n", nt_errstr(status));