cups: use ([^/]+/)? to match a subdirectory of CUPS configuration

It seems that /opt/brother/Printers/ only has one level of directories
before a directory named "inf", according to several websites. For
example:

* https://www.linuxquestions.org/questions/slackware-14/trying-to-add-driver-for-brother-hl-l2300d-4175535636/
* https://forums.opensuse.org/showthread.php/531271-Brother-printer-driver-installs-but-can-t-print/page2

Modify the pattern for /opt/brother/Printers/${MODEL_NAME}/inf in order
to only allow at most one level, with "([^/]+/)?".

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2019-09-04 20:57:07 +02:00
parent e09bcff3d2
commit b8f2c55109
No known key found for this signature in database
GPG Key ID: C191415F340DAAA0
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@
/etc/printcap.* -- gen_context(system_u:object_r:cupsd_rw_etc_t,s0)
/opt/brother/Printers/(.*/)?inf(/.*)? gen_context(system_u:object_r:cupsd_rw_etc_t,s0)
/opt/brother/Printers/([^/]+/)?inf(/.*)? gen_context(system_u:object_r:cupsd_rw_etc_t,s0)
/opt/gutenprint/ppds(/.*)? gen_context(system_u:object_r:cupsd_rw_etc_t,s0)
/usr/bin/hp-[^/]+ -- gen_context(system_u:object_r:hplip_exec_t,s0)