diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/printing/nt_printing.c | 7 | ||||
-rwxr-xr-x | source3/rpc_server/srv_spoolss.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 60a6ecba4b..294b9c9018 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2256,7 +2256,7 @@ int unpack_devicemode(NT_DEVICEMODE **nt_devmode, char *buf, int buflen) int len = 0; int extra_len = 0; NT_DEVICEMODE devmode; - + ZERO_STRUCT(devmode); len += tdb_unpack(buf+len, buflen-len, "p", nt_devmode); @@ -3206,6 +3206,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, const char *sh int len = 0; TDB_DATA kbuf, dbuf; fstring printername; + char adevice[MAXDEVICENAME]; ZERO_STRUCT(info); @@ -3266,6 +3267,10 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, const char *sh printername)); info.devmode = construct_nt_devicemode(printername); } + + safe_strcpy(adevice, info.printername, sizeof(adevice)-1); + fstrcpy(info.devmode->devicename, adevice); + len += unpack_values( &info.data, dbuf.dptr+len, dbuf.dsize-len ); 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; |