Druckprobleme Virtuell PDFs erzeugen seit letztem Sicherheitsupdate

Dirk Levy

Dirk Levy

Aktives Mitglied
Thread Starter
Dabei seit
03.02.2002
Beiträge
547
Reaktionspunkte
0
Hi,

wir sind gerade auf ein nachvollziehbares Problem seit dem
letzten Sicherheitsupdate gestossen. Das erzeugen von PDF-
Dateien über den virtuellen Printer funktioniert nicht mehr.

Cups crasht und meldet einen Fehler. Im Spooler werden die
Dateien sofort gestoppt und nicht weitergerippt.

Gibt es da schon einen Fix?

Gruß
Dirk
 
So richtig weiß ich nicht was Du meinst. PDFs aus dem Druckdialog erzeugen klappt bei mir ganz prima (10.4.1, alle Updates)
g
 
Viellleicht hat CUPS nach dem Sicherheitsupdate ein Zugriffsproblem bekommen (Rechte). Was ist denn die Fehlermeldung
 
Es liegt eindeutig an Cups - wir haben da schon recherchiert,
aber keinen Lösung des Problems gefunden.

Es scheitert bei pictwps
Das Problem haben sehr viele aus der Druckvorstufe, wir haben
so ein Script gefunden, wissen aber nicht was wir damit machen
sollen.....

Hier mal das Script:

*** ipp.c Tue Apr 8 22:15:19 2003
--- ipp.c.new Tue Apr 8 22:29:56 2003
***************
*** 44,49 ****
--- 44,50 ----
#include <cups/language.h>
#include <cups/string.h>
#include <signal.h>
+ #include <sys/wait.h>


/*
***************
*** 52,58 ****

const char *password_cb(const char *);
int report_printer_state(ipp_t *ipp);
!

/*
* Local globals...
--- 53,61 ----

const char *password_cb(const char *);
int report_printer_state(ipp_t *ipp);
! #if 1
! int run_pictwps_filter(char **argv, char *filename, int length);
! #endif

/*
* Local globals...
***************
*** 450,455 ****
--- 453,487 ----
else
content_type = "application/vnd.cups-raw";

+ #if 1
+ if (content_type != NULL && strcasecmp(content_type, "application/pictwps") == 0)
+ {
+ if (format_sup != NULL)
+ {
+ for (i = 0; i < format_sup->num_values; i ++)
+ if (strcasecmp(content_type, format_sup->values.string.text) == 0)
+ break;
+ }
+
+ if (format_sup == NULL || i >= format_sup->num_values)
+ {
+ /*
+ * Remote doesn't support "application/pictwps" (i.e. it's not MacOS X)
+ * so convert the document to PostScript...
+ */
+
+ if (run_pictwps_filter(argv, filename, sizeof(filename)))
+ return (1);
+
+ /*
+ * Change the MIME type to application/postscript...
+ */
+
+ content_type = "application/postscript";
+ }
+ }
+ #endif
+
if (content_type != NULL && format_sup != NULL)
{
for (i = 0; i < format_sup->num_values; i ++)
***************
*** 797,803 ****
--- 829,992 ----
return (count);
}

