Bug 119989 - can't bind to X11 TCP port
can't bind to X11 TCP port
Product: Fedora
Classification: Fedora
Component: vnc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
Depends On:
Blocks: FC2Target
  Show dependency treegraph
Reported: 2004-04-04 14:56 EDT by Tim Waugh
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-04-14 12:07:13 EDT
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 2004-04-04 14:56:55 EDT
Description of problem:
I can't start 'vncserver' as a user_r user.  The same issue affects Xnest.

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

How reproducible:

Steps to Reproduce:
1. Log in as a user_r user.
2. Try to run 'vncserver', 'Xvnc :5', or 'Xnest :5'
Actual results:
Fails.  For Xnest and Xvnc the server is started but since it doesn't
have a listener socket no X applications can be displayed on it.

Expected results:
Should work.

For vncserver:
audit(1081105249.567:0): avc:  denied  { name_bind } for  pid=2810
exe=/usr/bin/perl src=6005 scontext=tim:user_r:user_t
tcontext=system_u:object_r:xserver_port_t tclass=tcp_socket

For Xvnc:
audit(1081105310.203:0): avc:  denied  { name_bind } for  pid=2818
exe=/usr/bin/Xvnc src=6005 scontext=tim:user_r:user_t
tcontext=system_u:object_r:xserver_port_t tclass=tcp_socket

For Xnest:
audit(1081105195.526:0): avc:  denied  { name_bind } for  pid=2806
exe=/usr/X11R6/bin/Xnest src=6005 scontext=tim:user_r:user_t
tcontext=system_u:object_r:xserver_port_t tclass=tcp_socket
Comment 1 Daniel Walsh 2004-04-06 13:36:40 EDT
Could you try this with setenforce 0 and see what errors are produced?

Comment 2 Tim Waugh 2004-04-06 13:45:08 EDT
Xnest/Xvnc: There are no more messages with setenforce 0, just that one.
Comment 3 Daniel Walsh 2004-04-06 13:59:32 EDT
Could you add
ifdef(`xserver.te', `
allow $1_t xserver_port_t:tcp_socket { name_bind };

to macros/user_macros.te and see if you can get these tools to work in 
enforcing mode?
Comment 4 Tim Waugh 2004-04-06 14:22:55 EDT
Excellent, all work fine!  Thanks!

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