summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2011-03-01 19:17:49 +0100
committerJeremy Allison <jra@samba.org>2011-03-02 01:16:30 +0100
commit016a8d214ab23883e9d50c46d3a8cc18f9454368 (patch)
tree6be73542e65e0e3cc72124dd1123e0aa68aa5eef /source3/printing
parent09b4acfd81669583a38352550dc61107c72a1d42 (diff)
downloadsamba-016a8d214ab23883e9d50c46d3a8cc18f9454368.tar.gz
samba-016a8d214ab23883e9d50c46d3a8cc18f9454368.tar.bz2
samba-016a8d214ab23883e9d50c46d3a8cc18f9454368.zip
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 <jra@samba.org> Autobuild-Date: Wed Mar 2 01:16:30 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 3b805f4f55..d77320cf02 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -726,6 +726,7 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
}
if (conn != NULL) {
vfs_ChDir(conn, oldcwd);
+ SMB_VFS_DISCONNECT(conn);
conn_free(conn);
}
if (!NT_STATUS_IS_OK(*perr)) {
@@ -1130,6 +1131,7 @@ WERROR move_driver_to_download_area(struct pipes_struct *p,
if (conn != NULL) {
vfs_ChDir(conn, oldcwd);
+ SMB_VFS_DISCONNECT(conn);
conn_free(conn);
}
@@ -1968,6 +1970,7 @@ bool delete_driver_files(const struct auth_serversupplied_info *session_info,
err_out:
if (conn != NULL) {
vfs_ChDir(conn, oldcwd);
+ SMB_VFS_DISCONNECT(conn);
conn_free(conn);
}
return ret;