summaryrefslogtreecommitdiff
path: root/source3/rpc_server/spoolss
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2011-03-01 19:17:47 +0100
committerJeremy Allison <jra@samba.org>2011-03-02 00:31:22 +0100
commit14446b528069bc27222929bb38cf72099e450018 (patch)
treecea2b876c0803492227d58e37fb01f0f2728d0a1 /source3/rpc_server/spoolss
parent9f6193724e8f55854aaba39591edecf7029ad8f3 (diff)
downloadsamba-14446b528069bc27222929bb38cf72099e450018.tar.gz
samba-14446b528069bc27222929bb38cf72099e450018.tar.bz2
samba-14446b528069bc27222929bb38cf72099e450018.zip
s3-printing: fix move_driver_to_download_area() error paths
WERR_ACCESS_DENIED errors are mapped to WERR_UNKNOWN_PRINTER_DRIVER, resulting in incorrect error messages on Windows clients. move_driver_to_download_area() returns the same error status values to the caller via the *perr argument as well as the return value. The create_directory() call is not checked for error.
Diffstat (limited to 'source3/rpc_server/spoolss')
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 828d06aa1e..510dde2cbd 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -8003,8 +8003,8 @@ WERROR _spoolss_AddPrinterDriverEx(struct pipes_struct *p,
goto done;
DEBUG(5,("Moving driver to final destination\n"));
- if( !W_ERROR_IS_OK(err = move_driver_to_download_area(p, r->in.info_ctr,
- &err)) ) {
+ err = move_driver_to_download_area(p, r->in.info_ctr);
+ if (!W_ERROR_IS_OK(err)) {
goto done;
}