Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37476283
en ru br
ALT Linux repositórios
S:2.4.7-alt1
5.0: 1.3.10-alt1
4.1: 1.3.10-alt0.M41.4
+updates:1.3.9-alt1.M41.1
4.0: 1.2.12-alt6.M40.9
+updates:1.2.12-alt6.M40.8
3.0: 1.1.20-alt14.1

Group :: Sistema/Servidores
RPM: cups

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: ALT-2.1.0-check-PPD-SE.patch
Download


--- scheduler/job.c.orig	2018-10-04 11:01:52.227572708 +0000
+++ scheduler/job.c	2018-10-04 11:38:55.308279008 +0000
@@ -4778,7 +4778,7 @@
   const char	*filename;		/* Support filename */
 #ifdef WITH_LSPP
   char			*audit_message = NULL;	/* Audit message string */
-  char			*printerfile = NULL;	/* Device file pointed to by the printer */
+  char			printerfile[PATH_MAX];	/* Device file pointed to by the printer */
   security_id_t		clisid;		/* SELinux SID for the client */
   security_id_t		psid;		/* SELinux SID for the printer */
   context_t		printercon;	/* Printer's context string */
@@ -4970,14 +4970,13 @@
    /*
     * Perform an access check before printing, but only if the printer starts with /dev/
     */
-    printerfile = strstr(printer->device_uri, "/dev/");
-    if (printerfile == NULL && (strncmp(printer->device_uri, "file:/", 6) == 0))
-      printerfile = printer->device_uri + strlen("file:");
+    snprintf(printerfile, PATH_MAX, "/etc/cups/ppd/%s.ppd", printer->name );
+    printerfile[PATH_MAX]=0;
 
     if (printerfile != NULL)
     {
       cupsdLogJob(job, CUPSD_LOG_DEBUG,
-		  "Attempting to check access on printer device %s",
+		  "Attempting to check access on printer PPD file %s",
 		  printerfile);
       if (lstat(printerfile, &printerstat) < 0)
       {
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009