From fedora-cvs-commits at redhat.com Mon Dec 3 02:08:09 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Sun, 2 Dec 2007 21:08:09 -0500 Subject: rpms/paps/FC-6 paps-0.6.8-shared.patch, NONE, 1.1 paps-0.6.8-wordwrap.patch, NONE, 1.1 paps-cpilpi.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 paps-cups.patch, 1.10, 1.11 paps.spec, 1.22, 1.23 sources, 1.2, 1.3 paps-0.6.6-cpilpi.patch, 1.2, NONE paps-0.6.6-encoding.patch, 1.2, NONE paps-0.6.6-font-option.patch, 1.2, NONE paps-0.6.6-lcctype.patch, 1.1, NONE paps-0.6.6-segfault.patch, 1.1, NONE paps-0.6.6-wordwrap.patch, 1.3, NONE paps-formfeed.patch, 1.1, NONE paps-makefile.patch, 1.1, NONE paps-typo-font-scale.patch, 1.1, NONE Message-ID: <200712030208.lB3289An030310@cvs.devel.redhat.com> Author: tagoh Update of /cvs/dist/rpms/paps/FC-6 In directory cvs.devel.redhat.com:/tmp/cvs-serv30272 Modified Files: .cvsignore paps-cups.patch paps.spec sources Added Files: paps-0.6.8-shared.patch paps-0.6.8-wordwrap.patch paps-cpilpi.patch Removed Files: paps-0.6.6-cpilpi.patch paps-0.6.6-encoding.patch paps-0.6.6-font-option.patch paps-0.6.6-lcctype.patch paps-0.6.6-segfault.patch paps-0.6.6-wordwrap.patch paps-formfeed.patch paps-makefile.patch paps-typo-font-scale.patch Log Message: * Fri Nov 30 2007 Akira TAGOH - 0.6.8-1 - New upstream release. - Remove patches merged and unnecessary anymore: - paps-makefile.patch - paps-formfeed.patch - paps-0.6.6-encoding.patch - paps-typo-font-scale.patch - paps-0.6.6-segfault.patch - paps-0.6.6-font-option.patch - paps-0.6.6-lcctype.patch - paps-0.6.8-shared.patch: Enable building shared library. - paps-0.6.8-wordwrap.patch: Update a bit to get it working without an wordwrap mode. - Add paps-libs and paps-devel package. - paps-cups.patch: Update. - paps-cpilpi.patch: Update. - Fix the wrong rendering with CPI option. (#237202) - Fix the unnecessary rotation with the landscape option when paps is running as CUPS filter. (#222137) paps-0.6.8-shared.patch: Makefile.am | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) --- NEW FILE paps-0.6.8-shared.patch --- diff -ruN paps-0.6.8.orig/src/Makefile.am paps-0.6.8/src/Makefile.am --- paps-0.6.8.orig/src/Makefile.am 2006-04-17 16:42:08.000000000 +0900 +++ paps-0.6.8/src/Makefile.am 2007-11-16 11:50:07.000000000 +0900 @@ -1,15 +1,15 @@ man_MANS = paps.1 -lib_LIBRARIES = libpaps.a -libpaps_a_SOURCES = libpaps.c -libpaps_a_inc_HEADERS = libpaps.h -libpaps_a_incdir = $(includedir) +lib_LTLIBRARIES = libpaps.la +libpaps_la_SOURCES = libpaps.c +libpapsinc_HEADERS = libpaps.h +libpapsincdir = $(includedir) bin_PROGRAMS = paps paps_CFLAGS = -Wall paps_SOURCES = paps.c -paps_LDADD = $(lib_LIBRARIES) $(all_libraries) +paps_LDADD = $(lib_LTLIBRARIES) $(all_libraries) paps_LDFLAGS = `pkg-config --libs pangoft2` -paps_DEPENDENCIES = $(lib_LIBRARIES) +paps_DEPENDENCIES = $(lib_LTLIBRARIES) EXTRA_DIST = test_libpaps.c paps.1 @@ -21,7 +21,7 @@ test_libpaps_SOURCES = test_libpaps.c -test_libpaps_LDADD = $(lib_LIBRARIES) $(all_libraries) +test_libpaps_LDADD = $(lib_LTLIBRARIES) $(all_libraries) test_libpaps_LDFLAGS = `pkg-config --libs pangoft2` -test_libpaps_DEPENDENCIES = $(lib_LIBRARIES) +test_libpaps_DEPENDENCIES = $(lib_LTLIBRARIES) paps-0.6.8-wordwrap.patch: paps.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) --- NEW FILE paps-0.6.8-wordwrap.patch --- diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c --- paps-0.6.8.orig/src/paps.c 2007-04-13 14:04:14.000000000 +0900 +++ paps-0.6.8/src/paps.c 2007-11-16 12:28:11.000000000 +0900 @@ -723,9 +723,12 @@ split_text_into_paragraphs (PangoContext pango_layout_set_alignment (para->layout, page_layout->pango_dir == PANGO_DIRECTION_LTR ? PANGO_ALIGN_LEFT : PANGO_ALIGN_RIGHT); - pango_layout_set_wrap (para->layout, PANGO_WRAP_WORD_CHAR); - - pango_layout_set_width (para->layout, paint_width * PANGO_SCALE); + if (page_layout->do_wordwrap) { + pango_layout_set_wrap (para->layout, PANGO_WRAP_WORD_CHAR); + pango_layout_set_width (para->layout, paint_width * PANGO_SCALE); + } else { + pango_layout_set_width (para->layout, -1); + } para->height = 0; result = g_list_prepend (result, para); @@ -754,9 +757,13 @@ split_text_into_paragraphs (PangoContext pango_layout_set_alignment (para->layout, page_layout->pango_dir == PANGO_DIRECTION_LTR ? PANGO_ALIGN_LEFT : PANGO_ALIGN_RIGHT); - pango_layout_set_wrap (para->layout, PANGO_WRAP_WORD_CHAR); + if (page_layout->do_wordwrap) { + pango_layout_set_wrap (para->layout, PANGO_WRAP_WORD_CHAR); + pango_layout_set_width (para->layout, paint_width * PANGO_SCALE); + } else { + pango_layout_set_width (para->layout, -1); + } - pango_layout_set_width (para->layout, paint_width * PANGO_SCALE); para->height = 0; last_para = next; paps-cpilpi.patch: paps.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) --- NEW FILE paps-cpilpi.patch --- diff -pruN -x .libs -x '*o' -x '*ps' ../paps-0.6.8.orig/src/paps.c ../paps-0.6.8/src/paps.c --- paps-0.6.8.orig/src/paps.c 2007-11-28 16:20:56.000000000 +0900 +++ paps-0.6.8/src/paps.c 2007-11-30 17:53:06.000000000 +0900 @@ -92,8 +92,8 @@ typedef struct { gchar *filename; gchar *header_font_desc; gchar *owner; - gint lpi; - gint cpi; + gdouble lpi; + gdouble cpi; } page_layout_t; typedef struct { @@ -376,6 +376,7 @@ int main(int argc, char *argv[]) bottom_margin = 36; page_width = 612; page_height = 792; + do_stretch_chars = TRUE; if (argc < 6 || argc > 7) { fprintf(stderr, "ERROR: %s job-id user title copies options [file]\n", prgname); @@ -596,7 +597,8 @@ int main(int argc, char *argv[]) /* calculate x-coordinate scale */ if (page_layout.cpi > 0.0L) { - double scale; + gint font_size; + fontmap = pango_ft2_font_map_new (); fontset = pango_font_map_load_fontset (fontmap, pango_context, font_description, get_language ()); metrics = pango_fontset_get_metrics (fontset); @@ -608,13 +610,10 @@ int main(int argc, char *argv[]) pango_font_metrics_unref (metrics); g_object_unref (G_OBJECT (fontmap)); - // Now figure out how to scale the font to get that size - scale = 1 / page_layout.cpi * 72.0 * PANGO_SCALE / max_width; - + font_size = pango_font_description_get_size (font_description); // update the font size to that width - pango_font_description_set_size (font_description, (int)(atoi(DEFAULT_FONT_SIZE) * PANGO_SCALE * scale)); + pango_font_description_set_size (font_description, font_size * page_layout.scale_x); pango_context_set_font_description (pango_context, font_description); - } page_layout.scale_x = page_layout.scale_y = 1.0; @@ -1002,6 +1001,7 @@ output_pages(FILE *OUT, int column_y_pos = 0; int page_idx = 1; int pango_column_height = page_layout->column_height * page_layout->pt_to_pixel * PANGO_SCALE; + int height = 0; LineLink *prev_line_link = NULL; start_page(OUT, page_idx); @@ -1039,17 +1039,17 @@ output_pages(FILE *OUT, ); } } + if (page_layout->lpi > 0.0L) + height = (int)(1.0 / page_layout->lpi * 72.0 * page_layout->pt_to_pixel * PANGO_SCALE); + else + height = line_link->logical_rect.height; draw_line_to_page(OUT, column_idx, - column_y_pos+line_link->logical_rect.height, + column_y_pos+height, page_layout, line); - if (page_layout->lpi > 0.0L) - column_y_pos += (int)(1.0 / page_layout->lpi * 72.0 * page_layout->pt_to_pixel * PANGO_SCALE); - else - column_y_pos += line_link->logical_rect.height; - + column_y_pos += height; pango_lines = pango_lines->next; prev_line_link = line_link; } Index: .cvsignore =================================================================== RCS file: /cvs/dist/rpms/paps/FC-6/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- .cvsignore 29 Jun 2006 10:55:20 -0000 1.3 +++ .cvsignore 3 Dec 2007 02:08:06 -0000 1.4 @@ -2,3 +2,4 @@ *gz *bz2 paps-0.6.6.tar.gz +paps-0.6.8.tar.gz paps-cups.patch: configure.in | 13 ++++ src/Makefile.am | 4 - src/paps.c | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 185 insertions(+), 9 deletions(-) Index: paps-cups.patch =================================================================== RCS file: /cvs/dist/rpms/paps/FC-6/paps-cups.patch,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- paps-cups.patch 7 Mar 2007 12:10:32 -0000 1.10 +++ paps-cups.patch 3 Dec 2007 02:08:07 -0000 1.11 @@ -1,7 +1,7 @@ -diff -pruN -x Makefile -x Makefile.in -x '*.m4' -x autom4te.cache -x 'config.*' -x configure -x doc -x libtool -x .deps -x .libs -x '*.ps' -x foo -x paps -x 'lib*' -x texttopaps -x '*o' -x '*.cups' -x 'test*' -x 'stamp*' paps-0.6.6.orig/configure.in paps-0.6.6/configure.in ---- paps-0.6.6.orig/configure.in 2006-04-28 04:41:36.000000000 +0900 -+++ paps-0.6.6/configure.in 2007-02-15 23:34:24.000000000 +0900 -@@ -7,4 +7,17 @@ AC_LANG_C +diff -pruN paps-0.6.8.orig/configure.in paps-0.6.8/configure.in +--- paps-0.6.8.orig/configure.in 2007-01-19 20:06:10.000000000 +0900 ++++ paps-0.6.8/configure.in 2007-11-30 18:40:32.000000000 +0900 +@@ -7,6 +7,19 @@ AC_LANG_C AC_PROG_CC AM_PROG_LIBTOOL @@ -10,55 +10,57 @@ +dnl ====================================================== +AC_PATH_PROG(CUPS_CONFIG, cups-config, no) +if test "$CUPS_CONFIG" = "no"; then -+ AC_MSG_ERROR([Please install cups development packages]) ++ AC_MSG_ERROR([Please install cups development packages/files]) +fi -+CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'` ++CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed -e 's/-O[0-9]*//' -e 's/-m[^\t]*//g'` +CUPS_LIBS=`$CUPS_CONFIG --libs` + +AC_SUBST(CUPS_CFLAGS) +AC_SUBST(CUPS_LIBS) + - AC_OUTPUT(Makefile src/Makefile doc/Makefile) -diff -pruN -x Makefile -x Makefile.in -x '*.m4' -x autom4te.cache -x 'config.*' -x configure -x doc -x libtool -x .deps -x .libs -x '*.ps' -x foo -x paps -x 'lib*' -x texttopaps -x '*o' -x '*.cups' -x 'test*' -x 'stamp*' paps-0.6.6.orig/src/Makefile.am paps-0.6.6/src/Makefile.am ---- paps-0.6.6.orig/src/Makefile.am 2007-02-15 22:59:47.000000000 +0900 -+++ paps-0.6.6/src/Makefile.am 2007-02-15 23:34:24.000000000 +0900 -@@ -5,10 +5,10 @@ libpaps_a_inc_HEADERS = libpaps.h - libpaps_a_incdir = $(includedir) + DX_HTML_FEATURE(ON) + DX_CHM_FEATURE(OFF) + DX_CHI_FEATURE(OFF) +diff -pruN paps-0.6.8.orig/src/Makefile.am paps-0.6.8/src/Makefile.am +--- paps-0.6.8.orig/src/Makefile.am 2007-11-30 18:40:15.000000000 +0900 ++++ paps-0.6.8/src/Makefile.am 2007-11-30 18:40:32.000000000 +0900 +@@ -5,10 +5,10 @@ libpapsinc_HEADERS = libpaps.h + libpapsincdir = $(includedir) bin_PROGRAMS = paps -paps_CFLAGS = -Wall +paps_CFLAGS = -Wall $(CUPS_CFLAGS) paps_SOURCES = paps.c - paps_LDADD = $(noinst_LIBRARIES) $(all_libraries) + paps_LDADD = $(lib_LTLIBRARIES) $(all_libraries) -paps_LDFLAGS = `pkg-config --libs pangoft2` +paps_LDFLAGS = `pkg-config --libs pangoft2` $(CUPS_LIBS) - paps_DEPENDENCIES = $(noinst_LIBRARIES) + paps_DEPENDENCIES = $(lib_LTLIBRARIES) EXTRA_DIST = test_libpaps.c paps.1 -diff -pruN -x Makefile -x Makefile.in -x '*.m4' -x autom4te.cache -x 'config.*' -x configure -x doc -x libtool -x .deps -x .libs -x '*.ps' -x foo -x paps -x 'lib*' -x texttopaps -x '*o' -x '*.cups' -x 'test*' -x 'stamp*' paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c ---- paps-0.6.6.orig/src/paps.c 2007-02-15 22:59:48.000000000 +0900 -+++ paps-0.6.6/src/paps.c 2007-03-07 20:58:31.000000000 +0900 -@@ -32,6 +32,7 @@ +diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c +--- paps-0.6.8.orig/src/paps.c 2007-11-30 18:40:15.000000000 +0900 ++++ paps-0.6.8/src/paps.c 2007-11-30 18:47:28.000000000 +0900 +@@ -31,6 +31,7 @@ + #include #include #include - #include +#include #define BUFSIZE 1024 #define DEFAULT_FONT_FAMILY "Monospace" -@@ -85,9 +86,11 @@ typedef struct { - gboolean do_separation_line; - gboolean do_draw_contour; +@@ -86,9 +87,11 @@ typedef struct { gboolean do_wordwrap; + gboolean do_use_markup; + gboolean do_stretch_chars; + gboolean cups_mode; PangoDirection pango_dir; gchar *filename; gchar *header_font_desc; + gchar *owner; + gint lpi; + gint cpi; } page_layout_t; - - typedef struct { -@@ -314,8 +317,8 @@ int main(int argc, char *argv[]) +@@ -320,8 +323,8 @@ int main(int argc, char *argv[]) int num_pages = 1; int gutter_width = 40; int total_gutter_width; @@ -69,18 +71,18 @@ int do_tumble = -1; /* -1 means not initialized */ int do_duplex = -1; gchar *paps_header = NULL; -@@ -324,6 +327,8 @@ int main(int argc, char *argv[]) - int header_sep = 20; +@@ -331,6 +334,8 @@ int main(int argc, char *argv[]) int max_width = 0, w; GIConv cvh = NULL; + GOptionGroup *options; + gboolean cups_mode = FALSE; + gchar *page_owner = NULL; /* Set locale from environment. */ setlocale(LC_ALL, ""); -@@ -333,6 +338,128 @@ int main(int argc, char *argv[]) - +@@ -348,6 +353,134 @@ int main(int argc, char *argv[]) g_option_context_add_main_entries(ctxt, entries, NULL); + #endif + /* check if the process is being invoked as CUPS filter */ + G_STMT_START { @@ -92,13 +94,13 @@ + const char *val; + + if (strncmp(prgname, "texttopaps", 10) == 0 || -+ getenv ("CUPS_SERVER") != NULL) { ++ getenv("CUPS_SERVER") != NULL) { + g_set_prgname(prgname); + /* argument format should be job-id user title copies options [file] */ + cups_mode = TRUE; + /* set default values */ -+ lpi = 6.0L; -+ cpi = 10.0L; ++ page_layout.lpi = 6.0L; ++ page_layout.cpi = 10.0L; + left_margin = 18; + right_margin = 18; + top_margin = 36; @@ -115,7 +117,7 @@ + IN = stdin; + } else { + filename_in = argv[6]; -+ if ((IN = fopen(argv[6], "rb")) == NULL) { ++ if ((IN = fopen(filename_in, "rb")) == NULL) { + fprintf(stderr, "ERROR: unable to open print file -\n"); + exit(1); + } @@ -147,9 +149,12 @@ + if (g_ascii_strcasecmp(val, "no") && + g_ascii_strcasecmp(val, "off") && + g_ascii_strcasecmp(val, "false")) { -+ /* We don't need to process the documentation for orientation support. -+ * pstops certainly does. (#222137) ++ /* We really need to deal with the landscape orientation because ++ * pstops doesn't deal with the position where it should appears. ++ * However this causes the unnecessary rotation by pstops. so paps ++ * will puts the fake Orientation tag and stop rotating in PS. + */ ++ do_landscape = TRUE; + } + } + /* XXX: need to support orientation-requested? */ @@ -172,8 +177,9 @@ + ppdIsMarked(ppd, "EFDuplex", "DuplexNoTumble") || + ppdIsMarked(ppd, "EFDuplex", "DuplexTumble") || + ppdIsMarked(ppd, "KD03Duplex", "DuplexNoTumble") || -+ ppdIsMarked(ppd, "KD03Duplex", "DuplexTumble")) ++ ppdIsMarked(ppd, "KD03Duplex", "DuplexTumble")) { + do_duplex = TRUE; ++ } + if ((val = cupsGetOption("wrap", num_options, options)) != NULL) { + do_wordwrap = !g_ascii_strcasecmp(val, "true") || + !g_ascii_strcasecmp(val, "on") || @@ -183,21 +189,23 @@ + num_columns = atoi(val); + } + if ((val = cupsGetOption("cpi", num_options, options)) != NULL) { -+ cpi = atof(val); ++ page_layout.cpi = atof(val); + } + if ((val = cupsGetOption("lpi", num_options, options)) != NULL) { -+ lpi = atof(val); ++ page_layout.lpi = atof(val); + } + if (getenv("CHARSET") != NULL) { + char *charset = getenv("CHARSET"); + /* Map CUPS charset names to real ones. + * http://cups.org/newsgroups.php?s9797+gcups.general+v9797+T1 + */ -+ if (!g_ascii_strcasecmp(charset, "windows-932")) ++ if (!g_ascii_strcasecmp(charset, "windows-932")) { + charset = "WINDOWS-31J"; ++ } + if (g_ascii_strcasecmp(charset, "utf-8") && -+ g_ascii_strcasecmp(charset, "utf8")) ++ g_ascii_strcasecmp(charset, "utf8")) { + encoding = g_strdup(charset); ++ } + } + } + } G_STMT_END; @@ -207,7 +215,7 @@ /* Parse command line */ if (!g_option_context_parse(ctxt, &argc, &argv, &error)) { -@@ -359,6 +486,8 @@ int main(int argc, char *argv[]) +@@ -374,6 +507,8 @@ int main(int argc, char *argv[]) IN = stdin; } title = filename_in; @@ -216,20 +224,20 @@ paps = paps_new(); pango_context = paps_get_pango_context (paps); -@@ -377,8 +506,10 @@ int main(int argc, char *argv[]) +@@ -392,8 +527,10 @@ int main(int argc, char *argv[]) pango_context_set_font_description (pango_context, font_description); /* Page layout */ - page_width = paper_sizes[(int)paper_type].width; - page_height = paper_sizes[(int)paper_type].height; + if (page_width < 0) -+ page_width = paper_sizes[(int)paper_type].width; ++ page_width = paper_sizes[(int)paper_type].width; + if (page_height < 0) -+ page_height = paper_sizes[(int)paper_type].height; ++ page_height = paper_sizes[(int)paper_type].height; if (num_columns == 1) total_gutter_width = 0; -@@ -439,6 +570,8 @@ int main(int argc, char *argv[]) +@@ -456,6 +593,8 @@ int main(int argc, char *argv[]) page_layout.pango_dir = pango_dir; page_layout.filename = filename_in; page_layout.header_font_desc = header_font_desc; @@ -237,21 +245,21 @@ + page_layout.cups_mode = cups_mode; /* calculate x-coordinate scale */ - if (cpi > 0.0L) -@@ -584,6 +717,12 @@ split_text_into_paragraphs (PangoContext - if (wc == (gunichar)-1) - { - fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ()); -+ if (page_layout->cups_mode) -+ { -+ /* try to continue parsing texts */ -+ p = next; -+ continue; -+ } - wc = 0; - } - if (!*p || !wc || wc == '\n' || wc == '\f') -@@ -810,6 +949,7 @@ void print_postscript_header(FILE *OUT, + if (page_layout.cpi > 0.0L) +@@ -756,6 +895,12 @@ split_text_into_paragraphs (PangoContext + if (wc == (gunichar)-1) + { + fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ()); ++ if (page_layout->cups_mode) ++ { ++ /* try to continue parsing texts */ ++ p = next; ++ continue; ++ } + wc = 0; + } + if (!*p || !wc || wc == '\n' || wc == '\f') +@@ -925,6 +1070,7 @@ void print_postscript_header(FILE *OUT, int orientation = page_layout->page_width > page_layout->page_height; int bb_page_width = page_layout->page_width; int bb_page_height = page_layout->page_height; @@ -259,7 +267,7 @@ /* Keep bounding box non-rotated to make ggv happy */ if (orientation) -@@ -819,12 +959,20 @@ void print_postscript_header(FILE *OUT, +@@ -934,12 +1080,20 @@ void print_postscript_header(FILE *OUT, bb_page_height = tmp; } @@ -274,21 +282,38 @@ fprintf(OUT, "%%!PS-Adobe-3.0\n" "%%%%Title: %s\n" - "%%%%Creator: paps version 0.6.3 by Dov Grobgeld\n" + "%%%%Creator: paps version 0.6.7 by Dov Grobgeld\n" "%%%%Pages: (atend)\n" - "%%%%BoundingBox: 0 0 %d %d\n" + "%%%%BoundingBox: 0 0 %d %d\n%s" "%%%%BeginProlog\n" "%%%%Orientation: %s\n" "/papsdict 1 dict def\n" -@@ -874,8 +1022,10 @@ void print_postscript_header(FILE *OUT, +@@ -989,8 +1143,13 @@ void print_postscript_header(FILE *OUT, title, bb_page_width, bb_page_height, +- orientation_names[orientation] + owner, - orientation_names[orientation] ++ /* Put the fake orientation tag if paps is currently running under ++ * the CUPS filter mode. (#222137) ++ */ ++ orientation_names[orientation && !page_layout->cups_mode] ); + g_free(owner); fprintf(OUT, "%% User settings\n" +@@ -1015,7 +1174,11 @@ void print_postscript_header(FILE *OUT, + page_layout->left_margin, + page_layout->page_height - bodytop, + bool_name[page_layout->do_separation_line>0], +- bool_name[page_layout->do_landscape>0], ++ /* just ignore the landscape flag when paps is currently running ++ * under the CUPS filter mode. this will stop rotating in PS that ++ * paps generates. (#222137) ++ */ ++ bool_name[page_layout->do_landscape>0 && !page_layout->cups_mode], + bool_name[page_layout->do_tumble>0], + bool_name[page_layout->do_duplex>0] + ); Index: paps.spec =================================================================== RCS file: /cvs/dist/rpms/paps/FC-6/paps.spec,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- paps.spec 7 Jun 2007 10:56:09 -0000 1.22 +++ paps.spec 3 Dec 2007 02:08:07 -0000 1.23 @@ -1,64 +1,64 @@ Name: paps -Version: 0.6.6 -Release: 20%{?dist} +Version: 0.6.8 +Release: 1%{?dist} -License: LGPL +License: LGPLv2+ URL: http://paps.sourceforge.net/ Source0: http://prdownloads.sourceforge.net/paps/paps-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pango-devel automake autoconf libtool doxygen cups-devel -Patch0: paps-makefile.patch -## fixed in CVS -Patch2: paps-formfeed.patch -## fixed in CVS -Patch3: paps-0.6.6-encoding.patch -## fixed in CVS -Patch4: paps-typo-font-scale.patch -## fixed in CVS -Patch5: paps-0.6.6-segfault.patch -## fixed in CVS -Patch6: paps-0.6.6-font-option.patch -## fixed in CVS -Patch7: paps-0.6.6-lcctype.patch -## fixed in CVS -Patch8: paps-0.6.6-wordwrap.patch -## fixed in CVS -Patch9: paps-0.6.6-cpilpi.patch -Patch10: paps-0.6.6-exitcode.patch -Patch11: paps-0.6.6-fix-wcswidth.patch -Patch12: paps-0.6.6-langinfo.patch -Patch13: paps-0.6.6-lcnumeric.patch +## https://sourceforge.net/tracker/index.php?func=detail&aid=1832897&group_id=153049&atid=786241 +Patch0: paps-0.6.8-shared.patch +## https://sourceforge.net/tracker/index.php?func=detail&aid=1832924&group_id=153049&atid=786241 +Patch1: paps-0.6.8-wordwrap.patch +## https://sourceforge.net/tracker/index.php?func=detail&aid=1832926&group_id=153049&atid=786241 +Patch2: paps-0.6.6-langinfo.patch +## https://sourceforge.net/tracker/index.php?func=detail&aid=1832929&group_id=153049&atid=786241 +Patch3: paps-0.6.6-lcnumeric.patch +## https://sourceforge.net/tracker/index.php?func=detail&aid=1832935&group_id=153049&atid=786241 +Patch4: paps-0.6.6-exitcode.patch Patch50: paps-cups.patch +Patch51: paps-cpilpi.patch +Patch61: paps-0.6.6-fix-wcswidth.patch Summary: Plain Text to PostScript converter Group: Applications/Publishing %description paps is a PostScript converter from plain text file using Pango. +%package libs +Summary: Libraries for paps +Group: Development/Libraries +%description libs +paps is a PostScript converter from plain text file using Pango. + +This package contains the library for paps. + +%package devel +Summary: Development files for paps +Group: Development/Libraries +Requires: %{name}-libs = %{version}-%{release} +%description devel +paps is a PostScript converter from plain text file using Pango. + +This package contains the development files that is necessary to develop +applications using paps API. %prep %setup -q -%patch0 -p1 -b .makefile -%patch2 -p1 -b .formfeed -%patch3 -p1 -b .encoding -%patch4 -p0 -b .typo -%patch5 -p1 -b .segfault -%patch6 -p1 -b .fontopt -%patch7 -p1 -b .lcctype -%patch8 -p1 -b .wordwrap -%patch9 -p1 -b .cpilpi -%patch10 -p1 -b .exitcode -%patch11 -p1 -b .wcswidth -%patch12 -p1 -b .langinfo -%patch13 -p1 -b .lcnumeric +%patch0 -p1 -b .shared +%patch1 -p1 -b .wordwrap +%patch2 -p1 -b .langinfo +%patch3 -p1 -b .lcnumeric +%patch4 -p1 -b .exitcode %patch50 -p1 -b .cups -aclocal -automake -autoconf +%patch51 -p1 -b .cpilpi +#%patch11 -p1 -b .wcswidth +autoreconf %build -%configure +%configure --disable-static make %{?_smp_mflags} @@ -66,7 +66,9 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -rm -rf $RPM_BUILD_ROOT%{_includedir} + +# remove unnecessary files +rm $RPM_BUILD_ROOT%{_libdir}/libpaps.la # make a symlink for CUPS filter %{__mkdir_p} $RPM_BUILD_ROOT/usr/lib/cups/filter # Not libdir @@ -82,8 +84,44 @@ %{_mandir}/man1/paps.1* /usr/lib/cups/filter/texttopaps +%files libs +%defattr(-, root, root, -) +%doc COPYING.LIB +%{_libdir}/libpaps.so.* + +%files devel +%defattr(-, root, root, -) +%doc COPYING.LIB +%{_includedir}/libpaps.h +%{_libdir}/libpaps.so %changelog +* Fri Nov 30 2007 Akira TAGOH - 0.6.8-1 +- New upstream release. + - Remove patches merged and unnecessary anymore: + - paps-makefile.patch + - paps-formfeed.patch + - paps-0.6.6-encoding.patch + - paps-typo-font-scale.patch + - paps-0.6.6-segfault.patch + - paps-0.6.6-font-option.patch + - paps-0.6.6-lcctype.patch +- paps-0.6.8-shared.patch: Enable building shared library. +- paps-0.6.8-wordwrap.patch: Update a bit to get it working without an wordwrap + mode. +- Add paps-libs and paps-devel package. +- paps-cups.patch: Update. +- paps-cpilpi.patch: Update. +- Fix the wrong rendering with CPI option. (#237202) +- Fix the unnecessary rotation with the landscape option when paps is running + as CUPS filter. (#222137) + +* Thu Aug 23 2007 Akira TAGOH - 0.6.6-21 +- Rebuild + +* Fri Aug 10 2007 Akira TAGOH +- Update License tag. + * Wed May 30 2007 Akira TAGOH - 0.6.6-20 - Fix to not do wordwrap when 'wrap=false' is given. (#240588) Index: sources =================================================================== RCS file: /cvs/dist/rpms/paps/FC-6/sources,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sources 27 Jun 2006 07:11:43 -0000 1.2 +++ sources 3 Dec 2007 02:08:07 -0000 1.3 @@ -1 +1 @@ -cc0975e70fe1e704e16f2fb08c71cee2 paps-0.6.6.tar.gz +e9508132bf27609bf2fded2bfd9cb3f1 paps-0.6.8.tar.gz --- paps-0.6.6-cpilpi.patch DELETED --- --- paps-0.6.6-encoding.patch DELETED --- --- paps-0.6.6-font-option.patch DELETED --- --- paps-0.6.6-lcctype.patch DELETED --- --- paps-0.6.6-segfault.patch DELETED --- --- paps-0.6.6-wordwrap.patch DELETED --- --- paps-formfeed.patch DELETED --- --- paps-makefile.patch DELETED --- --- paps-typo-font-scale.patch DELETED --- From fedora-cvs-commits at redhat.com Mon Dec 3 14:53:58 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Mon, 3 Dec 2007 09:53:58 -0500 Subject: rpms/openoffice.org/FC-6 workspace.hsql1808.patch, NONE, 1.1 openoffice.org.spec, 1.949, 1.950 Message-ID: <200712031453.lB3ErwX6031511@cvs.devel.redhat.com> Author: caolanm Update of /cvs/dist/rpms/openoffice.org/FC-6 In directory cvs.devel.redhat.com:/tmp/cvs-serv31491 Modified Files: openoffice.org.spec Added Files: workspace.hsql1808.patch Log Message: Resolves: rhbz#303611 workspace.hsql1808.patch workspace.hsql1808.patch: OOD680_m5/comphelper/source/misc/namedvaluecollection.cxx | 55 ++++ OOD680_m5/connectivity/source/drivers/hsqldb/HDriver.cxx | 96 +++++-- OOD680_m5/connectivity/source/drivers/hsqldb/makefile.mk | 3 OOD680_m5/connectivity/source/drivers/jdbc/Connection.cxx | 137 +++++++--- OOD680_m5/connectivity/source/drivers/jdbc/JDriver.cxx | 21 + OOD680_m5/connectivity/source/drivers/jdbc/SQLException.cxx | 4 OOD680_m5/connectivity/source/drivers/jdbc/tools.cxx | 1 OOD680_m5/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs | 24 + comphelper/inc/comphelper/namedvaluecollection.hxx | 42 +++ dba/connectivity/source/inc/java/LocalRef.hxx | 114 ++++++++ openoffice.org/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java | 26 + 11 files changed, 453 insertions(+), 70 deletions(-) --- NEW FILE workspace.hsql1808.patch --- --- OOD680_m5.orig/comphelper/inc/comphelper/namedvaluecollection.hxx 2007-10-25 12:17:58.000000000 -0400 +++ OOD680_m5/comphelper/inc/comphelper/namedvaluecollection.hxx 2007-10-26 03:30:17.000000000 -0400 @@ -50,6 +50,9 @@ #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include #endif +#ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_ +#include +#endif /** === end UNO includes === **/ #include @@ -158,6 +161,42 @@ return impl_get( _rValueName ); } + /** puts a value into the collection + + @return if and only if a value was already present previously, in + which case it has been overwritten. + */ + template < typename VALUE_TYPE > + inline bool put( const sal_Char* _pAsciiValueName, const VALUE_TYPE& _rValue ) + { + return impl_put( ::rtl::OUString::createFromAscii( _pAsciiValueName ), ::com::sun::star::uno::makeAny( _rValue ) ); + } + + /** puts a value into the collection + + @return if and only if a value was already present previously, in + which case it has been overwritten. + */ + template < typename VALUE_TYPE > + inline bool put( const ::rtl::OUString& _rValueName, const VALUE_TYPE& _rValue ) + { + return impl_put( _rValueName, ::com::sun::star::uno::makeAny( _rValue ) ); + } + + /** transforms the collection to a sequence of PropertyValues + + @return + the number of elements in the sequence + */ + sal_Int32 operator >>= ( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _out_rValues ); + + /** transforms the collection to a sequence of NamedValues + + @return + the number of elements in the sequence + */ + sal_Int32 operator >>= ( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _out_rValues ); + private: void impl_assign( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& _rArguments ); void impl_assign( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArguments ); @@ -170,6 +209,9 @@ const ::com::sun::star::uno::Any& impl_get( const ::rtl::OUString& _rValueName ) const; + + bool impl_has( const ::rtl::OUString& _rValueName ) const; + bool impl_put( const ::rtl::OUString& _rValueName, const ::com::sun::star::uno::Any& _rValue ); }; //........................................................................ diff -ru OOD680_m5.orig/comphelper/source/misc/namedvaluecollection.cxx OOD680_m5/comphelper/source/misc/namedvaluecollection.cxx --- OOD680_m5.orig/comphelper/source/misc/namedvaluecollection.cxx 2007-10-25 12:17:59.000000000 -0400 +++ OOD680_m5/comphelper/source/misc/namedvaluecollection.cxx 2007-10-25 12:30:53.000000000 -0400 @@ -41,6 +41,7 @@ #ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_ #include #endif +#include /** === end UNO includes === **/ #ifndef _OSL_DIAGNOSE_H_ @@ -48,6 +49,8 @@ #endif #include +#include +#include //........................................................................ namespace comphelper @@ -63,6 +66,7 @@ using ::com::sun::star::uno::cpp_acquire; using ::com::sun::star::uno::cpp_release; using ::com::sun::star::uno::cpp_queryInterface; + using ::com::sun::star::beans::PropertyState_DIRECT_VALUE; /** === end UNO using === **/ //==================================================================== @@ -159,6 +163,20 @@ } //-------------------------------------------------------------------- + bool NamedValueCollection::impl_has( const ::rtl::OUString& _rValueName ) const + { + NamedValueRepository::const_iterator pos = m_pImpl->aValues.find( _rValueName ); + return ( pos != m_pImpl->aValues.end() ); + } + + bool NamedValueCollection::impl_put( const ::rtl::OUString& _rValueName, const Any& _rValue ) + { + bool bHas = impl_has( _rValueName ); + m_pImpl->aValues[ _rValueName ] = _rValue; + return bHas; + } + + //-------------------------------------------------------------------- const Any& NamedValueCollection::impl_get( const ::rtl::OUString& _rValueName ) const { NamedValueRepository::const_iterator pos = m_pImpl->aValues.find( _rValueName ); @@ -169,6 +187,43 @@ return aEmptyDefault; } + //-------------------------------------------------------------------- + namespace + { + struct Value2PropertyValue : public ::std::unary_function< NamedValueRepository::value_type, PropertyValue > + { + PropertyValue operator()( const NamedValueRepository::value_type& _rValue ) + { + return PropertyValue( + _rValue.first, 0, _rValue.second, PropertyState_DIRECT_VALUE ); + } + }; + + struct Value2NamedValue : public ::std::unary_function< NamedValueRepository::value_type, NamedValue > + { + NamedValue operator()( const NamedValueRepository::value_type& _rValue ) + { + return NamedValue( _rValue.first, _rValue.second ); + } + }; + } + + //-------------------------------------------------------------------- + sal_Int32 NamedValueCollection::operator >>= ( Sequence< PropertyValue >& _out_rValues ) + { + _out_rValues.realloc( m_pImpl->aValues.size() ); + ::std::transform( m_pImpl->aValues.begin(), m_pImpl->aValues.end(), _out_rValues.getArray(), Value2PropertyValue() ); + return _out_rValues.getLength(); + } + + //-------------------------------------------------------------------- + sal_Int32 NamedValueCollection::operator >>= ( Sequence< NamedValue >& _out_rValues ) + { + _out_rValues.realloc( m_pImpl->aValues.size() ); + ::std::transform( m_pImpl->aValues.begin(), m_pImpl->aValues.end(), _out_rValues.getArray(), Value2NamedValue() ); + return _out_rValues.getLength(); + } + //........................................................................ } // namespace comphelper //........................................................................ diff -ru OOD680_m5.orig/connectivity/source/drivers/hsqldb/HDriver.cxx OOD680_m5/connectivity/source/drivers/hsqldb/HDriver.cxx --- OOD680_m5.orig/connectivity/source/drivers/hsqldb/HDriver.cxx 2007-10-25 12:18:05.000000000 -0400 +++ OOD680_m5/connectivity/source/drivers/hsqldb/HDriver.cxx 2007-10-25 14:10:42.000000000 -0400 @@ -98,6 +98,13 @@ #ifndef _DBHELPER_DBEXCEPTION_HXX_ #include #endif +#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX +#include +#endif +#ifndef _UNOTOOLS_CONFIGNODE_HXX_ +#include +#endif + //........................................................................ namespace connectivity { @@ -183,6 +190,37 @@ } //-------------------------------------------------------------------- + namespace + { + ::rtl::OUString lcl_getPermittedJavaMethods_nothrow( const Reference< XMultiServiceFactory >& _rxORB ) + { + ::rtl::OUStringBuffer aConfigPath; + aConfigPath.appendAscii( "/org.openoffice.Office.DataAccess/DriverSettings/" ); + aConfigPath.append ( ODriverDelegator::getImplementationName_Static() ); + aConfigPath.appendAscii( "/PermittedJavaMethods" ); + ::utl::OConfigurationTreeRoot aConfig( ::utl::OConfigurationTreeRoot::createWithServiceFactory( + _rxORB, aConfigPath.makeStringAndClear() ) ); + + ::rtl::OUStringBuffer aPermittedMethods; + Sequence< ::rtl::OUString > aNodeNames( aConfig.getNodeNames() ); + for ( const ::rtl::OUString* pNodeNames = aNodeNames.getConstArray(); + pNodeNames != aNodeNames.getConstArray() + aNodeNames.getLength(); + ++pNodeNames + ) + { + ::rtl::OUString sPermittedMethod; + OSL_VERIFY( aConfig.getNodeValue( *pNodeNames ) >>= sPermittedMethod ); + + if ( aPermittedMethods.getLength() ) + aPermittedMethods.append( (sal_Unicode)';' ); + aPermittedMethods.append( sPermittedMethod ); + } + + return aPermittedMethods.makeStringAndClear();; + } + } + + //-------------------------------------------------------------------- Reference< XConnection > SAL_CALL ODriverDelegator::connect( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { Reference< XConnection > xConnection; @@ -225,28 +263,37 @@ bool bIsNewDatabase = !xStorage->hasElements(); - Sequence< PropertyValue > aConvertedProperties(8); - sal_Int32 nPos = 0; - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("storage_key")); - ::rtl::OUString sConnPartURL = sSystemPath.copy(0,nIndex); - ::rtl::OUString sKey = StorageContainer::registerStorage(xStorage,sConnPartURL); - aConvertedProperties[nPos++].Value <<= sKey; - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("storage_class_name")); - aConvertedProperties[nPos++].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.comp.hsqldb.StorageAccess")); - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fileaccess_class_name")); - aConvertedProperties[nPos++].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess")); - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass")); - aConvertedProperties[nPos++].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.hsqldb.jdbcDriver")); - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsAutoRetrievingEnabled")); - aConvertedProperties[nPos++].Value <<= sal_True; - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoRetrievingStatement")); - aConvertedProperties[nPos++].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CALL IDENTITY()")); - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreDriverPrivileges")); - aConvertedProperties[nPos++].Value <<= sal_True; + ::comphelper::NamedValueCollection aProperties; + + // properties for accessing the embedded storage + ::rtl::OUString sConnPartURL = sSystemPath.copy( 0, ::std::max< sal_Int32 >( nIndex, sSystemPath.getLength() ) ); + ::rtl::OUString sKey = StorageContainer::registerStorage( xStorage, sConnPartURL ); + aProperties.put( "storage_key", sKey ); + aProperties.put( "storage_class_name", + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbcx.comp.hsqldb.StorageAccess" ) ) ); + aProperties.put( "fileaccess_class_name", + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdbcx.comp.hsqldb.StorageFileAccess" ) ) ); + + // JDBC driver and driver's classpath + aProperties.put( "JavaDriverClass", + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.hsqldb.jdbcDriver" ) ) ); + + // auto increment handling + aProperties.put( "IsAutoRetrievingEnabled", true ); + aProperties.put( "AutoRetrievingStatement", + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CALL IDENTITY()" ) ) ); + aProperties.put( "IgnoreDriverPrivileges", true ); // don't want to expose HSQLDB's schema capabilities which exist since 1.8.0RC10 - aConvertedProperties[nPos].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "default_schema" ) ); - aConvertedProperties[nPos++].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")); + aProperties.put( "default_schema", + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) ); + + // security: permitted Java classes + NamedValue aPermittedClasses( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hsqldb.method_class_names" ) ), + makeAny( lcl_getPermittedJavaMethods_nothrow( m_xFactory ) ) + ); + aProperties.put( "SystemProperties", Sequence< NamedValue >( &aPermittedClasses, 1 ) ); Reference xProp(xStorage,UNO_QUERY); if ( xProp.is() ) @@ -255,19 +302,20 @@ xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OpenMode"))) >>= nMode; if ( (nMode & ElementModes::WRITE) != ElementModes::WRITE ) { - aConvertedProperties.realloc(nPos+1); - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("readonly")); - aConvertedProperties[nPos++].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")); + aProperties.put( "readonly", ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) ); } } + Sequence< PropertyValue > aConnectionArgs; + aProperties >>= aConnectionArgs; + ::rtl::OUString sConnectURL(RTL_CONSTASCII_USTRINGPARAM("jdbc:hsqldb:")); sConnectURL += sConnPartURL; Reference xOrig; try { - xOrig = xDriver->connect( sConnectURL, aConvertedProperties ); + xOrig = xDriver->connect( sConnectURL, aConnectionArgs ); } catch(SQLException e) { diff -ru OOD680_m5.orig/connectivity/source/drivers/hsqldb/makefile.mk OOD680_m5/connectivity/source/drivers/hsqldb/makefile.mk --- OOD680_m5.orig/connectivity/source/drivers/hsqldb/makefile.mk 2007-10-25 12:18:05.000000000 -0400 +++ OOD680_m5/connectivity/source/drivers/hsqldb/makefile.mk 2007-10-25 12:24:36.000000000 -0400 @@ -91,7 +91,8 @@ $(JVMACCESSLIB) \ $(DBTOOLSLIB) \ $(JVMFWKLIB) \ - $(COMPHELPERLIB) + $(COMPHELPERLIB) \ + $(UNOTOOLSLIB) SHL1DEPN= diff -ru OOD680_m5.orig/connectivity/source/drivers/jdbc/Connection.cxx OOD680_m5/connectivity/source/drivers/jdbc/Connection.cxx --- OOD680_m5.orig/connectivity/source/drivers/jdbc/Connection.cxx 2007-10-25 12:18:05.000000000 -0400 +++ OOD680_m5/connectivity/source/drivers/jdbc/Connection.cxx 2007-10-25 14:03:56.000000000 -0400 @@ -60,6 +60,12 @@ #ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_ #include #endif +#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_ +#include +#endif +#ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_ +#include +#endif #ifndef _CONNECTIVITY_SQLPARSE_HXX #include "connectivity/sqlparse.hxx" #endif @@ -67,9 +73,11 @@ #include "connectivity/dbexception.hxx" #endif #include "java/util/Property.hxx" +#include "java/LocalRef.hxx" #include using namespace connectivity; +using namespace connectivity::jdbc; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; // using namespace ::com::sun::star::sdbcx; @@ -670,13 +678,66 @@ if( out ) { java_sql_SQLWarning_BASE warn_base(t.pEnv, out); - return makeAny( - static_cast< starsdbc::SQLException >( - java_sql_SQLWarning(warn_base,*this))); + SQLException aAsException( static_cast< starsdbc::SQLException >( java_sql_SQLWarning( warn_base, *this ) ) ); + + // translate to warning + SQLWarning aWarning; + aWarning.Context = aAsException.Context; + aWarning.Message = aAsException.Message; + aWarning.SQLState = aAsException.SQLState; + aWarning.ErrorCode = aAsException.ErrorCode; + aWarning.NextException = aAsException.NextException; + + return makeAny( aWarning ); } return Any(); } + +namespace +{ + bool lcl_setSystemProperties_nothrow( JNIEnv& _rEnv, const Sequence< NamedValue >& _rSystemProperties ) + { + if ( _rSystemProperties.getLength() == 0 ) + // nothing to do + return true; + + LocalRef< jclass > systemClass( _rEnv ); + jmethodID nSetPropertyMethodID = 0; + // retrieve the java.lang.System class + systemClass.set( _rEnv.FindClass( "java/lang/System" ) ); + if ( systemClass.is() ) + { + nSetPropertyMethodID = _rEnv.GetStaticMethodID( + systemClass.get(), "setProperty", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" ); + } + + if ( nSetPropertyMethodID == 0 ) + return false; + + for ( const NamedValue* pSystemProp = _rSystemProperties.getConstArray(); + pSystemProp != _rSystemProperties.getConstArray() + _rSystemProperties.getLength(); + ++pSystemProp + ) + { + ::rtl::OUString sValue; + OSL_VERIFY( pSystemProp->Value >>= sValue ); + + LocalRef< jstring > jName( _rEnv, convertwchar_tToJavaString( &_rEnv, pSystemProp->Name ) ); + LocalRef< jstring > jValue( _rEnv, convertwchar_tToJavaString( &_rEnv, sValue ) ); + + _rEnv.CallStaticObjectMethod( systemClass.get(), nSetPropertyMethodID, jName.get(), jValue.get() ); + LocalRef< jthrowable > throwable( _rEnv, _rEnv.ExceptionOccurred() ); + if ( throwable.is() ) + return false; + } + + return true; + } +} + +// ----------------------------------------------------------------------------- + // ----------------------------------------------------------------------------- void java_sql_Connection::loadDriverFromProperties(const Sequence< PropertyValue >& info, ::rtl::OUString& _rsGeneratedValueStatement, @@ -688,40 +749,15 @@ SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); try { + Sequence< NamedValue > aSystemProperties; const PropertyValue* pBegin = info.getConstArray(); const PropertyValue* pEnd = pBegin + info.getLength(); + const PropertyValue* pJavaDriverClass = 0; for(;pBegin != pEnd;++pBegin) { - if ( !object && !pBegin->Name.compareToAscii("JavaDriverClass") ) + if ( !pBegin->Name.compareToAscii("JavaDriverClass") ) { - // here I try to find the class for jdbc driver - java_sql_SQLException_BASE::getMyClass(); - java_lang_Throwable::getMyClass(); - - ::rtl::OUString aStr; - pBegin->Value >>= aStr; - OSL_ASSERT( aStr.getLength()); - if ( aStr.getLength() ) - { - // the driver manager holds the class of the driver for later use - // if forName didn't find the class it will throw an exception - ::std::auto_ptr< java_lang_Class > pDrvClass = ::std::auto_ptr< java_lang_Class >(java_lang_Class::forName(aStr)); - if ( pDrvClass.get() ) - { - m_pDriverobject = pDrvClass->newInstanceObject(); - if( t.pEnv && m_pDriverobject ) - m_pDriverobject = t.pEnv->NewGlobalRef( m_pDriverobject ); - if( t.pEnv ) - { - jclass tempClass = t.pEnv->GetObjectClass(m_pDriverobject); - if ( m_pDriverobject ) - { - m_Driver_theClass = (jclass)t.pEnv->NewGlobalRef( tempClass ); - t.pEnv->DeleteLocalRef( tempClass ); - } - } - } - } + pJavaDriverClass = pBegin; } else if(!pBegin->Name.compareToAscii("IsAutoRetrievingEnabled")) { @@ -739,6 +775,43 @@ { pBegin->Value >>= _bIgnoreDriverPrivileges; } + else if(!pBegin->Name.compareToAscii("SystemProperties")) + { + OSL_VERIFY( pBegin->Value >>= aSystemProperties ); + } + } + if ( !object && pJavaDriverClass != 0 ) + { + if ( !lcl_setSystemProperties_nothrow( *t.pEnv, aSystemProperties ) ) + throw SQLException(::rtl::OUString::createFromAscii("The specified driver could not be loaded!"),*this,::rtl::OUString(),1000,Any()); + // here I try to find the class for jdbc driver + java_sql_SQLException_BASE::getMyClass(); + java_lang_Throwable::getMyClass(); + + ::rtl::OUString aStr; + pJavaDriverClass->Value >>= aStr; + OSL_ASSERT( aStr.getLength()); + if ( aStr.getLength() ) + { + // the driver manager holds the class of the driver for later use + // if forName didn't find the class it will throw an exception + ::std::auto_ptr< java_lang_Class > pDrvClass = ::std::auto_ptr< java_lang_Class >(java_lang_Class::forName(aStr)); + if ( pDrvClass.get() ) + { + m_pDriverobject = pDrvClass->newInstanceObject(); + if( t.pEnv && m_pDriverobject ) + m_pDriverobject = t.pEnv->NewGlobalRef( m_pDriverobject ); + if( t.pEnv ) + { + jclass tempClass = t.pEnv->GetObjectClass(m_pDriverobject); + if ( m_pDriverobject ) + { + m_Driver_theClass = (jclass)t.pEnv->NewGlobalRef( tempClass ); + t.pEnv->DeleteLocalRef( tempClass ); + } + } + } + } } } catch(SQLException& e) diff -ru OOD680_m5.orig/connectivity/source/drivers/jdbc/JDriver.cxx OOD680_m5/connectivity/source/drivers/jdbc/JDriver.cxx --- OOD680_m5.orig/connectivity/source/drivers/jdbc/JDriver.cxx 2007-10-25 12:18:05.000000000 -0400 +++ OOD680_m5/connectivity/source/drivers/jdbc/JDriver.cxx 2007-10-25 13:47:16.000000000 -0400 @@ -163,9 +163,26 @@ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass")) ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The JDBC driver class name.")) ,sal_True - ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.mysql.jdbc.Driver")) + ,::rtl::OUString() + ,Sequence< ::rtl::OUString >()) + ); + + aDriverInfo.push_back(DriverPropertyInfo( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClassPath")) + ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The class path where to look for the JDBC driver.")) + ,sal_True + ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "" ) ) + ,Sequence< ::rtl::OUString >()) + ); + + aDriverInfo.push_back(DriverPropertyInfo( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SystemProperties")) + ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Additional properties to set at java.lang.System before loading the driver.")) + ,sal_True + ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "" ) ) ,Sequence< ::rtl::OUString >()) ); + aDriverInfo.push_back(DriverPropertyInfo( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParameterNameSubstitution")) ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Change named parameters with '?'.")) @@ -173,6 +190,7 @@ ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) ,aBoolean) ); + aDriverInfo.push_back(DriverPropertyInfo( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreDriverPrivileges")) ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ignore the privileges from the database driver.")) @@ -187,6 +205,7 @@ ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")) ,aBoolean) ); + aDriverInfo.push_back(DriverPropertyInfo( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoRetrievingStatement")) ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Auto-increment statement.")) diff -ru OOD680_m5.orig/connectivity/source/drivers/jdbc/SQLException.cxx OOD680_m5/connectivity/source/drivers/jdbc/SQLException.cxx --- OOD680_m5.orig/connectivity/source/drivers/jdbc/SQLException.cxx 2007-10-25 12:18:05.000000000 -0400 +++ OOD680_m5/connectivity/source/drivers/jdbc/SQLException.cxx 2007-10-25 12:24:42.000000000 -0400 @@ -104,12 +104,12 @@ if( t.pEnv ){ // temporaere Variable initialisieren - static const char * cSignature = "()Ljava/sql/Exception;"; + static const char * cSignature = "()Ljava/sql/SQLException;"; static const char * cMethodName = "getNextException"; // Java-Call absetzen static jmethodID mID = NULL; if ( !mID ) - mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature ); + mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!"); if( mID ){ out = t.pEnv->CallObjectMethod( object, mID); ThrowSQLException(t.pEnv,0); diff -ru OOD680_m5.orig/connectivity/source/drivers/jdbc/tools.cxx OOD680_m5/connectivity/source/drivers/jdbc/tools.cxx --- OOD680_m5.orig/connectivity/source/drivers/jdbc/tools.cxx 2007-10-25 12:18:05.000000000 -0400 +++ OOD680_m5/connectivity/source/drivers/jdbc/tools.cxx 2007-10-25 12:38:43.000000000 -0400 @@ -160,6 +160,7 @@ { // this is a special property to find the jdbc driver if( pBegin->Name.compareToAscii("JavaDriverClass") && + pBegin->Name.compareToAscii("SystemProperties") && pBegin->Name.compareToAscii("CharSet") && pBegin->Name.compareToAscii("AppendTableAlias") && pBegin->Name.compareToAscii("ParameterNameSubstitution") && diff -ru OOD680_m5.orig/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs OOD680_m5/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs --- OOD680_m5.orig/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs 2007-10-25 12:21:06.000000000 -0400 +++ OOD680_m5/officecfg/registry/schema/org/openoffice/Office/DataAccess.xcs 2007-10-25 12:24:47.000000000 -0400 @@ -252,6 +252,7 @@ Contains a list of descriptions for user defined drivers. + Specifies the data source that can be used as an AddressBook. @@ -287,6 +288,7 @@ + OS @@ -339,10 +341,12 @@ + Specifies the driver settings that are used. + Specifies the driver settings for the mozilla database driver. @@ -562,6 +566,7 @@ + Specifies the driver settings for the evolution database driver. @@ -749,6 +754,7 @@ + Specifies the driver settings for the mozilla database driver. @@ -762,7 +768,25 @@ false + + + + Specifies settings for the driver accessing HSQL databases embedded into OpenOffice.org + database documents (.odb) + + + + HSQLDB features calling Java code directly from SQL statements. For security + reasons, this is restricted to classes from the org.hsqldb.Library package, + the java.lang.math package, plus any methods specified in this configuraton + setting. If a method specification ends with .*, then all methods + from the respectiv package are permitted. + + + + + Specifies the options for searching in forms. Index: com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java =================================================================== RCS file: /cvs/dba/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- openoffice.org/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java 8 Sep 2005 04:55:55 -0000 1.7 +++ openoffice.org/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java 12 Dec 2006 15:50:19 -0000 1.8 @@ -80,16 +82,22 @@ return new NativeOutputStreamHelper(key,streamName); } - public void removeElement(java.lang.String filename) throws java.util.NoSuchElementException, java.io.IOException { - if ( isStreamElement(key,filename) ) - removeElement(key,filename); - } - - public void renameElement(java.lang.String oldName, java.lang.String newName) throws java.util.NoSuchElementException, java.io.IOException { - if ( isStreamElement(key,oldName) ){ - removeElement(key,newName); - renameElement(key,oldName, newName); - } + public void removeElement(java.lang.String filename) throws java.util.NoSuchElementException { + try { + if ( isStreamElement(key,filename) ) + removeElement(key,filename); + } catch (java.io.IOException e) { + } + } + + public void renameElement(java.lang.String oldName, java.lang.String newName) throws java.util.NoSuchElementException { + try { + if ( isStreamElement(key,oldName) ){ + removeElement(key,newName); + renameElement(key,oldName, newName); + } + } catch (java.io.IOException e) { + } } public class FileSync implements FileAccess.FileSync Index: dba/connectivity/source/inc/java/LocalRef.hxx diff -u /dev/null dba/connectivity/source/inc/java/LocalRef.hxx:1.1.4.2 --- /dev/null Thu Oct 25 08:23:50 2007 +++ dba/connectivity/source/inc/java/LocalRef.hxx Tue Oct 16 05:59:02 2007 @@ -0,0 +1,114 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile$ + * + * $Revision$ + * + * last change: $Author$ $Date$ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef CONNECTIVITY_LOCALREF_HXX +#define CONNECTIVITY_LOCALREF_HXX + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +#include + +//........................................................................ +namespace connectivity { namespace jdbc +{ +//........................................................................ + + //==================================================================== + //= LocalRef + //==================================================================== + /** helper class to hold a local ref to a JNI object + + Note that this class never actually calls NewLocalRef. It is assumed that all objects + passed are already acquired with a local ref (as it usually is the case if you obtain + the object from an JNI method). + */ + template< typename T > + class LocalRef + { + public: + explicit LocalRef( JNIEnv& environment ) + :m_environment( environment ) + ,m_object( NULL ) + { + } + + LocalRef( JNIEnv& environment, T object ) + :m_environment( environment ) + ,m_object( object ) + { + } + + ~LocalRef() + { + reset(); + } + + T release() + { + T t = m_object; + m_object = NULL; + return t; + } + + void set( T object ) { reset(); m_object = object; } + + void reset() + { + if ( m_object != NULL ) + { + m_environment.DeleteLocalRef( m_object ); + m_object = NULL; + } + } + + JNIEnv& env() const { return m_environment; } + T get() const { return m_object; } + bool is() const { return m_object != NULL; } + + private: + LocalRef(LocalRef &); // not defined + void operator =(LocalRef &); // not defined + + protected: + JNIEnv& m_environment; + T m_object; + }; + +//........................................................................ +} } // namespace connectivity::jdbc +//........................................................................ + +#endif // CONNECTIVITY_LOCALREF_HXX Index: openoffice.org.spec =================================================================== RCS file: /cvs/dist/rpms/openoffice.org/FC-6/openoffice.org.spec,v retrieving revision 1.949 retrieving revision 1.950 diff -u -r1.949 -r1.950 --- openoffice.org.spec 17 Sep 2007 07:47:09 -0000 1.949 +++ openoffice.org.spec 3 Dec 2007 14:53:55 -0000 1.950 @@ -1,6 +1,6 @@ %define oootag OOD680 %define ooomilestone 5 -%define rh_rpm_release 5.24 +%define rh_rpm_release 5.25 # gcc#19664# %define stlvisibilityfcked 1 @@ -156,7 +156,7 @@ Patch88: openoffice.org-2.0.4.ooo71039.svx.purevirtual.patch Patch89: openoffice.org-2.2.0.ooo73974.bridges.doublereturn.patch Patch90: openoffice.org-2.2.0.rh226966.scoverflow.sc.patch -Patch91: openoffice.org-2.2.0.oooXXXXX.connectivity.newhsqldb.patch +Patch91: workspace.hsql1808.patch Patch92: workspace.fwk55.patch Patch93: openoffice.org-2.2.0.rh228002.escape.shell.patch Patch94: openoffice.org-2.2.0.ooo74451.sw.typemismatch.patch @@ -1058,7 +1058,7 @@ %patch88 -p1 -b .ooo71039.svx.purevirtual.patch %patch89 -p1 -b .ooo73974.bridges.doublereturn.patch %patch90 -p1 -b .rh226966.scoverflow.sc.patch -%patch91 -p1 -b .oooXXXXX.connectivity.newhsqldb.patch +%patch91 -p1 -b .workspace.hsql1808.patch %patch92 -p1 -b .workspace.fwk55.patch %patch93 -p1 -b .rh228002.escape.shell.patch %patch94 -p1 -b .ooo74451.sw.typemismatch.patch @@ -2599,6 +2599,9 @@ %{instdir}/share/registry/modules/org/openoffice/Office/Scripting/Scripting-python.xcu %changelog +* Mon Dec 03 2007 Caolan McNamara - 1:2.0.4-5.5.25 +- Resolves: rhbz#303611 CVE-2007-4575 workspace.hsql1808.patch + * Mon Sep 17 2007 Jan Navratil - 1:2.0.4-5.5.24 - Resolves: rhbz#251975 CVE-2007-2834 workspace.tipatch8.patch From fedora-cvs-commits at redhat.com Tue Dec 4 15:29:43 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Tue, 4 Dec 2007 10:29:43 -0500 Subject: rpms/hsqldb/FC-6 hsqldb-1.8.0.7-backport.patch, NONE, 1.1 hsqldb-1.8.0.7-standard-server.properties, 1.1, 1.2 hsqldb-1.8.0.7-standard.cfg, 1.1, 1.2 hsqldb.spec, 1.30, 1.31 Message-ID: <200712041529.lB4FThS6005569@cvs.devel.redhat.com> Author: jprindiv Update of /cvs/dist/rpms/hsqldb/FC-6 In directory cvs.devel.redhat.com:/tmp/cvs-serv5523 Modified Files: hsqldb-1.8.0.7-standard-server.properties hsqldb-1.8.0.7-standard.cfg hsqldb.spec Added Files: hsqldb-1.8.0.7-backport.patch Log Message: Backport patch, addressing CVE-2007-4576 Resolves: #303561 hsqldb-1.8.0.7-backport.patch: Database.java | 15 ++++++++--- persist/HsqlDatabaseProperties.java | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 4 deletions(-) --- NEW FILE hsqldb-1.8.0.7-backport.patch --- --- hsqldb/src/org/hsqldb/persist/HsqlDatabaseProperties.java.orig 2007-10-19 13:25:36.000000000 -0400 +++ hsqldb/src/org/hsqldb/persist/HsqlDatabaseProperties.java 2007-10-23 14:54:25.000000000 -0400 @@ -44,6 +44,7 @@ import org.hsqldb.lib.Set; import org.hsqldb.lib.SimpleLog; import org.hsqldb.lib.java.JavaSystem; import org.hsqldb.store.ValuePool; +import org.hsqldb.lib.StringUtil; /** * Manages a .properties file for a database. @@ -53,6 +54,53 @@ import org.hsqldb.store.ValuePool; * @since 1.7.0 */ public class HsqlDatabaseProperties extends HsqlProperties { + private static String hsqldb_method_class_names = + "hsqldb.method_class_names"; + private static HashSet accessibleJavaMethodNames; + + static { + try { + String prop = System.getProperty(hsqldb_method_class_names); + + if (prop != null) { + accessibleJavaMethodNames = new HashSet(); + + String[] names = StringUtil.split(prop, ";"); + + for (int i = 0; i < names.length; i++) { + accessibleJavaMethodNames.add(names[i]); + } + } + } catch (Exception e) {} + } + + /** + * If the system property "hsqldb.method_class_names" is not set, then + * static methods of all available Java classes can be accessed as functions + * in HSQLDB. If the property is set, then only the list of semicolon + * seperated method names becomes accessible. An empty property value means + * no class is accessible.

+ * + * All methods of org.hsqldb.Library are always accessible. + * + * + */ + public static boolean supportsJavaMethod(String name) { + + if (name.startsWith("org.hsqldb.Library")) { + return true; + } + + if (accessibleJavaMethodNames == null) { + return true; + } + + if (accessibleJavaMethodNames.contains(name)) { + return true; + } + + return false; + } // column number mappings public static final int indexName = 0; --- hsqldb/src/org/hsqldb/Database.java.orig 2007-10-19 13:24:32.000000000 -0400 +++ hsqldb/src/org/hsqldb/Database.java 2007-10-23 14:55:07.000000000 -0400 @@ -473,12 +473,19 @@ public class Database { * the given method alias. If there is no Java method, then returns the * alias itself. */ - String getJavaName(String s) { + String getJavaName(String name) throws HsqlException { - String alias = (String) hAlias.get(s); + String target = (String) hAlias.get(name); - return (alias == null) ? s - : alias; + if (target == null) { + target = name; + } + + if (HsqlDatabaseProperties.supportsJavaMethod(target)) { + return target; + } + + throw Trace.error(Trace.ACCESS_IS_DENIED, target); } /** Index: hsqldb-1.8.0.7-standard-server.properties =================================================================== RCS file: /cvs/dist/rpms/hsqldb/FC-6/hsqldb-1.8.0.7-standard-server.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- hsqldb-1.8.0.7-standard-server.properties 22 Jan 2007 23:58:30 -0000 1.1 +++ hsqldb-1.8.0.7-standard-server.properties 4 Dec 2007 15:29:41 -0000 1.2 @@ -9,3 +9,13 @@ server.port 9001 server.no_system_exit true + +# Until the following setting is changed, the HSQLDB service will not accept +# remote connections. Failing to set a value for server.address at all will +# result in the service binding itself to 0.0.0.0 and accepting remote +# connections. +# +# IT IS STRONGLY ADVISED that before doing this you alter the password of +# the default account (username "sa"). By default, no password is required +# to connect to HSQLDB with the "sa" account. +server.address localhost Index: hsqldb-1.8.0.7-standard.cfg =================================================================== RCS file: /cvs/dist/rpms/hsqldb/FC-6/hsqldb-1.8.0.7-standard.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- hsqldb-1.8.0.7-standard.cfg 22 Jan 2007 23:58:30 -0000 1.1 +++ hsqldb-1.8.0.7-standard.cfg 4 Dec 2007 15:29:41 -0000 1.2 @@ -84,6 +84,12 @@ # In particular, you will want to add classpath elements to give access of # all of your store procedures (store procedures are documented in the # HSQLDB User Guide in the SQL Syntax chapter. +# +# N.B.! +# If you're adding files to the classpath in order to be able to call them +# from SQL queries, you will be unable to access them unless you adjust the +# value of the system property hsqldb.method_class_names. Please see the +# comments on SERVER_JVMARGS, at the end of this file. # SERVER_ADDL_CLASSPATH=/home/blaine/storedprocs.jar:/usr/dev/dbutil/classes # For TLS encryption for your Server, set these two variables. @@ -104,4 +110,19 @@ # Any JVM args for the server. # For multiple args, put quotes around entire value. -#SERVER_JVMARGS=-Xmx512m +# +# N.B.! +# The default value of SERVER_JVMARGS sets the system property +# hsqldb.method_class_names to be empty. This is in order to lessen the +# security risk posed by HSQLDB allowing Java method calls in SQL statements. +# The implications of changing this value (as explained by the authors of +# HSQLDB) are as follows: +# If [it] is not set, then static methods of all available Java classes +# can be accessed as functions in HSQLDB. If the property is set, then +# only the list of semicolon seperated method names becomes accessible. +# An empty property value means no class is accessible. +# Regardless of the value of hsqldb.method_class_names, methods in +# org.hsqldb.Library will be accessible. +# Before making changes to the value below, please be advised of the possible +# dangers involved in allowing SQL queries to contain Java method calls. +SERVER_JVMARGS=-Dhsqldb.method_class_names=\"\" Index: hsqldb.spec =================================================================== RCS file: /cvs/dist/rpms/hsqldb/FC-6/hsqldb.spec,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- hsqldb.spec 22 Jan 2007 23:40:58 -0000 1.30 +++ hsqldb.spec 4 Dec 2007 15:29:41 -0000 1.31 @@ -38,7 +38,7 @@ Name: hsqldb Version: 1.8.0.7 -Release: 2jpp.1 +Release: 2jpp.2 Epoch: 1 Summary: Hsqldb Database Engine License: BSD Style @@ -51,6 +51,7 @@ Source4: %{name}-%{version}-standard-sqltool.rc Patch0: %{name}-%{version}-scripts.patch Patch1: hsqldb-tmp.patch +Patch2: %{name}-%{version}-backport.patch Requires: servletapi5 Requires(post): /bin/rm,/bin/ln Requires(post): servletapi5 @@ -131,6 +132,7 @@ %patch0 %patch1 -p1 +%patch2 -p1 %build export CLASSPATH=$(build-classpath \ @@ -267,6 +269,10 @@ %{_datadir}/%{name} %changelog +* Tue Dec 04 2007 Jon Prindiville 1:1.8.0.7-2jpp.2 +- Backport patch, addressing CVE-2007-4576 +- Resolves: #303561 + * Thu Jan 22 2007 Deepak Bhole 1:1.8.0.7-2jpp.1 - Updgrade to 1.8.0.7 From fedora-cvs-commits at redhat.com Tue Dec 4 15:35:20 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Tue, 4 Dec 2007 10:35:20 -0500 Subject: rpms/hsqldb/FC-6 hsqldb.spec,1.31,1.32 Message-ID: <200712041535.lB4FZK3b006886@cvs.devel.redhat.com> Author: jprindiv Update of /cvs/dist/rpms/hsqldb/FC-6 In directory cvs.devel.redhat.com:/tmp/cvs-serv6576 Modified Files: hsqldb.spec Log Message: Bumping release so I can 'make tag' without collision Index: hsqldb.spec =================================================================== RCS file: /cvs/dist/rpms/hsqldb/FC-6/hsqldb.spec,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- hsqldb.spec 4 Dec 2007 15:29:41 -0000 1.31 +++ hsqldb.spec 4 Dec 2007 15:35:17 -0000 1.32 @@ -38,7 +38,7 @@ Name: hsqldb Version: 1.8.0.7 -Release: 2jpp.2 +Release: 2jpp.3 Epoch: 1 Summary: Hsqldb Database Engine License: BSD Style @@ -269,7 +269,7 @@ %{_datadir}/%{name} %changelog -* Tue Dec 04 2007 Jon Prindiville 1:1.8.0.7-2jpp.2 +* Tue Dec 04 2007 Jon Prindiville 1:1.8.0.7-2jpp.3 - Backport patch, addressing CVE-2007-4576 - Resolves: #303561 From fedora-cvs-commits at redhat.com Tue Dec 4 16:43:17 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Tue, 4 Dec 2007 11:43:17 -0500 Subject: rpms/samba/FC-6 samba-3.0.24-CVE-2007-4572-regression.patch, 1.1, 1.2 samba.spec, 1.81, 1.82 Message-ID: <200712041643.lB4GhHis019176@cvs.devel.redhat.com> Author: ssorce Update of /cvs/dist/rpms/samba/FC-6 In directory cvs.devel.redhat.com:/tmp/cvs-serv19155 Modified Files: samba-3.0.24-CVE-2007-4572-regression.patch samba.spec Log Message: Fix a regression into the patch for the previous regression :/ samba-3.0.24-CVE-2007-4572-regression.patch: negprot.c | 2 +- reply.c | 8 ++++---- sesssetup.c | 6 +++--- srvstr.c | 13 +++---------- trans2.c | 48 ++++++++++++++++++++++++++---------------------- 5 files changed, 37 insertions(+), 40 deletions(-) Index: samba-3.0.24-CVE-2007-4572-regression.patch =================================================================== RCS file: /cvs/dist/rpms/samba/FC-6/samba-3.0.24-CVE-2007-4572-regression.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- samba-3.0.24-CVE-2007-4572-regression.patch 19 Nov 2007 20:38:48 -0000 1.1 +++ samba-3.0.24-CVE-2007-4572-regression.patch 4 Dec 2007 16:43:14 -0000 1.2 @@ -1,7 +1,7 @@ -diff -ur samba-3.0.24.orig/source/smbd/negprot.c samba-3.0.24/source/smbd/negprot.c ---- samba-3.0.24.orig/source/smbd/negprot.c 2007-11-18 13:20:17.000000000 -0500 -+++ samba-3.0.24/source/smbd/negprot.c 2007-11-18 13:20:32.000000000 -0500 -@@ -357,7 +357,7 @@ +diff -upr samba-3.0.24.orig/source/smbd/negprot.c samba-3.0.24/source/smbd/negprot.c +--- samba-3.0.24.orig/source/smbd/negprot.c 2007-12-04 11:29:12.000000000 -0500 ++++ samba-3.0.24/source/smbd/negprot.c 2007-12-04 11:29:49.000000000 -0500 +@@ -357,7 +357,7 @@ static int reply_nt1(char *inbuf, char * SCVAL(outbuf,smb_vwv16+1,8); p += 8; } @@ -10,10 +10,10 @@ STR_UNICODE|STR_TERMINATE|STR_NOALIGN); DEBUG(3,("not using SPNEGO\n")); } else { -diff -ur samba-3.0.24.orig/source/smbd/reply.c samba-3.0.24/source/smbd/reply.c ---- samba-3.0.24.orig/source/smbd/reply.c 2007-11-18 13:20:17.000000000 -0500 -+++ samba-3.0.24/source/smbd/reply.c 2007-11-18 13:20:32.000000000 -0500 -@@ -686,7 +686,7 @@ +diff -upr samba-3.0.24.orig/source/smbd/reply.c samba-3.0.24/source/smbd/reply.c +--- samba-3.0.24.orig/source/smbd/reply.c 2007-12-04 11:29:12.000000000 -0500 ++++ samba-3.0.24/source/smbd/reply.c 2007-12-04 11:29:49.000000000 -0500 +@@ -686,7 +686,7 @@ int reply_tcon_and_X(connection_struct * if (Protocol < PROTOCOL_NT1) { set_message(outbuf,2,0,True); p = smb_buf(outbuf); @@ -22,7 +22,7 @@ STR_TERMINATE|STR_ASCII); set_message_end(outbuf,p); } else { -@@ -696,9 +696,9 @@ +@@ -696,9 +696,9 @@ int reply_tcon_and_X(connection_struct * set_message(outbuf,3,0,True); p = smb_buf(outbuf); @@ -34,7 +34,7 @@ STR_TERMINATE); set_message_end(outbuf,p); -@@ -1794,7 +1794,7 @@ +@@ -1794,7 +1794,7 @@ int reply_ctemp(connection_struct *conn, thing in the byte section. JRA */ SSVALS(p, 0, -1); /* what is this? not in spec */ #endif @@ -43,10 +43,26 @@ p += namelen; outsize = set_message_end(outbuf, p); -diff -ur samba-3.0.24.orig/source/smbd/srvstr.c samba-3.0.24/source/smbd/srvstr.c ---- samba-3.0.24.orig/source/smbd/srvstr.c 2007-11-18 13:20:17.000000000 -0500 -+++ samba-3.0.24/source/smbd/srvstr.c 2007-11-18 13:20:32.000000000 -0500 -@@ -28,17 +28,10 @@ +diff -upr samba-3.0.24.orig/source/smbd/sesssetup.c samba-3.0.24/source/smbd/sesssetup.c +--- samba-3.0.24.orig/source/smbd/sesssetup.c 2007-12-04 11:29:12.000000000 -0500 ++++ samba-3.0.24/source/smbd/sesssetup.c 2007-12-04 11:29:49.000000000 -0500 +@@ -62,9 +62,9 @@ static int add_signature(char *outbuf, c + + fstr_sprintf( lanman, "Samba %s", SAMBA_VERSION_STRING); + +- p += srvstr_push(outbuf, p, "Unix", -1, STR_TERMINATE); +- p += srvstr_push(outbuf, p, lanman, -1, STR_TERMINATE); +- p += srvstr_push(outbuf, p, lp_workgroup(), -1, STR_TERMINATE); ++ p += srvstr_push(outbuf, p, "Unix", BUFFER_SIZE - (p - outbuf), STR_TERMINATE); ++ p += srvstr_push(outbuf, p, lanman, BUFFER_SIZE - (p - outbuf), STR_TERMINATE); ++ p += srvstr_push(outbuf, p, lp_workgroup(), BUFFER_SIZE - (p - outbuf), STR_TERMINATE); + + return PTR_DIFF(p, start); + } +diff -upr samba-3.0.24.orig/source/smbd/srvstr.c samba-3.0.24/source/smbd/srvstr.c +--- samba-3.0.24.orig/source/smbd/srvstr.c 2007-12-04 11:29:12.000000000 -0500 ++++ samba-3.0.24/source/smbd/srvstr.c 2007-12-04 11:29:49.000000000 -0500 +@@ -28,17 +28,10 @@ size_t srvstr_push_fn(const char *functi const char *base_ptr, void *dest, const char *src, int dest_len, int flags) { @@ -67,28 +83,37 @@ /* 'normal' push into size-specified buffer */ return push_string_fn(function, line, base_ptr, dest, src, dest_len, flags); } -diff -ur samba-3.0.24.orig/source/smbd/trans2.c samba-3.0.24/source/smbd/trans2.c ---- samba-3.0.24.orig/source/smbd/trans2.c 2007-11-18 13:20:17.000000000 -0500 -+++ samba-3.0.24/source/smbd/trans2.c 2007-11-18 13:26:03.000000000 -0500 -@@ -1225,7 +1225,7 @@ +diff -upr samba-3.0.24.orig/source/smbd/trans2.c samba-3.0.24/source/smbd/trans2.c +--- samba-3.0.24.orig/source/smbd/trans2.c 2007-12-04 11:29:12.000000000 -0500 ++++ samba-3.0.24/source/smbd/trans2.c 2007-12-04 11:34:05.000000000 -0500 +@@ -1047,7 +1047,7 @@ static BOOL get_lanman2_dir_entry(connec + char *path_mask,uint32 dirtype,int info_level, + int requires_resume_key, + BOOL dont_descend,char **ppdata, +- char *base_data, int space_remaining, ++ char *base_data, char *end_data, int space_remaining, + BOOL *out_of_space, BOOL *got_exact_match, + int *last_entry_off, struct ea_list *name_list, TALLOC_CTX *ea_ctx) + { +@@ -1225,7 +1225,7 @@ static BOOL get_lanman2_dir_entry(connec p += 23; nameptr = p; p += align_string(outbuf, p, 0); - len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE); -+ len = srvstr_push(outbuf, p, fname, space_remaining - (p - pdata), STR_TERMINATE); ++ len = srvstr_push(outbuf, p, fname, PTR_DIFF(end_data, p), STR_TERMINATE); if (SVAL(outbuf, smb_flg2) & FLAGS2_UNICODE_STRINGS) { if (len > 2) { SCVAL(nameptr, -1, len - 2); -@@ -1260,7 +1260,7 @@ +@@ -1260,7 +1260,7 @@ static BOOL get_lanman2_dir_entry(connec } p += 27; nameptr = p - 1; - len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE | STR_NOALIGN); -+ len = srvstr_push(outbuf, p, fname, space_remaining - (p - pdata), STR_TERMINATE | STR_NOALIGN); ++ len = srvstr_push(outbuf, p, fname, PTR_DIFF(end_data, p), STR_TERMINATE | STR_NOALIGN); if (SVAL(outbuf, smb_flg2) & FLAGS2_UNICODE_STRINGS) { if (len > 2) { len -= 2; -@@ -1314,9 +1314,9 @@ +@@ -1314,9 +1314,9 @@ static BOOL get_lanman2_dir_entry(connec } /* Push the ea_data followed by the name. */ @@ -96,65 +121,65 @@ + p += fill_ea_buffer(ea_ctx, p, space_remaining - (p - pdata), conn, name_list); nameptr = p; - len = srvstr_push(outbuf, p + 1, fname, -1, STR_TERMINATE | STR_NOALIGN); -+ len = srvstr_push(outbuf, p + 1, fname, space_remaining - (p - pdata), STR_TERMINATE | STR_NOALIGN); ++ len = srvstr_push(outbuf, p + 1, fname, PTR_DIFF(end_data, p+1), STR_TERMINATE | STR_NOALIGN); if (SVAL(outbuf, smb_flg2) & FLAGS2_UNICODE_STRINGS) { if (len > 2) { len -= 2; -@@ -1372,7 +1372,7 @@ +@@ -1372,7 +1372,7 @@ static BOOL get_lanman2_dir_entry(connec memset(p,'\0',26); } p += 2 + 24; - len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE_ASCII); -+ len = srvstr_push(outbuf, p, fname, space_remaining - (p - pdata), STR_TERMINATE_ASCII); ++ len = srvstr_push(outbuf, p, fname, PTR_DIFF(end_data, p), STR_TERMINATE_ASCII); SIVAL(q,0,len); p += len; SIVAL(p,0,0); /* Ensure any padding is null. */ -@@ -1393,7 +1393,7 @@ +@@ -1393,7 +1393,7 @@ static BOOL get_lanman2_dir_entry(connec SOFF_T(p,0,file_size); p += 8; SOFF_T(p,0,allocation_size); p += 8; SIVAL(p,0,nt_extmode); p += 4; - len = srvstr_push(outbuf, p + 4, fname, -1, STR_TERMINATE_ASCII); -+ len = srvstr_push(outbuf, p + 4, fname, space_remaining - (p - pdata), STR_TERMINATE_ASCII); ++ len = srvstr_push(outbuf, p + 4, fname, PTR_DIFF(end_data, p+4), STR_TERMINATE_ASCII); SIVAL(p,0,len); p += 4 + len; SIVAL(p,0,0); /* Ensure any padding is null. */ -@@ -1420,7 +1420,7 @@ +@@ -1420,7 +1420,7 @@ static BOOL get_lanman2_dir_entry(connec SIVAL(p,0,ea_size); /* Extended attributes */ p +=4; } - len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE_ASCII); -+ len = srvstr_push(outbuf, p, fname, space_remaining - (p - pdata), STR_TERMINATE_ASCII); ++ len = srvstr_push(outbuf, p, fname, PTR_DIFF(end_data, p), STR_TERMINATE_ASCII); SIVAL(q, 0, len); p += len; -@@ -1438,7 +1438,7 @@ +@@ -1438,7 +1438,7 @@ static BOOL get_lanman2_dir_entry(connec p += 4; /* this must *not* be null terminated or w2k gets in a loop trying to set an acl on a dir (tridge) */ - len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE_ASCII); -+ len = srvstr_push(outbuf, p, fname, space_remaining - (p - pdata), STR_TERMINATE_ASCII); ++ len = srvstr_push(outbuf, p, fname, PTR_DIFF(end_data, p), STR_TERMINATE_ASCII); SIVAL(p, -4, len); p += len; SIVAL(p,0,0); /* Ensure any padding is null. */ -@@ -1468,7 +1468,7 @@ +@@ -1468,7 +1468,7 @@ static BOOL get_lanman2_dir_entry(connec SIVAL(p,0,0); p += 4; /* Unknown - reserved ? */ SIVAL(p,0,sbuf.st_ino); p += 4; /* FileIndexLow */ SIVAL(p,0,sbuf.st_dev); p += 4; /* FileIndexHigh */ - len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE_ASCII); -+ len = srvstr_push(outbuf, p, fname, space_remaining - (p - pdata), STR_TERMINATE_ASCII); ++ len = srvstr_push(outbuf, p, fname, PTR_DIFF(end_data, p), STR_TERMINATE_ASCII); SIVAL(q, 0, len); p += len; SIVAL(p,0,0); /* Ensure any padding is null. */ -@@ -1518,7 +1518,7 @@ +@@ -1518,7 +1518,7 @@ static BOOL get_lanman2_dir_entry(connec SSVAL(p,0,0); p += 2; /* Reserved ? */ SIVAL(p,0,sbuf.st_ino); p += 4; /* FileIndexLow */ SIVAL(p,0,sbuf.st_dev); p += 4; /* FileIndexHigh */ - len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE_ASCII); -+ len = srvstr_push(outbuf, p, fname, space_remaining - (p - pdata), STR_TERMINATE_ASCII); ++ len = srvstr_push(outbuf, p, fname, PTR_DIFF(end_data, p), STR_TERMINATE_ASCII); SIVAL(q,0,len); p += len; SIVAL(p,0,0); /* Ensure any padding is null. */ -@@ -1577,7 +1577,7 @@ +@@ -1577,7 +1577,7 @@ static BOOL get_lanman2_dir_entry(connec SIVAL(p,4,0); p+= 8; @@ -163,7 +188,57 @@ p += len; SIVAL(p,0,0); /* Ensure any padding is null. */ -@@ -2229,7 +2229,7 @@ +@@ -1625,6 +1625,7 @@ static int call_trans2findfirst(connecti + requested. */ + char *params = *pparams; + char *pdata = *ppdata; ++ char *data_end; + uint32 dirtype = SVAL(params,0); + int maxentries = SVAL(params,2); + uint16 findfirst_flags = SVAL(params,4); +@@ -1754,6 +1755,7 @@ total_data=%u (should be %u)\n", (unsign + return ERROR_NT(NT_STATUS_NO_MEMORY); + } + pdata = *ppdata; ++ data_end = pdata + max_data_bytes + DIR_ENTRY_SAFETY_MARGIN - 1; + + /* Realloc the params space */ + *pparams = SMB_REALLOC(*pparams, 10); +@@ -1798,7 +1800,7 @@ total_data=%u (should be %u)\n", (unsign + inbuf, outbuf, + mask,dirtype,info_level, + requires_resume_key,dont_descend, +- &p,pdata,space_remaining, &out_of_space, &got_exact_match, ++ &p,pdata,data_end,space_remaining, &out_of_space, &got_exact_match, + &last_entry_off, ea_list, ea_ctx); + } + +@@ -1892,6 +1894,7 @@ static int call_trans2findnext(connectio + requested. */ + char *params = *pparams; + char *pdata = *ppdata; ++ char *data_end; + int dptr_num = SVAL(params,0); + int maxentries = SVAL(params,2); + uint16 info_level = SVAL(params,4); +@@ -2006,6 +2009,7 @@ total_data=%u (should be %u)\n", (unsign + } + + pdata = *ppdata; ++ data_end = pdata + max_data_bytes + DIR_ENTRY_SAFETY_MARGIN - 1; + + /* Realloc the params space */ + *pparams = SMB_REALLOC(*pparams, 6*SIZEOFWORD); +@@ -2097,7 +2101,7 @@ total_data=%u (should be %u)\n", (unsign + inbuf, outbuf, + mask,dirtype,info_level, + requires_resume_key,dont_descend, +- &p,pdata,space_remaining, &out_of_space, &got_exact_match, ++ &p,pdata,data_end,space_remaining, &out_of_space, &got_exact_match, + &last_entry_off, ea_list, ea_ctx); + } + +@@ -2229,7 +2233,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAva * this call so try fixing this by adding a terminating null to * the pushed string. The change here was adding the STR_TERMINATE. JRA. */ @@ -172,7 +247,7 @@ SCVAL(pdata,l2_vol_cch,len); data_len = l2_vol_szVolLabel + len; DEBUG(5,("call_trans2qfsinfo : time = %x, namelen = %d, name = %s\n", -@@ -2251,14 +2251,14 @@ +@@ -2251,14 +2255,14 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAva SIVAL(pdata,4,255); /* Max filename component length */ /* NOTE! the fstype must *not* be null terminated or win98 won't recognise it and will think we can't do long filenames */ @@ -189,7 +264,7 @@ data_len = 4 + len; SIVAL(pdata,0,len); break; -@@ -2273,7 +2273,7 @@ +@@ -2273,7 +2277,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAva SIVAL(pdata,8,str_checksum(lp_servicename(snum)) ^ (str_checksum(get_local_machine_name())<<16)); @@ -198,7 +273,7 @@ SIVAL(pdata,12,len); data_len = 18+len; DEBUG(5,("call_trans2qfsinfo : SMB_QUERY_FS_VOLUME_INFO namelen = %d, vol=%s serv=%s\n", -@@ -3232,7 +3232,7 @@ +@@ -3232,7 +3236,7 @@ total_data=%u (should be %u)\n", (unsign if(!mangle_is_8_3(short_name, True, SNUM(conn))) { mangle_map(short_name,True,True,SNUM(conn)); } @@ -207,7 +282,7 @@ data_size = 4 + len; SIVAL(pdata,0,len); break; -@@ -3242,7 +3242,7 @@ +@@ -3242,7 +3246,7 @@ total_data=%u (should be %u)\n", (unsign /* this must be *exactly* right for ACLs on mapped drives to work */ @@ -216,7 +291,7 @@ DEBUG(10,("call_trans2qfilepathinfo: SMB_QUERY_FILE_NAME_INFO\n")); data_size = 4 + len; SIVAL(pdata,0,len); -@@ -3283,7 +3283,7 @@ +@@ -3283,7 +3287,7 @@ total_data=%u (should be %u)\n", (unsign pdata += 24; SIVAL(pdata,0,ea_size); pdata += 4; /* EA info */ @@ -225,7 +300,7 @@ SIVAL(pdata,0,len); pdata += 4 + len; data_size = PTR_DIFF(pdata,(*ppdata)); -@@ -3472,7 +3472,7 @@ +@@ -3472,7 +3476,7 @@ total_data=%u (should be %u)\n", (unsign if (len == -1) return(UNIXERROR(ERRDOS,ERRnoaccess)); buffer[len] = 0; @@ -234,19 +309,3 @@ pdata += len; data_size = PTR_DIFF(pdata,(*ppdata)); -diff -ur samba-3.0.24.orig/source/smbd/sesssetup.c samba-3.0.24/source/smbd/sesssetup.c ---- samba-3.0.24.orig/source/smbd/sesssetup.c 2007-11-19 14:58:31.000000000 -0500 -+++ samba-3.0.24/source/smbd/sesssetup.c 2007-11-19 15:23:32.000000000 -0500 -@@ -62,9 +62,9 @@ - - fstr_sprintf( lanman, "Samba %s", SAMBA_VERSION_STRING); - -- p += srvstr_push(outbuf, p, "Unix", -1, STR_TERMINATE); -- p += srvstr_push(outbuf, p, lanman, -1, STR_TERMINATE); -- p += srvstr_push(outbuf, p, lp_workgroup(), -1, STR_TERMINATE); -+ p += srvstr_push(outbuf, p, "Unix", BUFFER_SIZE - (p - outbuf), STR_TERMINATE); -+ p += srvstr_push(outbuf, p, lanman, BUFFER_SIZE - (p - outbuf), STR_TERMINATE); -+ p += srvstr_push(outbuf, p, lp_workgroup(), BUFFER_SIZE - (p - outbuf), STR_TERMINATE); - - return PTR_DIFF(p, start); - } Index: samba.spec =================================================================== RCS file: /cvs/dist/rpms/samba/FC-6/samba.spec,v retrieving revision 1.81 retrieving revision 1.82 diff -u -r1.81 -r1.82 --- samba.spec 19 Nov 2007 20:38:48 -0000 1.81 +++ samba.spec 4 Dec 2007 16:43:14 -0000 1.82 @@ -3,7 +3,7 @@ Summary: The Samba SMB server. Name: samba Version: 3.0.24 -Release: 9%{?dist} +Release: 10%{?dist} Epoch: 0 License: GNU GPL Version 2 Group: System Environment/Daemons @@ -478,6 +478,10 @@ %{_mandir}/man7/libsmbclient.7* %changelog +* Tue Dec 3 2007 Simo Sorce 3.0.24-10.fc6 +- The fix for the regression intorduced by CVE-2007-4572 was + not complete, updated the patch with more fixes + * Mon Nov 19 2007 Simo Sorce 3.0.24-9.fc6 - Fix regression intorduced by CVE-2007-4572 From fedora-cvs-commits at redhat.com Tue Dec 4 16:50:05 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Tue, 4 Dec 2007 11:50:05 -0500 Subject: rpms/samba/FC-6 samba-3.0.24-CVE-2007-4572-regression.patch, 1.2, 1.3 samba.spec, 1.82, 1.83 Message-ID: <200712041650.lB4Go5Qn020868@cvs.devel.redhat.com> Author: ssorce Update of /cvs/dist/rpms/samba/FC-6 In directory cvs.devel.redhat.com:/tmp/cvs-serv20486 Modified Files: samba-3.0.24-CVE-2007-4572-regression.patch samba.spec Log Message: Missed yet one line fix samba-3.0.24-CVE-2007-4572-regression.patch: negprot.c | 2 +- reply.c | 8 ++++---- sesssetup.c | 6 +++--- srvstr.c | 13 +++---------- trans2.c | 48 ++++++++++++++++++++++++++---------------------- 5 files changed, 37 insertions(+), 40 deletions(-) Index: samba-3.0.24-CVE-2007-4572-regression.patch =================================================================== RCS file: /cvs/dist/rpms/samba/FC-6/samba-3.0.24-CVE-2007-4572-regression.patch,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- samba-3.0.24-CVE-2007-4572-regression.patch 4 Dec 2007 16:43:14 -0000 1.2 +++ samba-3.0.24-CVE-2007-4572-regression.patch 4 Dec 2007 16:50:03 -0000 1.3 @@ -184,7 +184,7 @@ p+= 8; - len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE); -+ len = srvstr_push(outbuf, p, fname, space_remaining - (p - pdata), STR_TERMINATE); ++ len = srvstr_push(outbuf, p, fname, PTR_DIFF(end_data, p), STR_TERMINATE); p += len; SIVAL(p,0,0); /* Ensure any padding is null. */ Index: samba.spec =================================================================== RCS file: /cvs/dist/rpms/samba/FC-6/samba.spec,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- samba.spec 4 Dec 2007 16:43:14 -0000 1.82 +++ samba.spec 4 Dec 2007 16:50:03 -0000 1.83 @@ -3,7 +3,7 @@ Summary: The Samba SMB server. Name: samba Version: 3.0.24 -Release: 10%{?dist} +Release: 11%{?dist} Epoch: 0 License: GNU GPL Version 2 Group: System Environment/Daemons @@ -478,7 +478,7 @@ %{_mandir}/man7/libsmbclient.7* %changelog -* Tue Dec 3 2007 Simo Sorce 3.0.24-10.fc6 +* Tue Dec 3 2007 Simo Sorce 3.0.24-11.fc6 - The fix for the regression intorduced by CVE-2007-4572 was not complete, updated the patch with more fixes From fedora-cvs-commits at redhat.com Thu Dec 6 18:43:58 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Thu, 6 Dec 2007 13:43:58 -0500 Subject: rpms/xorg-x11-xfs/FC-6 .cvsignore, 1.9, 1.10 sources, 1.8, 1.9 xorg-x11-xfs.spec, 1.27, 1.28 Message-ID: <200712061843.lB6IhwJb021079@cvs.devel.redhat.com> Author: ajackson Update of /cvs/dist/rpms/xorg-x11-xfs/FC-6 In directory cvs.devel.redhat.com:/tmp/cvs-serv21053/FC-6 Modified Files: .cvsignore sources xorg-x11-xfs.spec Log Message: xfs 1.0.5 Index: .cvsignore =================================================================== RCS file: /cvs/dist/rpms/xorg-x11-xfs/FC-6/.cvsignore,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- .cvsignore 27 Apr 2006 22:47:47 -0000 1.9 +++ .cvsignore 6 Dec 2007 18:43:55 -0000 1.10 @@ -1,5 +1,5 @@ fslsfonts-1.0.1.tar.bz2 +fstobdf-1.0.2.tar.bz2 showfont-1.0.1.tar.bz2 xfsinfo-1.0.1.tar.bz2 -fstobdf-1.0.2.tar.bz2 -xfs-1.0.2.tar.bz2 +xfs-1.0.5.tar.bz2 Index: sources =================================================================== RCS file: /cvs/dist/rpms/xorg-x11-xfs/FC-6/sources,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- sources 27 Apr 2006 22:47:47 -0000 1.8 +++ sources 6 Dec 2007 18:43:55 -0000 1.9 @@ -1,5 +1,5 @@ c7b2f8a938749d41dc86db6bd1e6a4ca fslsfonts-1.0.1.tar.bz2 +99144743ab3cbb9cf37090fdc9e747db fstobdf-1.0.2.tar.bz2 339b2faf1ca5114fda414338e15b6e21 showfont-1.0.1.tar.bz2 e98b18fbce1261de30b1de819d86f48a xfsinfo-1.0.1.tar.bz2 -99144743ab3cbb9cf37090fdc9e747db fstobdf-1.0.2.tar.bz2 -6745fe95dd43863c60f6583500f0e115 xfs-1.0.2.tar.bz2 +3fc73b5e39a1fe8b8d96563c8144cffe xfs-1.0.5.tar.bz2 Index: xorg-x11-xfs.spec =================================================================== RCS file: /cvs/dist/rpms/xorg-x11-xfs/FC-6/xorg-x11-xfs.spec,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- xorg-x11-xfs.spec 12 Jul 2006 09:21:39 -0000 1.27 +++ xorg-x11-xfs.spec 6 Dec 2007 18:43:55 -0000 1.28 @@ -4,12 +4,12 @@ %define _sysfontdir %{_datadir}/fonts %define _oldx11fontdir /usr/X11R6/lib/X11/fonts -%define xfs_version 1.0.2 +%define xfs_version 1.0.5 Summary: X.Org X11 xfs font server Name: xorg-x11-%{pkgname} Version: %{xfs_version} -Release: 3.1 +Release: 1%{?dist} # NOTE: Remove Epoch line if package gets renamed Epoch: 1 License: MIT/X11 @@ -281,6 +281,9 @@ %{_mandir}/man1/xfsinfo.1x* %changelog +* Thu Dec 06 2007 Adam Jackson 1:1.0.5-1 +- xfs 1.0.5 + * Wed Jul 12 2006 Jesse Keating - sh: line 0: fg: no job control - rebuild From fedora-cvs-commits at redhat.com Thu Dec 6 18:54:12 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Thu, 6 Dec 2007 13:54:12 -0500 Subject: rpms/xorg-x11-xfs/FC-6 xorg-x11-xfs.spec,1.28,1.29 Message-ID: <200712061854.lB6IsCYl022521@cvs.devel.redhat.com> Author: ajackson Update of /cvs/dist/rpms/xorg-x11-xfs/FC-6 In directory cvs.devel.redhat.com:/tmp/cvs-serv22506 Modified Files: xorg-x11-xfs.spec Log Message: fix man page paths Index: xorg-x11-xfs.spec =================================================================== RCS file: /cvs/dist/rpms/xorg-x11-xfs/FC-6/xorg-x11-xfs.spec,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- xorg-x11-xfs.spec 6 Dec 2007 18:43:55 -0000 1.28 +++ xorg-x11-xfs.spec 6 Dec 2007 18:54:09 -0000 1.29 @@ -266,7 +266,7 @@ %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/X11/fs/config #%dir %{_mandir}/man1x # FIXME: The manpage incorrectly points to /usr/X11R6/... -%{_mandir}/man1/xfs.1x* +%{_mandir}/man1/xfs.1* %{_sysconfdir}/rc.d/init.d/xfs %files utils @@ -275,10 +275,10 @@ %{_bindir}/showfont %{_bindir}/xfsinfo #%dir %{_mandir}/man1x -%{_mandir}/man1/fslsfonts.1x* -%{_mandir}/man1/fstobdf.1x* -%{_mandir}/man1/showfont.1x* -%{_mandir}/man1/xfsinfo.1x* +%{_mandir}/man1/fslsfonts.1* +%{_mandir}/man1/fstobdf.1* +%{_mandir}/man1/showfont.1* +%{_mandir}/man1/xfsinfo.1* %changelog * Thu Dec 06 2007 Adam Jackson 1:1.0.5-1 From fedora-cvs-commits at redhat.com Sun Dec 9 16:07:39 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Sun, 9 Dec 2007 10:07:39 -0600 Subject: EFSF ( OTCBB ) Goes after "SUPER BUG" MRSA Message-ID: <200712091607.lB9G7nQG004299@mx3.redhat.com> An HTML attachment was scrubbed... URL: From fedora-cvs-commits at redhat.com Sun Dec 9 16:08:26 2007 From: fedora-cvs-commits at redhat.com (fedora-cvs-commits at redhat.com) Date: Sun, 9 Dec 2007 10:08:26 -0600 Subject: EFSF ( OTCBB ) Goes after "SUPER BUG" MRSA Message-ID: <200712091608.lB9G8VSP023321@mx1.redhat.com> An HTML attachment was scrubbed... URL: