- 1.3b1. No longer need relro, directed-broadcast, af_unix-auth, or str2109
patches.
This commit is contained in:
parent
f55d748d4d
commit
4f25cbd963
@ -22,3 +22,4 @@ cups-1.2.9-source.tar.bz2
|
||||
cups-1.2.10-source.tar.bz2
|
||||
cups-1.2.11-source.tar.bz2
|
||||
cups-1.2.12-source.tar.bz2
|
||||
cups-1.3b1-source.tar.bz2
|
||||
|
@ -1,191 +0,0 @@
|
||||
--- cups-1.2.10/cups/auth.c.af_unix-auth 2007-01-10 16:48:37.000000000 +0000
|
||||
+++ cups-1.2.10/cups/auth.c 2007-03-29 16:59:51.000000000 +0100
|
||||
@@ -26,6 +26,8 @@
|
||||
* Contents:
|
||||
*
|
||||
* cupsDoAuthentication() - Authenticate a request.
|
||||
+ * cups_peercred_auth() - Find out if SO_PEERCRED authentication
|
||||
+ * is possible
|
||||
* cups_local_auth() - Get the local authorization certificate if
|
||||
* available/applicable...
|
||||
*/
|
||||
@@ -40,7 +42,9 @@
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#include <pwd.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/types.h>
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
# include <io.h>
|
||||
#else
|
||||
@@ -177,6 +181,76 @@
|
||||
return (0);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * 'cups_peercred_auth()'
|
||||
+ * - UNIX Domain Sockets authentication
|
||||
+ */
|
||||
+
|
||||
+static int /* O - 0 if available, -1 if not */
|
||||
+cups_peercred_auth(http_t *http) /* I - HTTP connection to server */
|
||||
+{
|
||||
+#ifdef SO_PEERCRED
|
||||
+ long buflen;
|
||||
+ char *buf, *newbuf;
|
||||
+ struct passwd pwbuf, *pwbufptr;
|
||||
+ int r;
|
||||
+
|
||||
+ if (http->hostaddr->addr.sa_family != AF_LOCAL)
|
||||
+ return (-1);
|
||||
+
|
||||
+ /*
|
||||
+ * Are we trying to authenticate as ourselves? If not, SO_PEERCRED
|
||||
+ * is no use.
|
||||
+ */
|
||||
+ buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
|
||||
+ buf = NULL;
|
||||
+ do
|
||||
+ {
|
||||
+ newbuf = realloc (buf, buflen);
|
||||
+ if (newbuf == NULL)
|
||||
+ {
|
||||
+ free (buf);
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ buf = newbuf;
|
||||
+ r = getpwnam_r (cupsUser(), &pwbuf, buf, buflen, &pwbufptr);
|
||||
+ if (r != 0)
|
||||
+ {
|
||||
+ if (r == ERANGE)
|
||||
+ {
|
||||
+ buflen *= 2;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ free (buf);
|
||||
+ return (-1);
|
||||
+ }
|
||||
+ }
|
||||
+ while (r != 0);
|
||||
+
|
||||
+ if (pwbuf.pw_uid != getuid())
|
||||
+ {
|
||||
+ free (buf);
|
||||
+ return (-1);
|
||||
+ }
|
||||
+
|
||||
+ free (buf);
|
||||
+
|
||||
+ /*
|
||||
+ * Set the authorization string and return...
|
||||
+ */
|
||||
+
|
||||
+ snprintf(http->authstring, sizeof(http->authstring), "SO_PEERCRED");
|
||||
+
|
||||
+ DEBUG_printf(("cups_peercred_auth: Returning authstring = \"%s\"\n",
|
||||
+ http->authstring));
|
||||
+
|
||||
+ return (0);
|
||||
+#else
|
||||
+ return (-1);
|
||||
+#endif /* SO_PEERCRED */
|
||||
+}
|
||||
|
||||
/*
|
||||
* 'cups_local_auth()' - Get the local authorization certificate if
|
||||
@@ -234,7 +308,7 @@
|
||||
{
|
||||
DEBUG_printf(("cups_local_auth: Unable to open file %s: %s\n",
|
||||
filename, strerror(errno)));
|
||||
- return (-1);
|
||||
+ return cups_peercred_auth(http);
|
||||
}
|
||||
|
||||
/*
|
||||
--- cups-1.2.10/scheduler/auth.c.af_unix-auth 2006-09-12 14:58:39.000000000 +0100
|
||||
+++ cups-1.2.10/scheduler/auth.c 2007-03-29 17:03:53.000000000 +0100
|
||||
@@ -60,6 +60,9 @@
|
||||
|
||||
#include "cupsd.h"
|
||||
#include <grp.h>
|
||||
+#include <pwd.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <sys/types.h>
|
||||
#ifdef HAVE_SHADOW_H
|
||||
# include <shadow.h>
|
||||
#endif /* HAVE_SHADOW_H */
|
||||
@@ -79,6 +82,9 @@
|
||||
#ifdef HAVE_MEMBERSHIP_H
|
||||
# include <membership.h>
|
||||
#endif /* HAVE_MEMBERSHIP_H */
|
||||
+#if !defined(WIN32) && !defined(__EMX__)
|
||||
+# include <unistd.h>
|
||||
+#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -384,6 +390,61 @@
|
||||
"cupsdAuthorize: No authentication data provided.");
|
||||
return;
|
||||
}
|
||||
+#ifdef SO_PEERCRED
|
||||
+ else if (!strncmp(authorization, "SO_PEERCRED", 3) &&
|
||||
+ con->http.hostaddr->addr.sa_family == AF_LOCAL)
|
||||
+ {
|
||||
+ long buflen;
|
||||
+ char *buf, *newbuf;
|
||||
+ struct passwd pwbuf, *pwbufptr;
|
||||
+ struct ucred u;
|
||||
+ socklen_t ulen = sizeof(u);
|
||||
+ int r;
|
||||
+
|
||||
+ if (getsockopt(con->http.fd, SOL_SOCKET, SO_PEERCRED, &u, &ulen) == -1)
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
+ "cupsdAuthorize: getsockopt failed for SO_PEERCRED");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
|
||||
+ buf = NULL;
|
||||
+ do
|
||||
+ {
|
||||
+ newbuf = realloc (buf, buflen);
|
||||
+ if (newbuf == NULL)
|
||||
+ {
|
||||
+ free (buf);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ buf = newbuf;
|
||||
+
|
||||
+ /* Look up which username the UID is for. */
|
||||
+ r = getpwuid_r (u.uid, &pwbuf, buf, buflen, &pwbufptr);
|
||||
+ if (r != 0)
|
||||
+ {
|
||||
+ if (r == ERANGE)
|
||||
+ {
|
||||
+ buflen *= 2;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
+ "cupsdAuthorize: getpwuid_r failed after SO_PEERCRED");
|
||||
+ free (buf);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ while (r != 0);
|
||||
+
|
||||
+ strlcpy(username, pwbuf.pw_name, sizeof(username));
|
||||
+ free (buf);
|
||||
+ cupsdLogMessage(CUPSD_LOG_DEBUG2,
|
||||
+ "cupsdAuthorize: using SO_PEERCRED (uid=%d)", u.uid);
|
||||
+ }
|
||||
+#endif /* SO_PEERCRED */
|
||||
else if (!strncmp(authorization, "Local", 5) &&
|
||||
!strcasecmp(con->http.hostname, "localhost"))
|
||||
{
|
@ -1,25 +0,0 @@
|
||||
--- cups-1.2.12/conf/cupsd.conf.in.directed-broadcast 2006-04-23 22:46:38.000000000 +0100
|
||||
+++ cups-1.2.12/conf/cupsd.conf.in 2007-07-13 10:02:06.000000000 +0100
|
||||
@@ -20,6 +20,7 @@
|
||||
# Show shared printers on the local network.
|
||||
Browsing On
|
||||
BrowseOrder allow,deny
|
||||
+# (Change '@LOCAL' to 'ALL' if using directed broadcasts from another subnet.)
|
||||
BrowseAllow @LOCAL
|
||||
|
||||
# Default authentication type, when authentication is required...
|
||||
--- cups-1.2.12/cups/adminutil.c.directed-broadcast 2007-07-06 23:39:54.000000000 +0100
|
||||
+++ cups-1.2.12/cups/adminutil.c 2007-07-13 10:03:15.000000000 +0100
|
||||
@@ -1288,7 +1288,12 @@
|
||||
cupsFilePuts(temp, "BrowseOrder allow,deny\n");
|
||||
|
||||
if (new_remote_printers)
|
||||
+ {
|
||||
+ cupsFilePuts(temp,
|
||||
+ "# (Change '@LOCAL' to 'ALL' if using "
|
||||
+ "directed broadcasts from another subnet.)\n");
|
||||
cupsFilePuts(temp, "BrowseAllow @LOCAL\n");
|
||||
+ }
|
||||
|
||||
if (new_share_printers)
|
||||
cupsFilePuts(temp, "BrowseAddress @LOCAL\n");
|
@ -1,8 +1,8 @@
|
||||
--- cups-1.2.11/backend/ipp.c.eggcups 2007-04-30 18:18:21.000000000 +0100
|
||||
+++ cups-1.2.11/backend/ipp.c 2007-06-13 16:47:06.000000000 +0100
|
||||
@@ -54,6 +54,70 @@
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
--- cups-1.3b1/backend/ipp.c.eggcups 2007-07-11 22:46:42.000000000 +0100
|
||||
+++ cups-1.3b1/backend/ipp.c 2007-07-18 11:34:16.000000000 +0100
|
||||
@@ -57,6 +57,70 @@
|
||||
static char tmpfilename[1024] = ""; /* Temporary spool file name */
|
||||
static int job_cancelled = 0; /* Job cancelled? */
|
||||
|
||||
+#if HAVE_DBUS
|
||||
+#include <dbus/dbus.h>
|
||||
@ -70,9 +70,9 @@
|
||||
+#endif /* HAVE_DBUS */
|
||||
|
||||
/*
|
||||
* Globals...
|
||||
@@ -955,6 +1019,15 @@
|
||||
fprintf(stderr, "NOTICE: Print file accepted - job ID %d.\n", job_id);
|
||||
* Local functions...
|
||||
@@ -974,6 +1038,15 @@
|
||||
fprintf(stderr, _("NOTICE: Print file accepted - job ID %d.\n"), job_id);
|
||||
}
|
||||
|
||||
+#if HAVE_DBUS
|
||||
@ -87,48 +87,20 @@
|
||||
ippDelete(response);
|
||||
|
||||
if (job_cancelled)
|
||||
--- cups-1.2.11/backend/Makefile.eggcups 2006-10-23 01:26:52.000000000 +0100
|
||||
+++ cups-1.2.11/backend/Makefile 2007-06-13 16:47:06.000000000 +0100
|
||||
@@ -134,7 +134,7 @@
|
||||
--- cups-1.3b1/backend/Makefile.eggcups 2007-07-11 22:46:42.000000000 +0100
|
||||
+++ cups-1.3b1/backend/Makefile 2007-07-18 11:36:35.000000000 +0100
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
ipp: ipp.o ../cups/$(LIBCUPS)
|
||||
echo Linking $@...
|
||||
- $(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS)
|
||||
+ $(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS) $(DBUSLIBS)
|
||||
+ $(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS) $(CUPSDLIBS)
|
||||
$(RM) http
|
||||
$(LN) ipp http
|
||||
|
||||
--- cups-1.2.11/config-scripts/cups-common.m4.eggcups 2007-05-08 22:11:23.000000000 +0100
|
||||
+++ cups-1.2.11/config-scripts/cups-common.m4 2007-06-13 16:47:06.000000000 +0100
|
||||
@@ -188,6 +188,7 @@
|
||||
dnl Extra platform-specific libraries...
|
||||
BACKLIBS=""
|
||||
CUPSDLIBS=""
|
||||
+DBUSLIBS=""
|
||||
DBUSDIR=""
|
||||
|
||||
AC_ARG_ENABLE(dbus, [ --enable-dbus enable DBUS support, default=auto])
|
||||
@@ -231,7 +232,8 @@
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_DBUS)
|
||||
CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
|
||||
- CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
|
||||
+ DBUSLIBS="`$PKGCONFIG --libs dbus-1`"
|
||||
+ CUPSDLIBS="$DBUSLIBS"
|
||||
DBUSDIR="/etc/dbus-1/system.d"
|
||||
AC_CHECK_LIB(dbus-1,
|
||||
dbus_message_iter_init_append,
|
||||
@@ -253,6 +255,7 @@
|
||||
|
||||
AC_SUBST(BACKLIBS)
|
||||
AC_SUBST(CUPSDLIBS)
|
||||
+AC_SUBST(DBUSLIBS)
|
||||
AC_SUBST(DBUSDIR)
|
||||
|
||||
dnl New default port definition for IPP...
|
||||
--- cups-1.2.11/scheduler/subscriptions.c.eggcups 2007-04-10 19:24:19.000000000 +0100
|
||||
+++ cups-1.2.11/scheduler/subscriptions.c 2007-06-13 16:48:10.000000000 +0100
|
||||
@@ -1321,13 +1321,13 @@
|
||||
--- cups-1.3b1/scheduler/subscriptions.c.eggcups 2007-07-11 22:46:42.000000000 +0100
|
||||
+++ cups-1.3b1/scheduler/subscriptions.c 2007-07-18 11:34:16.000000000 +0100
|
||||
@@ -1292,13 +1292,13 @@
|
||||
what = "PrinterAdded";
|
||||
else if (event & CUPSD_EVENT_PRINTER_DELETED)
|
||||
what = "PrinterRemoved";
|
||||
@ -144,7 +116,7 @@
|
||||
else
|
||||
return;
|
||||
|
||||
@@ -1363,7 +1363,7 @@
|
||||
@@ -1334,7 +1334,7 @@
|
||||
dbus_message_append_iter_init(message, &iter);
|
||||
if (dest)
|
||||
dbus_message_iter_append_string(&iter, dest->name);
|
||||
@ -153,13 +125,3 @@
|
||||
{
|
||||
dbus_message_iter_append_uint32(&iter, job->id);
|
||||
dbus_message_iter_append_string(&iter, job->username);
|
||||
--- cups-1.2.11/Makedefs.in.eggcups 2007-06-13 16:47:06.000000000 +0100
|
||||
+++ cups-1.2.11/Makedefs.in 2007-06-13 16:47:06.000000000 +0100
|
||||
@@ -124,6 +124,7 @@
|
||||
@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
|
||||
COMMONLIBS = @LIBS@
|
||||
CUPSDLIBS = @CUPSDLIBS@
|
||||
+DBUSLIBS = @DBUSLIBS@
|
||||
CXXFLAGS = -I.. $(SSLFLAGS) @CPPFLAGS@ @CXXFLAGS@ \
|
||||
@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
|
||||
CXXLIBS = @CXXLIBS@
|
||||
|
4754
cups-lspp.patch
4754
cups-lspp.patch
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,11 @@
|
||||
--- cups-1.2.1/conf/mime.convs.paps 2006-04-14 20:21:03.000000000 +0100
|
||||
+++ cups-1.2.1/conf/mime.convs 2006-06-29 15:12:57.000000000 +0100
|
||||
@@ -50,8 +50,8 @@
|
||||
--- cups-1.3b1/conf/mime.convs.in.paps 2007-07-18 11:31:28.000000000 +0100
|
||||
+++ cups-1.3b1/conf/mime.convs.in 2007-07-18 11:31:47.000000000 +0100
|
||||
@@ -45,7 +45,7 @@
|
||||
application/x-csource application/postscript 33 texttops
|
||||
application/x-perl application/postscript 33 texttops
|
||||
application/x-shell application/postscript 33 texttops
|
||||
-text/plain application/postscript 33 texttops
|
||||
-text/html application/postscript 33 texttops
|
||||
+text/plain application/postscript 33 texttopaps
|
||||
+text/html application/postscript 33 texttopaps
|
||||
text/html application/postscript 33 texttops
|
||||
image/gif application/vnd.cups-postscript 66 imagetops
|
||||
image/png application/vnd.cups-postscript 66 imagetops
|
||||
image/jpeg application/vnd.cups-postscript 66 imagetops
|
||||
|
@ -1,36 +0,0 @@
|
||||
--- cups-1.2.1/Makedefs.in.relro 2006-07-04 17:52:05.000000000 +0100
|
||||
+++ cups-1.2.1/Makedefs.in 2006-07-04 17:52:54.000000000 +0100
|
||||
@@ -132,7 +132,7 @@
|
||||
IMGLIBS = @IMGLIBS@
|
||||
IMGFILTERS = @IMGFILTERS@
|
||||
LDFLAGS = -L../cups -L../filter $(ARCHFLAGS) \
|
||||
- @LDFLAGS@ @PIEFLAGS@ $(OPTIM)
|
||||
+ @LDFLAGS@ @RELROFLAG@ @PIEFLAGS@ $(OPTIM)
|
||||
LINKCUPS = @LINKCUPS@ $(SSLLIBS)
|
||||
LINKCUPSIMAGE = @LINKCUPSIMAGE@
|
||||
LIBS = $(LINKCUPS) $(COMMONLIBS)
|
||||
--- cups-1.2.1/config-scripts/cups-compiler.m4.relro 2006-07-04 17:52:05.000000000 +0100
|
||||
+++ cups-1.2.1/config-scripts/cups-compiler.m4 2006-07-04 17:52:05.000000000 +0100
|
||||
@@ -89,6 +89,9 @@
|
||||
CXXLIBS=""
|
||||
AC_SUBST(CXXLIBS)
|
||||
|
||||
+RELROFLAG=""
|
||||
+AC_SUBST(RELROFLAG)
|
||||
+
|
||||
PIEFLAGS=""
|
||||
AC_SUBST(PIEFLAGS)
|
||||
|
||||
@@ -108,6 +111,12 @@
|
||||
|
||||
case $uname in
|
||||
Linux*)
|
||||
+ RELROFLAG="-Wl,-z,relro"
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
+ case $uname in
|
||||
+ Linux*)
|
||||
if test x$enable_pie = xyes; then
|
||||
PIEFLAGS="-pie -fPIE"
|
||||
fi
|
@ -6,7 +6,7 @@
|
||||
|
||||
+#ifdef __x86_64__
|
||||
+ snprintf(srcfile, sizeof(srcfile), "%s/backend/%s", ServerBin_compat,
|
||||
+ method);
|
||||
+ scheme);
|
||||
+ if (access(srcfile, X_OK))
|
||||
+ {
|
||||
+#endif /* __x86_64__ */
|
||||
|
@ -1,55 +0,0 @@
|
||||
--- cups-1.2.10/backend/ipp.c.str2109 2007-04-03 11:05:13.000000000 +0100
|
||||
+++ cups-1.2.10/backend/ipp.c 2007-04-03 11:05:33.000000000 +0100
|
||||
@@ -210,6 +210,7 @@
|
||||
"document-format-supported",
|
||||
"printer-is-accepting-jobs",
|
||||
"printer-state",
|
||||
+ "printer-state-message",
|
||||
"printer-state-reasons",
|
||||
};
|
||||
static const char * const jattrs[] =
|
||||
@@ -1285,6 +1286,11 @@
|
||||
{
|
||||
ipp_t *request, /* IPP request */
|
||||
*response; /* IPP response */
|
||||
+ static const char * const attrs[] = /* Attributes we want */
|
||||
+ {
|
||||
+ "printer-state-message",
|
||||
+ "printer-state-reasons"
|
||||
+ };
|
||||
|
||||
|
||||
/*
|
||||
@@ -1301,8 +1307,9 @@
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
|
||||
"requesting-user-name", NULL, user);
|
||||
|
||||
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
- "requested-attributes", NULL, "printer-state-reasons");
|
||||
+ ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
|
||||
+ "requested-attributes",
|
||||
+ (int)(sizeof(attrs) / sizeof(attrs[0])), NULL, attrs);
|
||||
|
||||
/*
|
||||
* Do the request...
|
||||
@@ -1430,7 +1437,8 @@
|
||||
{
|
||||
int i; /* Looping var */
|
||||
int count; /* Count of reasons shown... */
|
||||
- ipp_attribute_t *reasons; /* printer-state-reasons */
|
||||
+ ipp_attribute_t *psm, /* pritner-state-message */
|
||||
+ *reasons; /* printer-state-reasons */
|
||||
const char *reason; /* Current reason */
|
||||
const char *message; /* Message to show */
|
||||
char unknown[1024]; /* Unknown message string */
|
||||
@@ -1438,6 +1446,10 @@
|
||||
char state[1024]; /* State string */
|
||||
|
||||
|
||||
+ if ((psm = ippFindAttribute(ipp, "printer-state-message",
|
||||
+ IPP_TAG_TEXT)) != NULL)
|
||||
+ fprintf(stderr, "INFO: %s\n", psm->values[0].string.text);
|
||||
+
|
||||
if ((reasons = ippFindAttribute(ipp, "printer-state-reasons",
|
||||
IPP_TAG_KEYWORD)) == NULL)
|
||||
return (0);
|
@ -1,7 +1,7 @@
|
||||
--- cups-1.2.10/backend/runloop.c.usb-paperout 2006-12-06 20:10:16.000000000 +0000
|
||||
+++ cups-1.2.10/backend/runloop.c 2007-07-04 12:12:00.000000000 +0100
|
||||
@@ -40,6 +40,14 @@
|
||||
#endif /* __hpux */
|
||||
--- cups-1.3b1/backend/runloop.c.usb-paperout 2007-07-11 22:46:42.000000000 +0100
|
||||
+++ cups-1.3b1/backend/runloop.c 2007-07-18 11:40:45.000000000 +0100
|
||||
@@ -135,6 +135,14 @@
|
||||
}
|
||||
|
||||
|
||||
+#ifdef __linux
|
||||
@ -15,7 +15,7 @@
|
||||
/*
|
||||
* 'backendRunLoop()' - Read and write print and back-channel data.
|
||||
*/
|
||||
@@ -64,6 +72,9 @@
|
||||
@@ -161,6 +169,9 @@
|
||||
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
|
||||
struct sigaction action; /* Actions for POSIX signals */
|
||||
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
|
||||
@ -24,19 +24,19 @@
|
||||
+#endif /* __linux */
|
||||
|
||||
|
||||
fprintf(stderr, "DEBUG: backendRunLoop(print_fd=%d, device_fd=%d, use_bc=%d)\n",
|
||||
@@ -110,8 +121,6 @@
|
||||
fprintf(stderr,
|
||||
@@ -210,8 +221,6 @@
|
||||
FD_ZERO(&input);
|
||||
if (!print_bytes)
|
||||
FD_SET(print_fd, &input);
|
||||
- if (use_bc)
|
||||
- FD_SET(device_fd, &input);
|
||||
if (side_cb)
|
||||
FD_SET(CUPS_SC_FD, &input);
|
||||
|
||||
FD_ZERO(&output);
|
||||
if (print_bytes || !use_bc)
|
||||
@@ -119,7 +128,10 @@
|
||||
@@ -221,7 +230,10 @@
|
||||
|
||||
if (use_bc)
|
||||
if (use_bc || side_cb)
|
||||
{
|
||||
- if (select(nfds, &input, &output, NULL, NULL) < 0)
|
||||
+ struct timeval fives;
|
||||
@ -46,7 +46,7 @@
|
||||
{
|
||||
/*
|
||||
* Pause printing to clear any pending errors...
|
||||
@@ -141,14 +153,24 @@
|
||||
@@ -256,14 +268,24 @@
|
||||
* Check if we have back-channel data ready...
|
||||
*/
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,6 +241,10 @@
|
||||
@@ -334,6 +356,10 @@
|
||||
offline = 1;
|
||||
}
|
||||
}
|
||||
@ -87,8 +87,8 @@
|
||||
+ }
|
||||
else if (errno != EAGAIN && errno != EINTR && errno != ENOTTY)
|
||||
{
|
||||
perror("ERROR: Unable to write print data");
|
||||
@@ -227,6 +253,9 @@
|
||||
fprintf(stderr, _("ERROR: Unable to write print data: %s\n"),
|
||||
@@ -343,6 +369,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -98,7 +98,7 @@
|
||||
if (paperout)
|
||||
{
|
||||
fputs("STATE: -media-empty-error\n", stderr);
|
||||
@@ -247,7 +276,42 @@
|
||||
@@ -363,7 +392,42 @@
|
||||
total_bytes += bytes;
|
||||
}
|
||||
}
|
||||
@ -141,9 +141,9 @@
|
||||
|
||||
/*
|
||||
* Return with success...
|
||||
--- cups-1.2.10/backend/usb-unix.c.usb-paperout 2007-07-04 12:11:46.000000000 +0100
|
||||
+++ cups-1.2.10/backend/usb-unix.c 2007-07-04 12:11:46.000000000 +0100
|
||||
@@ -39,6 +39,11 @@
|
||||
--- cups-1.3b1/backend/usb-unix.c.usb-paperout 2007-07-18 11:39:32.000000000 +0100
|
||||
+++ cups-1.3b1/backend/usb-unix.c 2007-07-18 11:39:32.000000000 +0100
|
||||
@@ -31,6 +31,11 @@
|
||||
#include "ieee1284.c"
|
||||
#include <sys/select.h>
|
||||
|
||||
@ -155,7 +155,7 @@
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
@@ -70,6 +75,11 @@
|
||||
@@ -63,6 +68,11 @@
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
/*
|
||||
* Open the USB port device...
|
||||
*/
|
||||
@@ -150,6 +160,12 @@
|
||||
@@ -156,6 +166,12 @@
|
||||
|
||||
tcsetattr(device_fd, TCSANOW, &opts);
|
||||
|
||||
|
24
cups.spec
24
cups.spec
@ -2,14 +2,15 @@
|
||||
%define use_alternatives 1
|
||||
%define lspp 1
|
||||
%define cups_serverbin %{_exec_prefix}/lib/cups
|
||||
%define cups_beta b1
|
||||
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.2.12
|
||||
Release: 1%{?dist}
|
||||
Version: 1.3
|
||||
Release: 0.%{cups_beta}.1%{?dist}
|
||||
License: GPL
|
||||
Group: System Environment/Daemons
|
||||
Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
|
||||
Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}%{cups_beta}-source.tar.bz2
|
||||
Source1: cups.init
|
||||
Source2: cupsprinter.png
|
||||
Source4: pstopdf
|
||||
@ -38,13 +39,9 @@ Patch12: cups-wbuffer.patch
|
||||
Patch13: cups-direct-usb.patch
|
||||
Patch14: cups-lpr-help.patch
|
||||
Patch16: cups-pid.patch
|
||||
Patch17: cups-relro.patch
|
||||
Patch18: cups-directed-broadcast.patch
|
||||
Patch19: cups-eggcups.patch
|
||||
Patch20: cups-getpass.patch
|
||||
Patch21: cups-driverd-timeout.patch
|
||||
Patch22: cups-af_unix-auth.patch
|
||||
Patch24: cups-str2109.patch
|
||||
Patch25: cups-usb-paperout.patch
|
||||
Patch100: cups-lspp.patch
|
||||
Epoch: 1
|
||||
@ -130,7 +127,7 @@ UNIX® operating systems. This is the package that provices standard
|
||||
lpd emulation.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%setup -q -n %{name}-%{version}%{cups_beta}
|
||||
%patch1 -p1 -b .noinit
|
||||
%patch2 -p1 -b .no-gzip-man
|
||||
%patch3 -p1 -b .system-auth
|
||||
@ -146,13 +143,9 @@ lpd emulation.
|
||||
%patch13 -p1 -b .direct-usb
|
||||
%patch14 -p1 -b .lpr-help
|
||||
%patch16 -p1 -b .pid
|
||||
%patch17 -p1 -b .relro
|
||||
%patch18 -p1 -b .directed-broadcast
|
||||
%patch19 -p1 -b .eggcups
|
||||
%patch20 -p1 -b .getpass
|
||||
%patch21 -p1 -b .driverd-timeout
|
||||
%patch22 -p1 -b .af_unix-auth
|
||||
%patch24 -p1 -b .str2109
|
||||
%patch25 -p1 -b .usb-paperout
|
||||
|
||||
%if %lspp
|
||||
@ -176,7 +169,7 @@ export CFLAGS="-DLDAP_DEPRECATED=1"
|
||||
%if %lspp
|
||||
--enable-lspp \
|
||||
%endif
|
||||
--with-log-file-perm=0600 --enable-pie
|
||||
--with-log-file-perm=0600 --enable-pie --enable-relro
|
||||
|
||||
# If we got this far, all prerequisite libraries must be here.
|
||||
make
|
||||
@ -372,6 +365,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_docdir}/cups-%{version}/es
|
||||
%{_docdir}/cups-%{version}/et
|
||||
%{_docdir}/cups-%{version}/fr
|
||||
%{_docdir}/cups-%{version}/he
|
||||
%{_docdir}/cups-%{version}/it
|
||||
%{_docdir}/cups-%{version}/ja
|
||||
%{_docdir}/cups-%{version}/pl
|
||||
@ -441,6 +435,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{cups_serverbin}/daemon/cups-lpd
|
||||
|
||||
%changelog
|
||||
* Wed Jul 18 2007 Tim Waugh <twaugh@redhat.com> 1:1.3-0.b1.1
|
||||
- 1.3b1. No longer need relro, directed-broadcast, af_unix-auth, or
|
||||
str2109 patches.
|
||||
|
||||
* Fri Jul 13 2007 Tim Waugh <twaugh@redhat.com> 1:1.2.12-1
|
||||
- 1.2.12. No longer need adminutil or str2408 patches.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user