Bug 204452 - /etc/init.d/dovecot permissions
/etc/init.d/dovecot permissions
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dovecot (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Rockai
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-29 03:27 EDT by Need Real Name
Modified: 2014-01-21 17:54 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-11 12:27:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2006-08-29 03:27:14 EDT
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-26 20:31:41 EDT
-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-26 22:02:45 EDT
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-26 22:03:36 EDT
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 06:38:00 EDT
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.