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)
committerBjoern Jacke <bj@sernet.de>
Wed, 25 Apr 2018 11:55:25 +0000 (13:55 +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

source3/printing/nt_printing.c

index 241af37743ef9b1f0ecb59239743938bbf11f982..54357b787f3e738e398e2ef9abb86dd479fa7a57 100644 (file)
@@ -1217,7 +1217,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;
                }
        }