summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-09-11 17:35:12 +0000
committerGerald Carter <jerry@samba.org>2002-09-11 17:35:12 +0000
commitc989eaf48d18ed7547880a57a934690dc2519e90 (patch)
treec0710e9b8c4ee38d9513f23eb6eec1b19a72164e /source3/rpc_server
parent66f90f97bf13d7f1b9aa18cc59ba1d15b2d8d4b8 (diff)
downloadsamba-c989eaf48d18ed7547880a57a934690dc2519e90.tar.gz
samba-c989eaf48d18ed7547880a57a934690dc2519e90.tar.bz2
samba-c989eaf48d18ed7547880a57a934690dc2519e90.zip
DelPrinterDrvEx() fix from APP_HEAD
(This used to be commit 7841753a03f7fdbd2f7f22e1b184dc1891118283)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 5231e9e681..ae5f132508 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1935,20 +1935,21 @@ WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIV
if ( !W_ERROR_IS_OK(status) )
{
- /* if the client asked for a specific version, then we've failed */
+ /*
+ * if the client asked for a specific version,
+ * or this is something other than Windows NT x86,
+ * then we've failed
+ */
- if ( flags & DPD_DELETE_SPECIFIC_VERSION )
+ if ( (flags&DPD_DELETE_SPECIFIC_VERSION) || (version !=2) )
goto done;
/* try for Win2k driver if "Windows NT x86" */
- if ( version == 2 )
- {
- version = 3;
- if (!W_ERROR_IS_OK(get_a_printer_driver(&info, 3, driver, arch, version))) {
- status = WERR_UNKNOWN_PRINTER_DRIVER;
- goto done;
- }
+ version = 3;
+ if (!W_ERROR_IS_OK(get_a_printer_driver(&info, 3, driver, arch, version))) {
+ status = WERR_UNKNOWN_PRINTER_DRIVER;
+ goto done;
}
}
@@ -1988,6 +1989,7 @@ WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIV
if ( delete_files && printer_driver_files_in_use(info_win2k.info_3) & (flags&DPD_DELETE_ALL_FILES) ) {
/* no idea of the correct error here */
+ free_a_printer_driver( info_win2k, 3 );
status = WERR_ACCESS_DENIED;
goto done;
}
@@ -1995,7 +1997,7 @@ WERROR _spoolss_deleteprinterdriverex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDRIV
/* if we get to here, we now have 2 driver info structures to remove */
/* remove the Win2k driver first*/
- status_win2k = delete_printer_driver(info.info_3, &user, 3, delete_files);
+ status_win2k = delete_printer_driver(info_win2k.info_3, &user, 3, delete_files);
free_a_printer_driver( info_win2k, 3 );
/* this should not have failed---if it did, report to client */