summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-02 15:31:55 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-02 15:31:55 +0000
commit59fa2dbe2cb18762e14a86045c7ad403205a3841 (patch)
treea168c9c05ca68174f68f749f3a66e42a375026e4 /source3/printing
parent32d5416b6a777a7874fec8518ec44e750560d882 (diff)
downloadsamba-59fa2dbe2cb18762e14a86045c7ad403205a3841.tar.gz
samba-59fa2dbe2cb18762e14a86045c7ad403205a3841.tar.bz2
samba-59fa2dbe2cb18762e14a86045c7ad403205a3841.zip
added support for deleting printers into the spoolss system
(This used to be commit e72a5718537b84409fc20ff21951b1d1ab24d97f)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 0c9526b1ec..c70ed20998 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -614,6 +614,21 @@ static void save_specifics(NT_PRINTER_PARAM *param, int fd)
}
}
+
+/****************************************************************************
+delete a printer - this just deletes the printer info file, any open
+handles are not affected
+****************************************************************************/
+uint32 del_a_printer(char *portname)
+{
+ pstring file;
+
+ slprintf(file, sizeof(file), "%s/NTprinter_%s",
+ lp_nt_drivers_file(), portname);
+ if (unlink(file) != 0) return 2;
+ return 0;
+}
+
/****************************************************************************
****************************************************************************/
static uint32 add_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info)