rpms/cups/F-9 .cvsignore, 1.40, 1.41 cups-getnameddest.patch, 1.1, 1.2 cups-lspp.patch, 1.34, 1.35 cups.spec, 1.418, 1.419 sources, 1.43, 1.44 cups-CVE-2008-1373.patch, 1.1, NONE cups-CVE-2008-1722.patch, 1.1, NONE

Tim Waugh (twaugh) fedora-extras-commits at redhat.com
Sun Aug 3 13:48:58 UTC 2008


Author: twaugh

Update of /cvs/pkgs/rpms/cups/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32252

Modified Files:
	.cvsignore cups-getnameddest.patch cups-lspp.patch cups.spec 
	sources 
Removed Files:
	cups-CVE-2008-1373.patch cups-CVE-2008-1722.patch 
Log Message:
* Sun Aug  3 2008 Tim Waugh <twaugh at redhat.com> 1:1.3.8-1
- 1.3.8.
- Applied patch to fix STR #2892 (bug #453610).
- Removed autoconf requirement by applying autoconf-generated changes
  to patches that caused them.  Affected patches: cups-lspp.
- CVE-2008-1373 patch is no longer needed (applied upstream).
- Mark HTML files and templates config(noreplace) for site-local
  modifications (bug #441719).
- The cups-devel package requires zlib-devel (bug #455192).



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/.cvsignore,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- .cvsignore	2 Apr 2008 11:52:07 -0000	1.40
+++ .cvsignore	3 Aug 2008 13:48:28 -0000	1.41
@@ -32,3 +32,4 @@
 cups-1.3.5-source.tar.bz2
 cups-1.3.6-source.tar.bz2
 cups-1.3.7-source.tar.bz2
+cups-1.3.8-source.tar.bz2

cups-getnameddest.patch:

Index: cups-getnameddest.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/cups-getnameddest.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cups-getnameddest.patch	17 Jun 2008 11:17:09 -0000	1.1
+++ cups-getnameddest.patch	3 Aug 2008 13:48:28 -0000	1.2
@@ -1,6 +1,76 @@
-diff -up cups-1.3.7/cups/dest.c.getnameddest cups-1.3.7/cups/dest.c
---- cups-1.3.7/cups/dest.c.getnameddest	2007-07-11 22:46:42.000000000 +0100
-+++ cups-1.3.7/cups/dest.c	2008-06-17 11:00:50.000000000 +0100
+diff -up cups-1.3.8/berkeley/lpr.c.getnameddest cups-1.3.8/berkeley/lpr.c
+--- cups-1.3.8/berkeley/lpr.c.getnameddest	2008-07-28 16:28:24.000000000 +0100
++++ cups-1.3.8/berkeley/lpr.c	2008-07-28 16:28:24.000000000 +0100
+@@ -92,9 +92,7 @@ main(int  argc,				/* I - Number of comm
+   int		num_copies;		/* Number of copies per file */
+   int		num_files;		/* Number of files to print */
+   const char	*files[1000];		/* Files to print */
+-  int		num_dests;		/* Number of destinations */
+-  cups_dest_t	*dests,			/* Destinations */
+-		*dest;			/* Selected destination */
++  cups_dest_t	*dest;			/* Selected destination */
+   int		num_options;		/* Number of options */
+   cups_option_t	*options;		/* Options */
+   int		deletefile;		/* Delete file after print? */
+@@ -112,8 +110,7 @@ main(int  argc,				/* I - Number of comm
+ 
+   deletefile  = 0;
+   printer     = NULL;
+-  num_dests   = 0;
+-  dests       = NULL;
++  dest        = NULL;
+   num_options = 0;
+   options     = NULL;
+   num_files   = 0;
+@@ -282,10 +279,7 @@ main(int  argc,				/* I - Number of comm
+             if ((instance = strrchr(printer, '/')) != NULL)
+ 	      *instance++ = '\0';
+ 
+-	    if (num_dests == 0)
+-	      num_dests = cupsGetDests(&dests);
+-
+-            if ((dest = cupsGetDest(printer, instance, num_dests, dests)) != NULL)
++            if ((dest = cupsGetNamedDest(NULL, printer, instance)) != NULL)
+ 	    {
+ 	      for (j = 0; j < dest->num_options; j ++)
+ 	        if (cupsGetOption(dest->options[j].name, num_options,
+@@ -385,10 +379,7 @@ main(int  argc,				/* I - Number of comm
+ 
+   if (printer == NULL)
+   {
+-    if (num_dests == 0)
+-      num_dests = cupsGetDests(&dests);
+-
+-    if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) != NULL)
++    if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) != NULL)
+     {
+       printer = dest->name;
+ 
+@@ -417,7 +408,7 @@ main(int  argc,				/* I - Number of comm
+     else
+       val = "LPDEST";
+ 
+-    if (printer && !cupsGetDest(printer, NULL, num_dests, dests))
++    if (printer && !cupsGetNamedDest(NULL, printer, NULL))
+       _cupsLangPrintf(stderr,
+                       _("%s: Error - %s environment variable names "
+ 		        "non-existent destination \"%s\"!\n"),
+diff -up cups-1.3.8/cups/cups.h.getnameddest cups-1.3.8/cups/cups.h
+--- cups-1.3.8/cups/cups.h.getnameddest	2008-07-11 23:48:49.000000000 +0100
++++ cups-1.3.8/cups/cups.h	2008-07-28 16:28:24.000000000 +0100
+@@ -248,6 +248,9 @@ extern void		cupsSetDefaultDest(const ch
+ 					   int num_dests,
+ 					   cups_dest_t *dests);
+ 
++/**** New in CUPS 1.4 ****/
++extern cups_dest_t	*cupsGetNamedDest(http_t *http, const char *name,
++			                  const char *instance);
+ 
+ #  ifdef __cplusplus
+ }
+diff -up cups-1.3.8/cups/dest.c.getnameddest cups-1.3.8/cups/dest.c
+--- cups-1.3.8/cups/dest.c.getnameddest	2008-07-11 23:48:49.000000000 +0100
++++ cups-1.3.8/cups/dest.c	2008-07-28 16:28:24.000000000 +0100
 @@ -25,6 +25,7 @@
   *                              server.
   *   cupsGetDests2()          - Get the list of destinations from the
@@ -611,22 +681,20 @@
        {
          dest->num_options = num_options;
  	dest->options     = options;
-diff -up cups-1.3.7/cups/cups.h.getnameddest cups-1.3.7/cups/cups.h
---- cups-1.3.7/cups/cups.h.getnameddest	2008-02-20 00:32:58.000000000 +0000
-+++ cups-1.3.7/cups/cups.h	2008-06-17 11:05:32.000000000 +0100
-@@ -248,6 +248,9 @@ extern void		cupsSetDefaultDest(const ch
- 					   int num_dests,
- 					   cups_dest_t *dests);
- 
-+/**** New in CUPS 1.4 ****/
-+extern cups_dest_t	*cupsGetNamedDest(http_t *http, const char *name,
-+			                  const char *instance);
- 
- #  ifdef __cplusplus
- }
-diff -up cups-1.3.7/cups/Makefile.getnameddest cups-1.3.7/cups/Makefile
---- cups-1.3.7/cups/Makefile.getnameddest	2008-02-20 20:18:33.000000000 +0000
-+++ cups-1.3.7/cups/Makefile	2008-06-17 11:00:50.000000000 +0100
+diff -up cups-1.3.8/cups/libcups.exp.getnameddest cups-1.3.8/cups/libcups.exp
+--- cups-1.3.8/cups/libcups.exp.getnameddest	2008-04-09 04:39:40.000000000 +0100
++++ cups-1.3.8/cups/libcups.exp	2008-07-28 16:28:24.000000000 +0100
+@@ -114,6 +114,7 @@ _cupsGetFd
+ _cupsGetFile
+ _cupsGetJobs
+ _cupsGetJobs2
++_cupsGetNamedDest
+ _cupsGetOption
+ _cupsGetPassword
+ _cupsGetPPD
+diff -up cups-1.3.8/cups/Makefile.getnameddest cups-1.3.8/cups/Makefile
+--- cups-1.3.8/cups/Makefile.getnameddest	2008-02-20 20:18:33.000000000 +0000
++++ cups-1.3.8/cups/Makefile	2008-07-28 16:28:24.000000000 +0100
 @@ -263,7 +263,7 @@ libcups.so.2 libcups.sl.2:	$(LIBOBJS)
  # libcups.2.dylib
  #
@@ -636,9 +704,9 @@
  	echo Linking $@...
  	$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
  		-install_name $(libdir)/$@ \
-diff -up cups-1.3.7/cups/testcups.c.getnameddest cups-1.3.7/cups/testcups.c
---- cups-1.3.7/cups/testcups.c.getnameddest	2008-01-14 22:12:58.000000000 +0000
-+++ cups-1.3.7/cups/testcups.c	2008-06-17 11:00:50.000000000 +0100
+diff -up cups-1.3.8/cups/testcups.c.getnameddest cups-1.3.8/cups/testcups.c
+--- cups-1.3.8/cups/testcups.c.getnameddest	2008-07-11 23:48:49.000000000 +0100
++++ cups-1.3.8/cups/testcups.c	2008-07-28 16:37:24.000000000 +0100
 @@ -16,7 +16,8 @@
   *
   * Contents:
@@ -757,7 +825,7 @@
  
   /*
    * cupsGetDest(printer)
-@@ -80,20 +162,34 @@ main(int  argc,				/* I - Number of comm
+@@ -79,20 +161,33 @@ main(int  argc,				/* I - Number of comm
      puts("PASS");
  
   /*
@@ -767,14 +835,15 @@
  
 -  fputs("cupsGetDest(NULL): ", stdout);
 +  printf("cupsGetNamedDest(NULL, \"%s\", \"%s\"): ", dest->name,
-+         dest->instance ? dest->instance : "(null)");
++	 dest->instance ? dest->instance : "(null)");
    fflush(stdout);
  
 -  if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) == NULL)
 +  if ((named_dest = cupsGetNamedDest(NULL, dest->name,
-+                                     dest->instance)) == NULL ||
++				     dest->instance)) == NULL ||
 +      !dests_equal(dest, named_dest))
    {
+-    puts("FAIL");
 +    if (named_dest)
 +    {
 +      puts("FAIL (different values)");
@@ -783,9 +852,7 @@
 +    else
 +      puts("FAIL (no destination)");
 +
-+
-     status = 1;
--    puts("FAIL");
+     return (1);
    }
    else
      puts("PASS");
@@ -796,7 +863,7 @@
   /*
    * cupsPrintFile()
    */
-@@ -171,5 +267,83 @@ main(int  argc,				/* I - Number of comm
+@@ -169,5 +264,83 @@ main(int  argc,				/* I - Number of comm
  
  
  /*
@@ -880,78 +947,9 @@
 +/*
   * End of "$Id$".
   */
-diff -up cups-1.3.7/cups/libcups.exp.getnameddest cups-1.3.7/cups/libcups.exp
---- cups-1.3.7/cups/libcups.exp.getnameddest	2008-01-22 22:02:46.000000000 +0000
-+++ cups-1.3.7/cups/libcups.exp	2008-06-17 11:00:50.000000000 +0100
-@@ -113,6 +113,7 @@ _cupsGetFd
- _cupsGetFile
- _cupsGetJobs
- _cupsGetJobs2
-+_cupsGetNamedDest
- _cupsGetOption
- _cupsGetPassword
- _cupsGetPPD
-diff -up cups-1.3.7/CHANGES.txt.getnameddest cups-1.3.7/CHANGES.txt
-diff -up cups-1.3.7/berkeley/lpr.c.getnameddest cups-1.3.7/berkeley/lpr.c
---- cups-1.3.7/berkeley/lpr.c.getnameddest	2008-06-17 11:00:11.000000000 +0100
-+++ cups-1.3.7/berkeley/lpr.c	2008-06-17 11:00:50.000000000 +0100
-@@ -92,9 +92,7 @@ main(int  argc,				/* I - Number of comm
-   int		num_copies;		/* Number of copies per file */
-   int		num_files;		/* Number of files to print */
-   const char	*files[1000];		/* Files to print */
--  int		num_dests;		/* Number of destinations */
--  cups_dest_t	*dests,			/* Destinations */
--		*dest;			/* Selected destination */
-+  cups_dest_t	*dest;			/* Selected destination */
-   int		num_options;		/* Number of options */
-   cups_option_t	*options;		/* Options */
-   int		deletefile;		/* Delete file after print? */
-@@ -112,8 +110,7 @@ main(int  argc,				/* I - Number of comm
- 
-   deletefile  = 0;
-   printer     = NULL;
--  num_dests   = 0;
--  dests       = NULL;
-+  dest        = NULL;
-   num_options = 0;
-   options     = NULL;
-   num_files   = 0;
-@@ -282,10 +279,7 @@ main(int  argc,				/* I - Number of comm
-             if ((instance = strrchr(printer, '/')) != NULL)
- 	      *instance++ = '\0';
- 
--	    if (num_dests == 0)
--	      num_dests = cupsGetDests(&dests);
--
--            if ((dest = cupsGetDest(printer, instance, num_dests, dests)) != NULL)
-+            if ((dest = cupsGetNamedDest(NULL, printer, instance)) != NULL)
- 	    {
- 	      for (j = 0; j < dest->num_options; j ++)
- 	        if (cupsGetOption(dest->options[j].name, num_options,
-@@ -385,10 +379,7 @@ main(int  argc,				/* I - Number of comm
- 
-   if (printer == NULL)
-   {
--    if (num_dests == 0)
--      num_dests = cupsGetDests(&dests);
--
--    if ((dest = cupsGetDest(NULL, NULL, num_dests, dests)) != NULL)
-+    if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) != NULL)
-     {
-       printer = dest->name;
- 
-@@ -417,7 +408,7 @@ main(int  argc,				/* I - Number of comm
-     else
-       val = "LPDEST";
- 
--    if (printer && !cupsGetDest(printer, NULL, num_dests, dests))
-+    if (printer && !cupsGetNamedDest(NULL, printer, NULL))
-       _cupsLangPrintf(stderr,
-                       _("%s: Error - %s environment variable names "
- 		        "non-existent destination \"%s\"!\n"),
-diff -up cups-1.3.7/systemv/lp.c.getnameddest cups-1.3.7/systemv/lp.c
---- cups-1.3.7/systemv/lp.c.getnameddest	2007-07-11 22:46:42.000000000 +0100
-+++ cups-1.3.7/systemv/lp.c	2008-06-17 11:00:50.000000000 +0100
+diff -up cups-1.3.8/systemv/lp.c.getnameddest cups-1.3.8/systemv/lp.c
+--- cups-1.3.8/systemv/lp.c.getnameddest	2008-07-11 23:48:49.000000000 +0100
++++ cups-1.3.8/systemv/lp.c	2008-07-28 16:28:24.000000000 +0100
 @@ -73,9 +73,7 @@ main(int  argc,				/* I - Number of comm
    int		num_copies;		/* Number of copies per file */
    int		num_files;		/* Number of files to print */

cups-lspp.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.34 -r 1.35 cups-lspp.patch
Index: cups-lspp.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/cups-lspp.patch,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- cups-lspp.patch	1 Jul 2008 11:37:34 -0000	1.34
+++ cups-lspp.patch	3 Aug 2008 13:48:28 -0000	1.35
@@ -1,5 +1,549 @@
---- cups-1.3.7/cups/cups.h.lspp	2008-02-20 00:32:58.000000000 +0000
-+++ cups-1.3.7/cups/cups.h	2008-05-30 16:59:10.000000000 +0100
+diff -up cups-1.3.8/config.h.in.lspp cups-1.3.8/config.h.in
+--- cups-1.3.8/config.h.in.lspp	2008-01-07 18:26:57.000000000 +0000
++++ cups-1.3.8/config.h.in	2008-07-28 16:37:51.000000000 +0100
+@@ -530,6 +530,13 @@
+ #undef HAVE_REMOVEFILE
+ 
+ 
++/*
++ * Are we trying to meet LSPP requirements?
++ */
++
++#undef WITH_LSPP
++
++
+ #endif /* !_CUPS_CONFIG_H_ */
+ 
+ /*
+diff -up /dev/null cups-1.3.8/config-scripts/cups-lspp.m4
+--- /dev/null	2008-07-28 15:45:57.127000670 +0100
++++ cups-1.3.8/config-scripts/cups-lspp.m4	2008-07-28 16:37:51.000000000 +0100
+@@ -0,0 +1,36 @@
++dnl
++dnl   LSPP code for the Common UNIX Printing System (CUPS).
++dnl
++dnl   Copyright 2005-2006 by Hewlett-Packard Development Company, L.P.
++dnl
++dnl   This program is free software; you can redistribute it and/or modify
++dnl   it under the terms of the GNU General Public License as published by
++dnl   the Free Software Foundation; version 2.
++dnl
++dnl   This program is distributed in the hope that it will be useful, but
++dnl   WITHOUT ANY WARRANTY; without even the implied warranty of
++dnl   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++dnl   General Public License for more details.
++dnl
++dnl   You should have received a copy of the GNU General Public License
++dnl   along with this program; if not, write to the Free Software Foundation,
++dnl   Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA
++dnl
++
++dnl Are we trying to meet LSPP requirements
++AC_ARG_ENABLE(lspp, [  --enable-lspp           turn on auditing and label support, default=no])
++
++if test x"$enable_lspp" != xno; then
++    case "$uname" in
++        Linux)
++            AC_CHECK_LIB(audit,audit_log_user_message, [LIBAUDIT="-laudit" AC_SUBST(LIBAUDIT)])
++            AC_CHECK_HEADER(libaudit.h)
++            AC_CHECK_LIB(selinux,getpeercon, [LIBSELINUX="-lselinux" AC_SUBST(LIBSELINUX)])
++            AC_CHECK_HEADER(selinux/selinux.h)
++            AC_DEFINE(WITH_LSPP)
++            ;;
++        *)
++            # All others
++            ;;
++    esac
++fi
+diff -up cups-1.3.8/configure.in.lspp cups-1.3.8/configure.in
+--- cups-1.3.8/configure.in.lspp	2007-07-25 00:47:12.000000000 +0100
++++ cups-1.3.8/configure.in	2008-07-28 16:37:51.000000000 +0100
+@@ -42,6 +42,8 @@ sinclude(config-scripts/cups-pap.m4)
+ sinclude(config-scripts/cups-pdf.m4)
+ sinclude(config-scripts/cups-scripting.m4)
+ 
++sinclude(config-scripts/cups-lspp.m4)
++
+ INSTALL_LANGUAGES=""
+ UNINSTALL_LANGUAGES=""
+ LANGFILES=""
+diff -up cups-1.3.8/configure.lspp cups-1.3.8/configure
+--- cups-1.3.8/configure.lspp	2008-07-28 16:37:51.000000000 +0100
++++ cups-1.3.8/configure	2008-07-28 16:37:51.000000000 +0100
+@@ -806,6 +806,8 @@ PHP
+ PHPCONFIG
+ PHPDIR
+ PYTHON
++LIBAUDIT
++LIBSELINUX
+ INSTALL_LANGUAGES
+ UNINSTALL_LANGUAGES
+ LIBOBJS
+@@ -1429,6 +1431,7 @@ Optional Features:
+                           enable UseNetworkDefault by default, default=auto
+   --enable-raw-printing   enable raw printing by default, default=auto
+   --enable-pdftops        build pdftops filter, default=auto
++  --enable-lspp           turn on auditing and label support, default=no
+ 
+ Optional Packages:
+   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+@@ -9680,10 +9683,10 @@ case "$uname" in
+ 		;;
+ 	Linux* | GNU*)
+ 		# Linux and GNU Hurd
+-		MAN1EXT=1.gz
+-		MAN5EXT=5.gz
+-		MAN7EXT=7.gz
+-		MAN8EXT=8.gz
++		MAN1EXT=1
++		MAN5EXT=5
++		MAN7EXT=7
++		MAN8EXT=8
+ 		MAN8DIR=8
+ 		;;
+ 	*)
+@@ -18452,6 +18455,412 @@ fi
+ 
+ 
+ 
++
++# Check whether --enable-lspp was given.
++if test "${enable_lspp+set}" = set; then
++  enableval=$enable_lspp;
++fi
++
++
++if test x"$enable_lspp" != xno; then
++    case "$uname" in
++        Linux)
++            { echo "$as_me:$LINENO: checking for audit_log_user_message in -laudit" >&5
++echo $ECHO_N "checking for audit_log_user_message in -laudit... $ECHO_C" >&6; }
++if test "${ac_cv_lib_audit_audit_log_user_message+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-laudit  $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h.  */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char audit_log_user_message ();
++int
++main ()
++{
++return audit_log_user_message ();
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++  (eval "$ac_link") 2>conftest.er1
++  ac_status=$?
++  grep -v '^ *+' conftest.er1 >conftest.err
++  rm -f conftest.er1
++  cat conftest.err >&5
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); } && {
++	 test -z "$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       } && test -s conftest$ac_exeext &&
++       $as_test_x conftest$ac_exeext; then
++  ac_cv_lib_audit_audit_log_user_message=yes
++else
++  echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++	ac_cv_lib_audit_audit_log_user_message=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++      conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_audit_audit_log_user_message" >&5
++echo "${ECHO_T}$ac_cv_lib_audit_audit_log_user_message" >&6; }
++if test $ac_cv_lib_audit_audit_log_user_message = yes; then
++  LIBAUDIT="-laudit"
++fi
++
++            if test "${ac_cv_header_libaudit_h+set}" = set; then
++  { echo "$as_me:$LINENO: checking for libaudit.h" >&5
++echo $ECHO_N "checking for libaudit.h... $ECHO_C" >&6; }
++if test "${ac_cv_header_libaudit_h+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
[...4798 lines suppressed...]
++/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */
 +
-+  % Job information text...
-+  mediumFont setfont			% Medium sized font
+ /*
+  * Include necessary headers...
+  */
+@@ -73,6 +75,9 @@
+ #  include <dlfcn.h>
+ #endif /* __APPLE__ && HAVE_DLFCN_H */
+ 
++#ifdef WITH_LSPP
++#  include <libaudit.h>
++#endif /* WITH_LSPP */
+ 
+ /*
+  * Local functions...
+@@ -154,6 +159,9 @@ main(int  argc,				/* I - Number of comm
+   int			launchd_idle_exit;
+ 					/* Idle exit on select timeout? */
+ #endif	/* HAVE_LAUNCHD */
++#if WITH_LSPP
++  auditfail_t           failmode;       /* Action for audit_open failure */
++#endif /* WITH_LSPP */
+ 
+ 
+ #ifdef HAVE_GETEUID
+@@ -413,6 +421,25 @@ main(int  argc,				/* I - Number of comm
+ #endif /* DEBUG */
+   }
+ 
++#ifdef WITH_LSPP
++  if ((AuditLog = audit_open()) < 0 )
++  {
++    if (get_auditfail_action(&failmode) == 0)
++    {
++      if (failmode == FAIL_LOG)
++      {
++        cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to connect to audit subsystem.");
++        AuditLog = -1;
++      }
++      else if (failmode == FAIL_TERMINATE)
++      {
++        fprintf(stderr, "cupsd: unable to start auditing, terminating");
++        return -1;
++      }
++    }
++  }
++#endif /* WITH_LSPP */
 +
-+  pageWidth 36 mul			% x = pageWidth * 1/2 * 72
-+  pageHeight 36 mul			% y = pageHeight * 1/2 * 72
-+  pageHeight 5 mul add			% y += 2 lines
-+  2 copy				% Copy X & Y
-+  moveto
-+  (Job ID: ) RIGHT
-+  moveto
-+  ({printer-name}-{job-id}) show
+  /*
+   * Set the timezone info...
+   */
+@@ -1160,6 +1187,11 @@ main(int  argc,				/* I - Number of comm
+ 
+   cupsdStopSelect();
+ 
++#ifdef WITH_LSPP
++  if (AuditLog != -1)
++    audit_close(AuditLog);
++#endif /* WITH_LSPP */
 +
-+  pageWidth 36 mul			% x = pageWidth * 1/2 * 72
-+  pageHeight 36 mul			% y = pageHeight * 1/2 * 72
-+  pageHeight 2 mul add			% y += 1 line
-+  2 copy				% Copy X & Y
-+  moveto
-+  (Title: ) RIGHT
-+  moveto
-+  ({job-name}) show
+   return (!stop_scheduler);
+ }
+ 
+diff -up cups-1.3.8/scheduler/printers.c.lspp cups-1.3.8/scheduler/printers.c
+--- cups-1.3.8/scheduler/printers.c.lspp	2008-07-28 16:37:51.000000000 +0100
++++ cups-1.3.8/scheduler/printers.c	2008-07-28 16:37:51.000000000 +0100
+@@ -51,6 +51,8 @@
+  *                                 printing desktop tools.
+  */
+ 
++/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */
 +
-+  pageWidth 36 mul			% x = pageWidth * 1/2 * 72
-+  pageHeight 36 mul			% y = pageHeight * 1/2 * 72
-+  pageHeight -1 mul add			% y -= 1 line
-+  2 copy				% Copy X & Y
-+  moveto
-+  (Requesting User: ) RIGHT
-+  moveto
-+  ({job-originating-user-name}) show
+ /*
+  * Include necessary headers...
+  */
+@@ -74,6 +76,10 @@ static void	write_irix_config(cupsd_prin
+ static void	write_irix_state(cupsd_printer_t *p);
+ #endif /* __sgi */
+ 
++#ifdef WITH_LSPP
++#  include <libaudit.h>
++#  include <selinux/context.h>
++#endif /* WITH_LSPP */
+ 
+ /*
+  * 'cupsdAddPrinter()' - Add a printer to the system.
+@@ -1846,6 +1852,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+ 		{			/* No authentication */
+ 		  "none"
+ 		};
++#ifdef WITH_LSPP
++  char		*audit_message;		/* Audit message string */
++  char		*printerfile;		/* Path to a local printer dev */
++  char		*rangestr;		/* Printer's range if its available */
++  security_context_t	devcon;		/* Printer SELinux context */
++  context_t	printercon;		/* context_t for the printer */
++#endif /* WITH_LSPP */
+ 
+ 
+   DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
+@@ -1989,6 +2002,44 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+       attr->values[1].string.text = _cupsStrAlloc(Classification ?
+ 	                                   Classification : p->job_sheets[1]);
+     }
++#ifdef WITH_LSPP
++    if (AuditLog != -1)
++    {
++      char uri[HTTP_MAX_URI];
++      audit_message = NULL;
++      rangestr = NULL;
++      printercon = 0;
++      printerfile = strstr(p->device_uri, "/dev/");
++      if (printerfile == NULL && (strncmp(p->device_uri, "file:/", 6) == 0))
++        printerfile = strdup(p->device_uri + strlen("file:/"));
 +
-+  pageWidth 36 mul			% x = pageWidth * 1/2 * 72
-+  pageHeight 36 mul			% y = pageHeight * 1/2 * 72
-+  pageHeight -4 mul add			% y -= 2 lines
-+  2 copy				% Copy X & Y
-+  moveto
-+  (Billing Info: ) RIGHT
-+  moveto
-+  ({?job-billing}) show
++      if (printerfile != NULL)
++      {
++        if (getfilecon(printerfile, &devcon) == -1)
++          cupsdLogMessage(CUPSD_LOG_ERROR, "cupsdSetPrinterAttrs: Unable to get printer context");
++        else
++        {
++          printercon = context_new(devcon);
++          freecon(devcon);
++        }
++      }
 +
-+  % Then the CUPS logo....
-+  gsave
-+    pageWidth 4 mul
-+    pageWidth 6 mul
-+    translate
-+    pageWidth 9 mul CUPSLOGO
-+  grestore
++      if (printercon && context_range_get(printercon))
++        rangestr = strdup(context_range_get(printercon));
++      else
++        rangestr = strdup("unknown");
 +
-+  % And the ESP logo....
-+  gsave
-+    pageWidth 59 mul
-+    pageWidth 6 mul
-+    translate
-+    pageWidth 6 mul ESPLOGO
-+  grestore
-+% Show the page...
-+grestore
-+showpage
-+%
-+% End of "$Id$".
-+%
-+%%EOF
++      cupsdSanitizeURI(p->device_uri, uri, sizeof(uri));
++      cupsdSetStringf(&audit_message, "printer=%s uri=%s banners=%s,%s range=%s",
++                      p->name, uri, p->job_sheets[0], p->job_sheets[1], rangestr);
++      audit_log_user_message(AuditLog, AUDIT_LABEL_LEVEL_CHANGE, audit_message,
++                             ServerName, NULL, NULL, 1);
++      if (printercon)
++        context_free(printercon);
++      free(rangestr);
++      cupsdClearString(&audit_message);
++    }
++#endif /* WITH_LSPP */
+   }
+ 
+   p->raw    = 0;


Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/cups.spec,v
retrieving revision 1.418
retrieving revision 1.419
diff -u -r1.418 -r1.419
--- cups.spec	1 Jul 2008 11:37:34 -0000	1.418
+++ cups.spec	3 Aug 2008 13:48:28 -0000	1.419
@@ -6,8 +6,8 @@
 
 Summary: Common Unix Printing System
 Name: cups
-Version: 1.3.7
-Release: 8%{?svn:.svn%{svn}}%{?dist}
+Version: 1.3.8
+Release: 1%{?svn:.svn%{svn}}%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}%{?svn:svn-r%{svn}}-source.tar.bz2
@@ -25,31 +25,29 @@
 Source13: pdftops.conf
 Source14: textonly.filter
 Source15: textonly.ppd
-Patch2: cups-no-gzip-man.patch
-Patch3: cups-1.1.16-system-auth.patch
-Patch4: cups-multilib.patch
-Patch5: cups-ext.patch
-Patch6: cups-includeifexists.patch
-Patch7: cups-banners.patch
-Patch8: cups-serverbin-compat.patch
-Patch10: cups-no-export-ssllibs.patch
-Patch11: cups-paps.patch
-Patch12: cups-wbuffer.patch
-Patch13: cups-direct-usb.patch
-Patch14: cups-lpr-help.patch
-Patch15: cups-peercred.patch
-Patch16: cups-pid.patch
-Patch17: cups-foomatic-recommended.patch
-Patch18: cups-str2750.patch
-Patch19: cups-eggcups.patch
-Patch20: cups-getpass.patch
-Patch21: cups-driverd-timeout.patch
-Patch22: cups-strict-ppd-line-length.patch
-Patch23: cups-logrotate.patch
-Patch25: cups-usb-paperout.patch
-Patch29: cups-CVE-2008-1373.patch
-Patch30: cups-CVE-2008-1722.patch
-Patch31: cups-getnameddest.patch
+Patch1: cups-no-gzip-man.patch
+Patch2: cups-1.1.16-system-auth.patch
+Patch3: cups-multilib.patch
+Patch4: cups-ext.patch
+Patch5: cups-includeifexists.patch
+Patch6: cups-banners.patch
+Patch7: cups-serverbin-compat.patch
+Patch8: cups-no-export-ssllibs.patch
+Patch9: cups-paps.patch
+Patch10: cups-wbuffer.patch
+Patch11: cups-direct-usb.patch
+Patch12: cups-lpr-help.patch
+Patch13: cups-peercred.patch
+Patch14: cups-pid.patch
+Patch15: cups-foomatic-recommended.patch
+Patch16: cups-eggcups.patch
+Patch17: cups-getpass.patch
+Patch18: cups-driverd-timeout.patch
+Patch19: cups-strict-ppd-line-length.patch
+Patch20: cups-logrotate.patch
+Patch21: cups-usb-paperout.patch
+Patch22: cups-getnameddest.patch
+Patch23: cups-str2892.patch
 Patch100: cups-lspp.patch
 Epoch: 1
 Url: http://www.cups.org/
@@ -81,7 +79,6 @@
 BuildRequires: libtiff-devel
 BuildRequires: krb5-devel
 BuildRequires: avahi-compat-libdns_sd-devel
-BuildRequires: autoconf
 
 %if %lspp
 BuildPrereq: libselinux-devel >= 1.23
@@ -107,6 +104,7 @@
 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
 Requires: gnutls-devel
 Requires: krb5-devel
+Requires: zlib-devel
 
 %package libs
 Summary: Common Unix Printing System - libraries
@@ -145,38 +143,35 @@
 
 %prep
 %setup -q -n %{name}-%{version}%{?svn:svn-r%{svn}}
-%patch2 -p1 -b .no-gzip-man
-%patch3 -p1 -b .system-auth
-%patch4 -p1 -b .multilib
-%patch5 -p1 -b .ext
-%patch6 -p1 -b .includeifexists
-%patch7 -p1 -b .banners
-%patch8 -p1 -b .serverbin-compat
-%patch10 -p1 -b .no-export-ssllibs
-%patch11 -p1 -b .paps
-%patch12 -p1 -b .wbuffer
-%patch13 -p1 -b .direct-usb
-%patch14 -p1 -b .lpr-help
-%patch15 -p1 -b .peercred
-%patch16 -p1 -b .pid
-%patch17 -p1 -b .foomatic-recommended
-%patch18 -p1 -b .str2750
-%patch19 -p1 -b .eggcups
-%patch20 -p1 -b .getpass
-%patch21 -p1 -b .driverd-timeout
-%patch22 -p1 -b .strict-ppd-line-length
-%patch23 -p1 -b .logrotate
-%patch25 -p1 -b .usb-paperout
-%patch29 -p1 -b .CVE-2008-1373
-%patch30 -p1 -b .CVE-2008-1722
-%patch31 -p1 -b .getnameddest
+%patch1 -p1 -b .no-gzip-man
+%patch2 -p1 -b .system-auth
+%patch3 -p1 -b .multilib
+%patch4 -p1 -b .ext
+%patch5 -p1 -b .includeifexists
+%patch6 -p1 -b .banners
+%patch7 -p1 -b .serverbin-compat
+%patch8 -p1 -b .no-export-ssllibs
+%patch9 -p1 -b .paps
+%patch10 -p1 -b .wbuffer
+%patch11 -p1 -b .direct-usb
+%patch12 -p1 -b .lpr-help
+%patch13 -p1 -b .peercred
+%patch14 -p1 -b .pid
+%patch15 -p1 -b .foomatic-recommended
+%patch16 -p1 -b .eggcups
+%patch17 -p1 -b .getpass
+%patch18 -p1 -b .driverd-timeout
+%patch19 -p1 -b .strict-ppd-line-length
+%patch20 -p1 -b .logrotate
+%patch21 -p1 -b .usb-paperout
+%patch22 -p1 -b .getnameddest
+%patch23 -p1 -b .str2892
 
 %if %lspp
 %patch100 -p1 -b .lspp
 %endif
 
 sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in
-autoconf
 
 cp %{SOURCE5} cups-lpd.real
 perl -pi -e "s,\@LIBDIR\@,%{_libdir},g" cups-lpd.real
@@ -365,25 +360,26 @@
 %config(noreplace) /etc/pam.d/cups
 %config(noreplace) %{_sysconfdir}/logrotate.d/cups
 %dir %{_datadir}/%{name}/www
-%{_datadir}/%{name}/www/favicon.*
-%{_datadir}/%{name}/www/images
+%config(noreplace) %{_datadir}/%{name}/www/favicon.*
+%config(noreplace) %{_datadir}/%{name}/www/images
 %if %{?svn:1}%{!?svn:0}
 %else
-%{_datadir}/%{name}/www/de
-%{_datadir}/%{name}/www/es
-%{_datadir}/%{name}/www/et
-%{_datadir}/%{name}/www/fr
-%{_datadir}/%{name}/www/he
-%{_datadir}/%{name}/www/it
-%{_datadir}/%{name}/www/ja
-%{_datadir}/%{name}/www/pl
-%{_datadir}/%{name}/www/sv
-%{_datadir}/%{name}/www/zh_TW
+%config(noreplace) %{_datadir}/%{name}/www/de
+%config(noreplace) %{_datadir}/%{name}/www/es
+%config(noreplace) %{_datadir}/%{name}/www/et
+%config(noreplace) %{_datadir}/%{name}/www/fr
+%config(noreplace) %{_datadir}/%{name}/www/he
+%config(noreplace) %{_datadir}/%{name}/www/id
+%config(noreplace) %{_datadir}/%{name}/www/it
+%config(noreplace) %{_datadir}/%{name}/www/ja
+%config(noreplace) %{_datadir}/%{name}/www/pl
+%config(noreplace) %{_datadir}/%{name}/www/sv
+%config(noreplace) %{_datadir}/%{name}/www/zh_TW
 %endif
-%{_datadir}/%{name}/www/*.css
-%doc %{_datadir}/%{name}/www/index.html
-%doc %{_datadir}/%{name}/www/help
-%doc %{_datadir}/%{name}/www/robots.txt
+%config(noreplace) %{_datadir}/%{name}/www/*.css
+%config(noreplace) %doc %{_datadir}/%{name}/www/index.html
+%config(noreplace) %doc %{_datadir}/%{name}/www/help
+%config(noreplace) %doc %{_datadir}/%{name}/www/robots.txt
 %config(noreplace) %{initdir}/cups
 %{_bindir}/cupstestppd
 %{_bindir}/cupstestdsc
@@ -439,6 +435,16 @@
 %{cups_serverbin}/daemon/cups-lpd
 
 %changelog
+* Sun Aug  3 2008 Tim Waugh <twaugh at redhat.com> 1:1.3.8-1
+- 1.3.8.
+- Applied patch to fix STR #2892 (bug #453610).
+- Removed autoconf requirement by applying autoconf-generated changes
+  to patches that caused them.  Affected patches: cups-lspp.
+- CVE-2008-1373 patch is no longer needed (applied upstream).
+- Mark HTML files and templates config(noreplace) for site-local
+  modifications (bug #441719).
+- The cups-devel package requires zlib-devel (bug #455192).
+
 * Tue Jul  1 2008 Tim Waugh <twaugh at redhat.com> 1:1.3.7-8
 - Fixed bug #447200 again.
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/sources,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- sources	2 Apr 2008 11:52:07 -0000	1.43
+++ sources	3 Aug 2008 13:48:28 -0000	1.44
@@ -1,2 +1,2 @@
 b0bb017098e8e76b8a25e666c41ce540  postscript.ppd.gz
-db4a45a17104f10f3ee599d88267c9e5  cups-1.3.7-source.tar.bz2
+84e09577d673b212f605dd09caee456c  cups-1.3.8-source.tar.bz2


--- cups-CVE-2008-1373.patch DELETED ---


--- cups-CVE-2008-1722.patch DELETED ---




More information about the fedora-extras-commits mailing list