免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1471 | 回复: 2
打印 上一主题 下一主题

[系统管理] SELinux 的提示恢复“./resolv.conf'” ?而且源和目标都不一样啊! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-10-02 01:50 |只看该作者 |倒序浏览
本帖最后由 skysky1752 于 2013-10-02 02:07 编辑

SELinux 的提示“restorecon -v './resolv.conf'”,
路径应该在这里吧: /etc/resolv.conf 。
不过用这个路径 :restorecon -v '/etc/resolv.conf' 后,文件是这样的:
lrwxrwxrwx  root root root : object_r:etc_t              /etc/resolv.conf
这个和 Source Context ,Target Context 都不一样啊!  谁解答一下!


全文如下:

Allowing Access:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for ./resolv.conf,

restorecon -v './resolv.conf'

If this does not work, there is currently no automatic way to allow this access.
Instead, you can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context                system_u:system_r:avahi_t
Target Context                system_ubject_r:pppd_etc_rw_t
Target Objects                ./resolv.conf [ file ]
Source                        avahi-daemon
Source Path                   /usr/sbin/avahi-daemon
Port                          <Unknown>
Host                          ***
Source RPM Packages           avahi-0.6.16-10.el5_6
Target RPM Packages           
Policy RPM                    selinux-policy-2.4.6-327.el5
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   catchall_file

Alert Count                   2
First Seen                    Tue Oct  1 23:43:36 2013
Last Seen                     Wed Oct  2 00:13:13 2013
Local ID                      5f264a71-ef51-4287-992a-999deac7a486
Line Numbers                  

Raw Audit Messages            

host=*** type=AVC msg=audit(1380643993.965:9): avc:  denied  { read } for  pid=3092 comm="avahi-daemon" name="resolv.conf" dev=hda3 ino=686372 scontext=system_u:system_r:avahi_t:s0 tcontext=system_ubject_r:pppd_etc_rw_t:s0 tclass=file

host=*** type=SYSCALL msg=audit(1380643993.965:9): arch=40000003 syscall=5 success=no exit=-13 a0=805a4dc a1=0 a2=1 a3=1 items=0 ppid=3091 pid=3092 auid=4294967295 uid=70 gid=70 euid=70 suid=70 fsuid=70 egid=70 sgid=70 fsgid=70 tty=(none) ses=4294967295 comm="avahi-daemon" exe="/usr/sbin/avahi-daemon" subj=system_u:system_r:avahi_t:s0 key=(null)



LOG 如下:

Oct  1 23:43:23 www setroubleshoot: SELinux is preventing cupsd (cupsd_t) "read" to ./resolv.conf (pppd_etc_rw_t). For complete SELinux messages. run sealert -l 4fffdda7-a189-4f03-ac01-84138cdb9f3e
Oct  1 23:43:23 www setroubleshoot: SELinux is preventing cupsd (cupsd_t) "getattr" to /etc/ppp/resolv.conf (pppd_etc_rw_t). For complete SELinux messages. run sealert -l 2e2ddce2-7780-42b4-8c2e-56d834dcc0f2

Oct  1 23:43:36 www setroubleshoot: SELinux is preventing avahi-daemon (avahi_t) "read" to ./resolv.conf (pppd_etc_rw_t). For complete SELinux messages. run sealert -l 5f264a71-ef51-4287-992a-999deac7a486
Oct  1 23:43:36 www setroubleshoot: SELinux is preventing avahi-daemon (avahi_t) "getattr" to /etc/ppp/resolv.conf (pppd_etc_rw_t). For complete SELinux messages. run sealert -l 79e9a365-a897-4879-a8b7-711647efdbc5

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
2 [报告]
发表于 2013-10-02 08:30 |只看该作者
运行 sealert -l 4fffdda7-a189-4f03-ac01-84138cdb9f3e能看到selinux的信息

论坛徽章:
0
3 [报告]
发表于 2013-10-02 16:19 |只看该作者
回复 2# chenyx


    运行log里面的那4个sealert提供的操作都一样,为:restorecon -v './resolv.conf'。不知道为什么!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP