From 016a8d214ab23883e9d50c46d3a8cc18f9454368 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Tue, 1 Mar 2011 19:17:49 +0100 Subject: s3-printing: vfs_connect prior to driver/dfs IO samba3.posix_s3.rpc.spoolss.driver fails with the xattr_tdb vfs module loaded as a part of make test. The (now checked) create_directory() call in move_driver_to_download_area() fails, uncovering another bug in the printer driver upload code path. move_driver_to_download_area() creates a new conn_struct for manipulating files in [print$]. The VFS layer is plumbed through with the call to create_conn_struct(), however SMB_VFS_CONNECT() is never called. Many vfs modules expect state stored at connect time with SMB_VFS_HANDLE_SET_DATA() to be available on any IO operation and fail if this is not the case. This fix adds a call to SMB_VFS_CONNECT() in create_conn_struct() prior to IO. https://bugzilla.samba.org/show_bug.cgi?id=7976 Autobuild-User: Jeremy Allison Autobuild-Date: Wed Mar 2 01:16:30 CET 2011 on sn-devel-104 --- source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index 31df4886bb..40687a0e4e 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -2231,6 +2231,7 @@ error_exit: } if (conn) { + SMB_VFS_DISCONNECT(conn); conn_free(conn); } @@ -2374,6 +2375,7 @@ error_exit: } if (conn) { + SMB_VFS_DISCONNECT(conn); conn_free(conn); } -- cgit