summaryrefslogtreecommitdiffstats
path: root/source/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
commit7841753a03f7fdbd2f7f22e1b184dc1891118283 (patch)
tree28033d59cfdc51973bdea1e3c030a80b58f496a2 /source/rpc_server
parentf0c741594f0dad2da16b1d5692dd56a48b4157f1 (diff)
downloadsamba-7841753a03f7fdbd2f7f22e1b184dc1891118283.tar.gz
samba-7841753a03f7fdbd2f7f22e1b184dc1891118283.tar.xz
samba-7841753a03f7fdbd2f7f22e1b184dc1891118283.zip
DelPrinterDrvEx() fix from APP_HEAD
Diffstat (limited to 'source/rpc_server')
-rw-r--r--source/rpc_server/srv_spoolss_nt.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c
index 5231e9e681c..ae5f1325086 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/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 */