[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri May 20 14:53:01 MDT 2011
The branch, master has been updated
via 9f14d10 Fix bug #8157 - std_pcap_cache_reload() fails to parse a cups printcap file correctly.
from 95a55e2 Fix bug 8133 - strange behavior for the file (whose filename first character is period ) in SMB2 case.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9f14d10366e291ef635c80f55c095b5c34b6dd73
Author: Jeremy Allison <jra at samba.org>
Date: Fri May 20 12:27:02 2011 -0700
Fix bug #8157 - std_pcap_cache_reload() fails to parse a cups printcap file correctly.
The parsing code made some strange assumptions about what is a printer
name, and what is a comment.
Autobuild-User: Jeremy Allison <jra at samba.org>
Autobuild-Date: Fri May 20 22:52:23 CEST 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/printing/print_standard.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/printing/print_standard.c b/source3/printing/print_standard.c
index 6a86d84..c4f9c5b 100644
--- a/source3/printing/print_standard.c
+++ b/source3/printing/print_standard.c
@@ -93,6 +93,10 @@ bool std_pcap_cache_reload(const char *pcap_name)
has_punctuation = (strchr_m(p, ' ') ||
strchr_m(p, '\t') ||
+ strchr_m(p, '"') ||
+ strchr_m(p, '\'') ||
+ strchr_m(p, ';') ||
+ strchr_m(p, ',') ||
strchr_m(p, '(') ||
strchr_m(p, ')'));
@@ -101,11 +105,7 @@ bool std_pcap_cache_reload(const char *pcap_name)
continue;
}
- if (strlen(p) <= MAXPRINTERLEN &&
- strlen(p) > strlen(name) && !has_punctuation) {
- if (!*comment) {
- strlcpy(comment, name, sizeof(comment));
- }
+ if (strlen(p) <= MAXPRINTERLEN && *name == '\0' && !has_punctuation) {
strlcpy(name, p, sizeof(name));
continue;
}
@@ -117,9 +117,6 @@ bool std_pcap_cache_reload(const char *pcap_name)
}
}
- comment[60] = 0;
- name[MAXPRINTERLEN] = 0;
-
if (*name && !pcap_cache_add(name, comment, NULL)) {
x_fclose(pcap_file);
return false;
--
Samba Shared Repository
More information about the samba-cvs
mailing list