printing: return the same error code as windows does on upload failures
authorBjörn Jacke <bjacke@samba.org>
Thu, 19 Apr 2018 14:14:38 +0000 (16:14 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 7 May 2018 07:56:11 +0000 (09:56 +0200)
Some print drivers inf files are broken and cause driver installation to fail
on Samba servers. Windows returns WERR_APP_INIT_FAILURE in that case, we should
do the same. Windows machines are less unlucky with that.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13395

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Apr 25 13:55:25 CEST 2018 on sn-devel-144

(cherry picked from commit 35f2afe411a3b22fb1befadb3bee8da1bc14753c)

source3/printing/nt_printing.c

index 2e500f18c7d249fce970ab1fa3c1ade549e9974f..a3b2b2aaba030d70b3abf1d8ceb88f836ec6aa2c 100644 (file)
@@ -1205,7 +1205,7 @@ static WERROR move_driver_file_to_download_area(TALLOC_CTX *mem_ctx,
                                 "to rename [%s] to [%s]: %s\n",
                                 smb_fname_old->base_name, new_name,
                                 nt_errstr(status)));
-                       ret = WERR_ACCESS_DENIED;
+                       ret = WERR_APP_INIT_FAILURE;
                        goto out;
                }
        }