diff options
author | Gerald Carter <jerry@samba.org> | 2003-08-23 03:34:24 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-08-23 03:34:24 +0000 |
commit | 983b4e7011174961748eb5d3011ec59b25d0917e (patch) | |
tree | 7d18d852e5938b044b6e295fec446cad62ca9ff8 /source3/rpc_server | |
parent | dac11b890b3e81f8849340e582b7f397a612baba (diff) | |
download | samba-983b4e7011174961748eb5d3011ec59b25d0917e.tar.gz samba-983b4e7011174961748eb5d3011ec59b25d0917e.tar.bz2 samba-983b4e7011174961748eb5d3011ec59b25d0917e.zip |
it never amazes me when some new things crawls out of the windows
spooler. :-(
When installing the Adobe PS driver onto a Samba printer via cupsaddsmb,
I noticed a WIN2k client sending DeletePrinterData("DependentFiles")
pver and over. I also noticed that we never checked to see if the
value was valid. No now we do and return WERR_BADFILE which I think
is correct.
Next, I noticed that we never wrote the updated printer out to disk
after a succesfully DeletePrinterData[Ex]().
Finally, I found a driver (Canon BJC 1000 using the Adobe PS drivers
and foomatic PPD file) that was destroying the device name string
in the devmode. So now get_a_printer_2() always writes out the
device name in \\server\share form.
I think these changes might fix bug 294.
(This used to be commit deb25780874b66e68ac597db24fbc50e7f7458b5)
Diffstat (limited to 'source3/rpc_server')
-rwxr-xr-x | source3/rpc_server/srv_spoolss.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c index a903ae9029..f846813a40 100755 --- a/source3/rpc_server/srv_spoolss.c +++ b/source3/rpc_server/srv_spoolss.c @@ -141,7 +141,7 @@ static BOOL api_spoolss_deleteprinterdata(pipes_struct *p) return False; } - r_u.status = _spoolss_deleteprinterdata( p, &q_u, &r_u); + r_u.status = _spoolss_deleteprinterdata( p, &q_u, &r_u ); if (!spoolss_io_r_deleteprinterdata("", &r_u, rdata, 0)) { DEBUG(0,("spoolss_io_r_deleteprinterdata: unable to marshall SPOOL_R_DELETEPRINTERDATA.\n")); diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 646aac347c..7159527a7d 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -8023,6 +8023,9 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_ unistr2_to_ascii( valuename, value, sizeof(valuename)-1 ); status = delete_printer_dataex( printer, SPOOL_PRINTERDATA_KEY, valuename ); + + if ( W_ERROR_IS_OK(status) ) + mod_a_printer( *printer, 2 ); free_a_printer(&printer, 2); @@ -8886,6 +8889,9 @@ WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX status = delete_printer_dataex( printer, keyname, valuename ); + if ( W_ERROR_IS_OK(status) ) + mod_a_printer( *printer, 2 ); + free_a_printer(&printer, 2); return status; |