LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-13-2006, 03:21 PM   #1
amk72
LQ Newbie
 
Registered: Sep 2004
Location: Finland
Distribution: Redhat FC6
Posts: 1

Rep: Reputation: 0
Question SELinux ttyS0 rw access


Hi!

What is the best way to give a program(fetch3600) a r/rw access to ttyS0 in SELinux. Program is used to read live data from device and display weatherdata on webpage.


in /dev/ttyS0
crw-rw-rw- 1 root uucp 4, 64 Dec 13 23:34 /dev/ttyS0

in /var/log/messages:
Dec 13 20:20:29 xxxxxxx kernel: audit(1166034029.818:12): avc: denied { read } for pid=5155 comm="fetch3600" name="[24846]" dev=eventpollfs ino=24846 scontext=root:system_r:httpd_sys_script_t:s0 tcontext=root:system_r:httpd_t:s0 tclass=file

Dec 13 20:20:30 xxxxxxx kernel: audit(1166034030.250:13): avc: denied { read write } for pid=5155 comm="fetch3600" name="ttyS0" dev=tmpfs ino=802 scontext=root:system_r:httpd_sys_script_t:s0 tcontext=system_ubject_r:tty_device_t:s0 tclass=chr_file

Last edited by amk72; 12-13-2006 at 03:39 PM.
 
Old 12-14-2006, 09:39 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
Run audit2allow on the log that contains your audit messages, add rules to local policy, then "make load", then test. Retry until no more avc messages.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
read/write access for ttys0 pete_bogg Linux - General 1 08-15-2006 12:31 AM
l and ttyS0 Gins Linux - General 4 08-06-2005 01:13 PM
Using ttys0 LWATCDR Programming 5 04-26-2005 04:37 PM
problems using ttyS0 _HB_ Linux - Software 1 06-29-2004 01:27 AM
non-root access to ttyS0 (rh9+wvdial) meks Linux - General 1 01-13-2004 07:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration