Репозитории ALT
S: | 2.4.7-alt1 |
5.1: | 1.4.2-alt1.M51.2 |
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 |
Группа :: Система/Серверы
Пакет: cups
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: ALT-2.1.0-check-PPD-SE.patch
Скачать
Скачать
--- 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)
{