op->global->backend_file_id);
if (sharemode_lock == NULL) {
/* TODO: use/create other fetch func with better error code */
+DEBUG(0, ("OBNOX - durable_reconnect: share-mode lock not obtained from db (%s:%s)\n", __location__, __FUNCTION__));
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
if (sharemode_lock->data->num_share_modes == 0) {
/* should not happen? internal error? */
+DEBUG(0, ("OBNOX - durable_reconnect: no share-mode entry (%s:%s)\n", __location__, __FUNCTION__));
return NT_STATUS_INTERNAL_DB_ERROR;
}
* It can't be durable if there is more than one handle
* on the file.
*/
+DEBUG(0, ("OBNOX - durable_reconnect: more than one share-mode entry - can't be durable (%s:%s)\n", __location__, __FUNCTION__));
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
* TODO: check whether session exists
* (could have been a session_logoff())
*/
+DEBUG(0, ("OBNOX - durable_reconnect: serverid exists - denying access to durable (%s:%s)\n", __location__, __FUNCTION__));
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
*/
status = new_durable_reconnect_fsp(op, conn, smb_fname, conn, &fsp);
if (!NT_STATUS_IS_OK(status)) {
+DEBUG(0, ("OBNOX - durable_reconnect: failed to create new fsp: %s (%s:%s)\n", nt_errstr(status), __location__, __FUNCTION__));
return status;
}
sharemode_lock->data->share_modes[0].flags,
0 /* mode */);
if (fsp->fh->fd == -1) {
+DEBUG(0, ("OBNOX - durable_reconnect: failed to open file: %s (%s:%s)\n", nt_errstr(status), __location__, __FUNCTION__));
status = map_nt_error_from_unix(errno);
return status;
}
+DEBUG(0, ("OBNOX - durable_reconnect: opened file (%s:%s)\n", __location__, __FUNCTION__));
+
/* - release the sharemode lock: this writes the changes */
talloc_free(sharemode_lock);