Bug 464570 - CUPS policy update for System V style interface scripts
CUPS policy update for System V style interface scripts
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
Blocks: 550015
  Show dependency treegraph
Reported: 2008-09-29 12:12 EDT by Tim Waugh
Modified: 2010-02-03 04:53 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 550015 (view as bug list)
Last Closed: 2008-11-17 17:05:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tim Waugh 2008-09-29 12:12:34 EDT
Description of problem:
When using the lpadmin '-i' option to set an interface script for a printer, SELinux audit messages are seen because the script is not executable.

cupsd creates the file as /etc/cups/interfaces/$NAME, and needs to be able to modify/remove that filename.  It also needs to be able to execute it, in the same way that filters are executed.

I think what's required is:

1. a new type, cups_interface_t, which is like cups_etc_rw_t but which also allows execution.
2. files in /etc/cups/interfaces to be labelled cups_interface_t

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

cat <<EOF >my-interface-script
touch /tmp/test

lpadmin -p x -i my-interface-script
cupsenable x
accept x

echo . | lp -dx

ls -l /tmp/test
# File should exist
Actual results:
/tmp/test does not exist.

Expected results:
/tmp/test exists.

Additional info:
Here are the audit messages:

type=AVC msg=audit(1222701812.402:592): avc:  denied  { execute } for  pid=3556 
comm="cupsd" name="x" dev=md2 ino=1157032 scontext=system_u:system_r:cupsd_t:s0-
s0:c0.c1023 tcontext=system_u:object_r:cupsd_rw_etc_t:s0 tclass=file
type=SYSCALL msg=audit(1222701812.402:592): arch=c000003e syscall=21 success=yes
 exit=0 a0=7fff09a44f60 a1=1 a2=16 a3=0 items=0 ppid=1 pid=3556 auid=4294967295 
uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=429496729
5 comm="cupsd" exe="/usr/sbin/cupsd" subj=system_u:system_r:cupsd_t:s0-s0:c0.c10
23 key=(null)
type=AVC msg=audit(1222701839.391:593): avc:  denied  { execute_no_trans } for  pid=20638 comm="cupsd" path="/etc/cups/interfaces/x" dev=md2 ino=1157032 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cupsd_rw_etc_t:s0 tclass=file
type=SYSCALL msg=audit(1222701839.391:593): arch=c000003e syscall=59 success=yes exit=0 a0=7fff09a46e30 a1=7fdc029bc420 a2=7fff09a45530 a3=7fff09a45100 items=0 ppid=3556 pid=20638 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm="x" exe="/bin/bash" subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)
Comment 1 Daniel Walsh 2008-09-29 15:09:35 EDT
Fixed in selinux-policy-3.3.1-97.fc9.noarch
Comment 2 Tim Waugh 2008-10-09 10:07:50 EDT
selinux-policy-3.3.1-99.fc9 fixes it for me.  Thanks!
Comment 3 Daniel Walsh 2008-11-17 17:05:51 EST
Closing all bugs that have been in modified for over a month.  Please reopen if the bug is not actually fixed.

Note You need to log in before you can comment on or make changes to this bug.