summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-06-15 17:03:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:16 -0500
commitf2f115c2a203c1a7b685ff3795c9e342499c1cc9 (patch)
treec421d2e269100b0c54deae763b98743d8deb0f66 /source3/printing
parent9b43bd3b62733992d06b6d8e602364efa816685c (diff)
downloadsamba-f2f115c2a203c1a7b685ff3795c9e342499c1cc9.tar.gz
samba-f2f115c2a203c1a7b685ff3795c9e342499c1cc9.tar.bz2
samba-f2f115c2a203c1a7b685ff3795c9e342499c1cc9.zip
r7614: convert move_driver_to_download_area() to return WERROR in order to provide better error messages to clients when a AddPrinterDriver[Ex]() call fails
(This used to be commit c98e17446afffc4b12f1a31f6e5cce517fc0a95b)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index a92b711408..6b037689a2 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1561,7 +1561,7 @@ static char* ffmt(unsigned char *c){
/****************************************************************************
****************************************************************************/
-BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level,
+WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level,
struct current_user *user, WERROR *perr)
{
NT_PRINTER_DRIVER_INFO_LEVEL_3 *driver;
@@ -1592,7 +1592,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
driver = &converted_driver;
} else {
DEBUG(0,("move_driver_to_download_area: Unknown info level (%u)\n", (unsigned int)level ));
- return False;
+ return WERR_UNKNOWN_LEVEL;
}
architecture = get_short_archi(driver->environment);
@@ -1611,7 +1611,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
if (conn == NULL) {
DEBUG(0,("move_driver_to_download_area: Unable to connect\n"));
*perr = ntstatus_to_werror(nt_status);
- return False;
+ return WERR_NO_SUCH_SHARE;
}
/*
@@ -1620,7 +1620,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
if (!become_user(conn, conn->vuid)) {
DEBUG(0,("move_driver_to_download_area: Can't become user!\n"));
- return False;
+ return WERR_ACCESS_DENIED;
}
/*
@@ -1778,7 +1778,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
close_cnum(conn, user->vuid);
unbecome_user();
- return ver == -1 ? False : True;
+ return ver != -1 ? WERR_OK : WERR_UNKNOWN_PRINTER_DRIVER;
}
/****************************************************************************