+ #if 1
+ /*
+ * 'run_pictwps_filter()' - Convert PICT files to PostScript when printing
+ * remotely.
+ *
+ * This step is required because the PICT format is not documented and
+ * subject to change, so developing a filter for other OS's is infeasible.
+ * Also, fonts required by the PICT file need to be embedded on the
+ * client side (which has the fonts), so we run the filter to get a
+ * PostScript file for printing...
+ */
+
+ int /* O - Exit status of filter */
+ run_pictwps_filter(char **argv, /* I - Command-line arguments */
+ char *filename, /* I - Filename buffer */
+ int length) /* I - Size of filename buffer */
+ {
+ struct stat fileinfo; /* Print file information */
+ const char *ppdfile; /* PPD file for destination printer */
+ int pid; /* Child process ID */
+ int fd; /* Temporary file descriptor */
+ int status; /* Exit status of filter */
+ const char *printer; /* PRINTER env var */
+ static char ppdenv[1024]; /* PPD environment variable */
+
+ /*
+ * First get the PPD file for the printer...
+ */
+
+ printer = getenv("PRINTER");
+ if (!printer)
+ {
+ fputs("ERROR: PRINTER environment variable not defined!\n", stderr);
+ return (-1);
+ }
+
+ if ((ppdfile = cupsGetPPD(printer)) == NULL)
+ {
+ fprintf(stderr, "ERROR: Unable to get PPD file for printer \"%s\" - %s.\n",
+ printer, ippErrorString(cupsLastError()));
+ /*return (-1);*/
+ }
+ else
+
+ {
+ snprintf(ppdenv, sizeof(ppdenv), "PPD=%s", ppdfile);
+ putenv(ppdenv);
+ }
+
+ /*
+ * Then create a temporary file for printing...
+ */
+
+ if ((fd = cupsTempFd(filename, length)) < 0)
+ {
+ fprintf(stderr, "ERROR: Unable to create temporary file - %s.\n",
+ strerror(errno));
+ if (ppdfile)
+ unlink(ppdfile);
+ return (-1);
+ }
+
+ /*
+ * Get the owner of the spool file - it is owned by the user we want to run
+ * as...
+ */
+ stat(argv[6], &fileinfo);
+
+ if (ppdfile)
+ chown(ppdfile, fileinfo.st_uid, fileinfo.st_gid);
+
+ fchown(fd, fileinfo.st_uid, fileinfo.st_gid);
+
+ /*
+ * Finally, run the filter to convert the file...
+ */
+
+ if ((pid = fork()) == 0)
+ {
+ /*
+ * Child process for pictwpstops... Redirect output of pictwpstops to a
+ * file...
+ */
+
+ close(1);
+ dup(fd);
+ close(fd);
+
+ if (!getuid())
+ {
+ /*
+ * Change to an unpriviledged user...
+ */
+
+ setgid(fileinfo.st_gid);
+ setuid(fileinfo.st_uid);
+ }
+
+ execlp("pictwpstops", printer, argv[1], argv[2], argv[3], argv[4], argv[5],
+ argv[6], NULL);
+ perror("ERROR: Unable to exec pictwpstops");
+ return (errno);
+ }
+
+ close(fd);

+ if (pid < 0)
+ {
+ /*
+ * Error!
+ */
+
+ perror("ERROR: Unable to fork pictwpstops");
+ unlink(filename);
+ if (ppdfile)
+ unlink(ppdfile);
+ return (-1);
+ }
+
+ /*
+ * Now wait for the filter to complete...
+ */
+
+ if (wait(&status) < 0)
+ {
+ perror("ERROR: Unable to wait for pictwpstops");
+ close(fd);
+ unlink(filename);
+ if (ppdfile)
+ unlink(ppdfile);
+ return (-1);
+ }
+
+ if (ppdfile)
+ unlink(ppdfile);
+
+ close(fd);
+
+ if (status)
+ {
+ if (status >= 256)
+ fprintf(stderr, "ERROR: pictwpstops exited with status %d!\n",
+ status / 256);
+ else
+ fprintf(stderr, "ERROR: pictwpstops exited on signal %d!\n",
+ status);
+
+ unlink(filename);
+ return (status);
+ }
+
+ /*
+ * Return with no errors..
+ */
+
+ return (0);
+ }
+ #endif

/*
* End of "$Id: ipp.c,v 1.1.1.5 2002/04/08 07:19:00 jlovell Exp $".


Gruß
Dirk
 
Sodele, Problem vermutlich gelöst.

Druckerdienstprogramm aufrufen, dann
die Drucker zurücksetzen und neu anlegen.
Hat hier jetzt auf mehreren Rechnern
funktioniert.

Zusätzlich: Falls das nicht geht -
die com.apple PrintingPrefs löschen
und evtl. von HP die aktuellen
Druckertreiber installieren.

Bitte erst die allererste Varianten ausprobieren,
Wermutstropfen - die Drucker müßen neu
angelegt werden...

Gruß

Dirk
 
Zurück
Oben Unten