Bug 648995 - Issues with cups socket
Issues with cups socket
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
BaseOS QE Security Team
Depends On:
  Show dependency treegraph
Reported: 2010-11-02 13:14 EDT by Orion Poplawski
Modified: 2010-11-11 09:51 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-11 09:51:50 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 Orion Poplawski 2010-11-02 13:14:13 EDT
Description of problem:

System is updated with yum-cron.  After cups update, I got:

type=AVC msg=audit(1288716983.014:438796): avc:  denied  { connectto } for  pid=25455 comm="smbd" path="/var/run/cups/cups.sock" scontext=root:system_r:smbd_t:s0 tcontext=user_u:system_r:rpm_script_t:s0 tclass=unix_stream_socket

Tried restarting cups from ssh connection, now I get:

type=AVC msg=audit(1288717673.561:439250): avc:  denied  { connectto } for  pid=14483 comm="smbd" path="/var/run/cups/cups.sock" scontext=root:system_r:smbd_t:s0 tcontext=root:system_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket

srwxrwxrwx  root root root:object_r:cupsd_var_run_t    /var/run/cups/cups.sock

root:system_r:unconfined_t:SystemLow-SystemHigh root 17768 1  0 10:56 ? 00:00:01 cupsd

How do I get cupsd to run confined?

Version-Release number of selected component (if applicable):
Comment 1 Daniel Walsh 2010-11-02 15:06:21 EDT
Some how you ended up running cups as rpm_script_t

Try service cups restart

And it should run with the proper context.

ps -eZ |grep cups
Comment 2 Orion Poplawski 2010-11-02 15:25:48 EDT
I did restart cups, now it is "unconfined_t" as noted above.
Comment 3 Daniel Walsh 2010-11-02 15:28:58 EDT
Then your initrc scripts are mislabeled.

restorecon -R -v /etc/rc.d
Comment 4 Orion Poplawski 2010-11-02 15:36:37 EDT
Damn, I should have remembered that.  That did the trick.  Thanks.

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