diff options
author | Gerald Carter <jerry@samba.org> | 2006-04-28 15:35:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:34 -0500 |
commit | d4a51cc5009ac2794070e8f9b159d17be7af8a47 (patch) | |
tree | a3f1135ac34abdfc0380f87e93b1be2055fb2228 | |
parent | 358fd531f47cce6a28f9f1d787341bc9d0fdd846 (diff) | |
download | samba-d4a51cc5009ac2794070e8f9b159d17be7af8a47.tar.gz samba-d4a51cc5009ac2794070e8f9b159d17be7af8a47.tar.bz2 samba-d4a51cc5009ac2794070e8f9b159d17be7af8a47.zip |
r15309: normalize printing keys when deleting
(This used to be commit 037f9f831e001a12261419e37c725558dd717af9)
-rw-r--r-- | source3/printing/nt_printing.c | 10 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 15 |
2 files changed, 3 insertions, 22 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 1a664fbb34..54d7e8040c 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2298,18 +2298,14 @@ static int pack_values(NT_PRINTER_DATA *data, char *buf, int buflen) uint32 del_a_printer(const char *sharename) { - pstring key; TDB_DATA kbuf; pstring printdb_path; - slprintf(key, sizeof(key)-1, "%s%s", PRINTERS_PREFIX, sharename); - kbuf.dptr=key; - kbuf.dsize=strlen(key)+1; + kbuf = make_printer_tdbkey( sharename ); tdb_delete(tdb_printers, kbuf); - slprintf(key, sizeof(key)-1, "%s%s", SECDESC_PREFIX, sharename); - kbuf.dptr=key; - kbuf.dsize=strlen(key)+1; + kbuf.dptr = make_printers_secdesc_tdbkey( sharename ); + kbuf.dsize = strlen(kbuf.dptr) + 1; tdb_delete(tdb_printers, kbuf); close_all_print_db(); diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index aede762ed4..70470a45e7 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -7657,21 +7657,6 @@ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, goto done; } - /* BEGIN_ADMIN_LOG */ - switch(level) { - case 3: - fstrcpy(driver_name, driver.info_3->name ? driver.info_3->name : ""); - sys_adminlog(LOG_INFO,"Added printer driver. Print driver name: %s. Print driver OS: %s. Administrator name: %s.", - driver_name, get_drv_ver_to_os(driver.info_3->cversion),uidtoname(user.ut.uid)); - break; - case 6: - fstrcpy(driver_name, driver.info_6->name ? driver.info_6->name : ""); - sys_adminlog(LOG_INFO,"Added printer driver. Print driver name: %s. Print driver OS: %s. Administrator name: %s.", - driver_name, get_drv_ver_to_os(driver.info_6->version),uidtoname(user.ut.uid)); - break; - } - /* END_ADMIN_LOG */ - /* * I think this is where he DrvUpgradePrinter() hook would be * be called in a driver's interface DLL on a Windows NT 4.0/2k |