+static struct files_struct *log_writeable_file_fn(
+ struct files_struct *fsp, void *private_data)
+{
+ bool *found = (bool *)private_data;
+ char *path;
+
+ if (!fsp->can_write) {
+ return NULL;
+ }
+ if (!(*found)) {
+ DEBUG(0, ("Writable files open at exit:\n"));
+ *found = true;
+ }
+
+ path = talloc_asprintf(talloc_tos(), "%s/%s", fsp->conn->connectpath,
+ smb_fname_str_dbg(fsp->fsp_name));
+ if (path == NULL) {
+ DEBUGADD(0, ("<NOMEM>\n"));
+ }
+
+ DEBUGADD(0, ("%s\n", path));
+
+ TALLOC_FREE(path);
+ return NULL;
+}
+