Re: [exim] Exim selinux errors with F11

Góra strony
Delete this message
Reply to this message
Autor: John Horne
Data:  
Dla: Exim users
Temat: Re: [exim] Exim selinux errors with F11
On Tue, 2009-09-08 at 17:17 +0100, Graeme Fowler wrote:
> On Tue, 2009-09-08 at 14:16 +0100, John Horne wrote:
> > Anyone any ideas why this may be occurring? Why would exim be looking
> > in /boot, and possibly trying to look in other root-level directories?
>

[snipped]
>
> I currently have my test instance running as:
>
> strace -fFvtt -o exim.strace /usr/sbin/exim -bd -q2m
>
> I see no "/boot" in the output.
>

Okay. My exim config file contains the 'check_spool_space' directive.

I ran strace with exim in debug mode (-d'+all'). The debug output shows:

     17:50:52 18763 SMTP<< MAIL FROM:<fedora-list-bounces@???>
       SIZE=13624
     17:50:52 18763 spool directory space = 32580056K inodes = 2373295
       check_space = 5120K inodes = 0 msg_size = 18624
     17:50:52 18763 using ACL "acl_sender"


The corresponding strace output shows:

=================================================================
17:50:52.454802 write(2, "17:50:52 18763 SMTP<< MAIL FROM:<"..., 76) =
76
17:50:52.454905 statfs("/var/spool/exim", {f_type="EXT2_SUPER_MAGIC",
f_bsize=4096, f_blocks=10321232, f_bfree=8669302, f_bavail=8145014,
f_files=2621440, f_ffree=2373295, f_fsid={577620173, -1652874079},
f_namelen=255, f_frsize=4096}) = 0
17:50:52.455049 stat("/var/spool/exim", {st_dev=makedev(8, 3),
st_ino=123090, st_mode=S_IFDIR|0750, st_nlink=5, st_uid=93, st_gid=93,
st_blksize=4096, st_blocks=8, st_size=4096,
st_atime=2009/09/07-17:01:09, st_mtime=2009/09/07-11:29:52,
st_ctime=2009/09/07-11:29:52}) = 0
17:50:52.455180 open("/proc/mounts", O_RDONLY) = 3
17:50:52.455717 fstat(3, {st_dev=makedev(0, 3), st_ino=1405606,
st_mode=S_IFREG|0444, st_nlink=1, st_uid=0, st_gid=0, st_blksize=1024,
st_blocks=0, st_size=0, st_atime=2009/09/08-17:50:52,
st_mtime=2009/09/08-17:50:52, st_ctime=2009/09/08-17:50:52}) = 0
17:50:52.455848 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|
MAP_ANONYMOUS, -1, 0) = 0x7f63d94df000
17:50:52.455915 read(3, "rootfs / rootfs rw 0 0\n/dev/root "..., 1024) =
828
17:50:52.456077 read(3, ""..., 1024)    = 0
17:50:52.456150 lseek(3, 0, SEEK_SET)   = 0
17:50:52.456213 read(3, "rootfs / rootfs rw 0 0\n/dev/root "..., 1024) =
828
17:50:52.456337 stat("/boot", {st_dev=makedev(8, 1), st_ino=2,
st_mode=S_IFDIR|0755, st_nlink=5, st_uid=0, st_gid=0, st_blksize=1024,
st_blocks=4, st_size=1024, st_atime=2009/09/07-12:52:42,
st_mtime=2009/09/07-12:34:41, st_ctime=2009/09/07-12:34:41}) = 0
17:50:52.456539 stat("/isos", {st_dev=makedev(8, 17), st_ino=2,
st_mode=S_IFDIR|0755, st_nlink=3, st_uid=0, st_gid=0, st_blksize=4096,
st_blocks=16, st_size=4096, st_atime=2009/09/07-21:58:09,
st_mtime=2009/08/21-13:50:03, st_ctime=2009/09/07-18:05:06}) = 0
17:50:52.456723 stat("/backups", {st_dev=makedev(8, 19), st_ino=2,
st_mode=S_IFDIR|0700, st_nlink=5, st_uid=0, st_gid=500, st_blksize=4096,
st_blocks=16, st_size=4096, st_atime=2009/09/07-18:05:00,
st_mtime=2009/09/08-03:05:07, st_ctime=2009/09/08-03:05:07}) = 0
17:50:52.456860 stat("/vmware", {st_dev=makedev(8, 20), st_ino=2,
st_mode=S_IFDIR|0755, st_nlink=9, st_uid=500, st_gid=500,
st_blksize=4096, st_blocks=16, st_size=4096,
st_atime=2009/09/07-18:05:09, st_mtime=2009/08/17-13:38:06,
st_ctime=2009/09/07-18:05:09}) = 0
17:50:52.456983 read(3, ""..., 1024)    = 0
17:50:52.457059 lseek(3, 0, SEEK_SET)   = 0
17:50:52.457122 read(3, "rootfs / rootfs rw 0 0\n/dev/root "..., 1024) =
828
17:50:52.457238 stat("/", {st_dev=makedev(8, 3), st_ino=2,
st_mode=S_IFDIR|0755, st_nlink=27, st_uid=0, st_gid=0, st_blksize=4096,
st_blocks=8, st_size=4096, st_atime=2009/09/07-22:35:16,
st_mtime=2009/09/07-18:37:53, st_ctime=2009/09/07-18:37:53}) = 0
17:50:52.457359 close(3)                = 0
17:50:52.457423 munmap(0x7f63d94df000, 4096) = 0
17:50:52.457508 stat("/etc/localtime", {st_dev=makedev(8, 3),
st_ino=11624, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0,
st_blksize=4096, st_blocks=8, st_size=3661,
st_atime=2009/09/08-11:40:01, st_mtime=2009/09/07-11:38:45,
st_ctime=2009/09/07-11:38:45}) = 0
17:50:52.457644 write(2, "17:50:52 18763 spool directory sp"..., 114) =
114
=================================================================


If you follow it through, and through the exim source code, it is
calling 'statvfs/statfs' to determine the amount of space left in the
spool directory (it will do the same if you check the number of inodes).

To do this, as far as I can tell, statvfs looks in /proc/mounts for the
mounted partitions and stats each one. In my case I
have /boot, /isos, /backups and /vmware as separate partitions. Hence it
stats each of them, and this in turn throws up the selinux error.

Having commented out the relevant option from the config file, I am
still seeing selinux errors though. So, on with a bit more debugging...



John.

-- 
John Horne, University of Plymouth, UK
Tel: +44 (0)1752 587287    Fax: +44 (0)1752 587001