Bug 204452 - /etc/init.d/dovecot permissions
Summary: /etc/init.d/dovecot permissions
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dovecot
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Petr Rockai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-29 07:27 UTC by Need Real Name
Modified: 2014-01-21 22:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-11 16:27:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2006-08-29 07:27:14 UTC
The /etc/init.d/dovecot has wrong permissions 
ls -lZ /etc/init.d/dovecot*
-rwxr-xr-x  root     root     system_u:object_r:initrc_exec_t  /etc/init.d/dovecot
what prevent dovecot from starting with selinux enabled
after 
chcon  system_u:object_r:dovecot_exec_t /etc/init.d/dovecot
ls -lZ /etc/init.d/dovecot*
-rwxr-xr-x  root     root     system_u:object_r:dovecot_exec_t /etc/init.d/dovecot

everything works OK

Comment 1 Daniel Walsh 2006-09-27 00:31:41 UTC
-rwxr-xr-x  root     root     system_u:object_r:initrc_exec_t  /etc/init.d/dovecot

Was right,  init scripts should be labeled initrc_exec_t.  What avc messages
were you seeing?

How is the dovecot application labeled?

Comment 2 Need Real Name 2006-09-27 02:02:45 UTC
Sep 21 22:09:32 imap1 kernel: audit(1158890972.498:1557): avc:  denied  { read
write } for  pid=24398 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:32 imap1 kernel: audit(1158890972.522:1558): avc:  denied  { read }
for  pid=24398 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:32 imap1 kernel: audit(1158890972.542:1559): avc:  denied  { read
write } for  pid=24398 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:32 imap1 kernel: audit(1158890972.562:1560): avc:  denied  { read }
for  pid=24398 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:42 imap1 kernel: audit(1158890982.347:1561): avc:  denied  { read
write } for  pid=24404 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:42 imap1 kernel: audit(1158890982.367:1562): avc:  denied  { read }
for  pid=24404 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:42 imap1 kernel: audit(1158890982.383:1563): avc:  denied  { read
write } for  pid=24404 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:42 imap1 kernel: audit(1158890982.407:1564): avc:  denied  { read }
for  pid=24404 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:57 imap1 kernel: audit(1158890997.216:1565): avc:  denied  { read
write } for  pid=24431 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:57 imap1 kernel: audit(1158890997.236:1566): avc:  denied  { read }
for  pid=24431 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:57 imap1 kernel: audit(1158890997.256:1567): avc:  denied  { read
write } for  pid=24431 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:09:57 imap1 kernel: audit(1158890997.276:1568): avc:  denied  { read }
for  pid=24431 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:02 imap1 kernel: audit(1158891002.956:1569): avc:  denied  { read
write } for  pid=24433 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:03 imap1 kernel: audit(1158891002.980:1570): avc:  denied  { read }
for  pid=24433 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:03 imap1 kernel: audit(1158891002.996:1571): avc:  denied  { read
write } for  pid=24433 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:03 imap1 kernel: audit(1158891003.020:1572): avc:  denied  { read }
for  pid=24433 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:09 imap1 kernel: audit(1158891009.929:1573): avc:  denied  { read
write } for  pid=24436 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:09 imap1 kernel: audit(1158891009.949:1574): avc:  denied  { read }
for  pid=24436 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:09 imap1 kernel: audit(1158891009.969:1575): avc:  denied  { read
write } for  pid=24436 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:10 imap1 kernel: audit(1158891009.989:1576): avc:  denied  { read }
for  pid=24436 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:14 imap1 kernel: audit(1158891014.009:1577): avc:  denied  { read
write } for  pid=24440 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:14 imap1 kernel: audit(1158891014.025:1578): avc:  denied  { read }
for  pid=24440 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:14 imap1 kernel: audit(1158891014.049:1579): avc:  denied  { read
write } for  pid=24440 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 21 22:10:14 imap1 kernel: audit(1158891014.069:1580): avc:  denied  { read }
for  pid=24440 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 22 01:42:21 imap1 kernel: audit(1158903741.456:1587): avc:  denied  { lock }
for  pid=25683 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
Sep 22 01:42:23 imap1 kernel: audit(1158903743.696:1588): avc:  denied  { lock }
for  pid=25685 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011
scontext=root:system_r:dovecot_auth_t:s0
tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file


Comment 3 Need Real Name 2006-09-27 02:03:36 UTC
ls -lZ /usr/sbin/dovecot
-rwxr-xr-x  root root system_u:object_r:dovecot_exec_t /usr/sbin/dovecot


Comment 4 Daniel Walsh 2006-09-27 10:38:00 UTC
Fixed in selinux-policy-2.3.16-3

You can fix this yourself until the update by executing

audit2allow -M local.te < /var/log/messages

semodule -i local.pp


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