summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-05-19 17:17:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:38 -0500
commit509c71fef5bc3c8a3ec1b99fc1b4268c4b945a4f (patch)
tree840c3f7bf963a0e4bccc8cdf09008bd69a299626 /source3/printing
parent9d084af77c2fee3682e86a12a19ee3942be9ed8d (diff)
downloadsamba-509c71fef5bc3c8a3ec1b99fc1b4268c4b945a4f.tar.gz
samba-509c71fef5bc3c8a3ec1b99fc1b4268c4b945a4f.tar.bz2
samba-509c71fef5bc3c8a3ec1b99fc1b4268c4b945a4f.zip
r783: fix bug in reading printer data from disk; all ow valuenames with embedded '\'s
(This used to be commit fdc1633c348b072a6dde45a3d9b3b8a19744613d)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index ccee2565e1..909aed6c86 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2053,10 +2053,13 @@ static WERROR update_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info)
* and printer is \\server\\printer
*
* Samba manages only local printers.
- * we currently don't support things like path=\\other_server\printer
+ * we currently don't support things like i
+ * path=\\other_server\printer
+ *
+ * We only store the printername, not \\server\printername
*/
- if (info->servername[0]!='\0') {
+ if ( info->servername[0] != '\0' ) {
trim_string(info->printername, info->servername, NULL);
trim_char(info->printername, '\\', '\0');
info->servername[0]='\0';
@@ -3067,10 +3070,13 @@ static int unpack_values(NT_PRINTER_DATA *printer_data, char *buf, int buflen)
/*
* break of the keyname from the value name.
- * Should only be one '\' in the string returned.
+ * Valuenames can have embedded '\'s so be careful.
+ * only support one level of keys. See the
+ * "Konica Fiery S300 50C-K v1.1. enu" 2k driver.
+ * -- jerry
*/
- str = strrchr( string, '\\');
+ str = strchr_m( string, '\\');
/* Put in "PrinterDriverData" is no key specified */