Bug 365851 - vpnc debugging fails to open/use pty
Summary: vpnc debugging fails to open/use pty
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-04 15:40 UTC by David Woodhouse
Modified: 2007-11-30 22:12 UTC (History)
2 users (show)

Fixed In Version: 44
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-05 16:54:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Woodhouse 2007-11-04 15:40:09 UTC
With 'setenforce 0' I get debug output from vpnc. Part of the strace looks like
this:

-fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0

... and later it writes debug information to stdout. With 'setenforce 1' I
repeat exactly the same command, and the relevant part of the strace looks like
this:

+fstat64(1, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0
+ioctl(1, TCGETS, 0xffec4d58)            = -1 ENOTTY (Inappropriate ioctl for
device)

I get an associated denial: 
audit(1194190616.960:119): avc:  denied  { use } for  pid=2333 comm="vpnc"
path="/dev/pts/1" dev=devpts ino=3 scontext=root:system_r:vpnc_t:s0-s0:c0.c1023
tcontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tclass=fd

and no debug output.

Comment 1 Tomas Mraz 2007-11-05 08:18:05 UTC
What 'getsebool allow_daemons_use_tty' prints?


Comment 2 David Woodhouse 2007-11-05 15:36:38 UTC
[root@ps3 ~]# getsebool allow_daemons_use_tty
allow_daemons_use_tty --> off
[root@ps3 ~]# setsebool allow_daemons_use_tty on

Doesn't help.

Comment 3 Tomas Mraz 2007-11-05 15:55:50 UTC
It should -> selinux-policy.


Comment 4 Daniel Walsh 2007-11-05 16:54:52 UTC
What version of selinux policy are you seeing this with?

 rpm -q selinux-policy
selinux-policy-3.0.8-44.fc8

 audit2why <  /tmp/t
audit(1194190616.960:119): avc:  denied  { use } for  pid=2333 comm="vpnc"
path="/dev/pts/1" dev=devpts ino=3 scontext=root:system_r:vpnc_t:s0-s0:c0.c1023
tcontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tclass=fd
        Was caused by:
                Unknown - would be allowed by active policy
                Possible mismatch between this policy and the one under which
the audit message was generated.
                Possible mismatch between current in-memory boolean settings vs.
permanent ones.

So I believe this is fixed in the latest policy.

Comment 5 David Woodhouse 2007-11-05 18:45:50 UTC
This seems to be the case. I seem to have updated my PS3 just before the latest
policy hit my local mirror. Thanks.


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