Re: [EXIM] allowing anyone to see the mail queue

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Paul Mansfield
Datum:  
To: Philip Hazel
CC: Exim users mailing list
Betreff: Re: [EXIM] allowing anyone to see the mail queue
On Fri, 27 Mar 1998, Philip Hazel wrote:
> > ok, I've fixed all the file permissions and so on. so, if user X can
> > actually read the 'mainlog' file, which does 'exim -bp' insist it cannot
> > open the mainlog file, when I can "more" it?
>
> Presumably because it wants to write to it. Why it should want to do
> this for -bp I am not sure. Have you tried "exim -d9 -bp"?


OK, here we go...

------------------------
% exim -d9 -bp
Exim version 1.82 debug level set to 9
probably ndbm
Actual local interface address is 127.0.0.1
Actual local interface address is 154.32.105.6
LOG: 0 MAIN
3 args: exim -d9 -bp
LOG: 0 PANIC
Cannot open main log file "/var/spool/exim/log/mainlog": Permission denied
could not open panic log: aborting
original error was: 1998-03-27 10:44:45 Cannot open main log file
"/var/spool/exim/log/mainlog": Permission denied
------------------------

OK, sledghammer standing by...

------------------------
% truss exim -d9 -bp
execve("/opt/exim/bin/exim", 0xEFFFFE18, 0xEFFFFE28) argc = 3

!!!SNIP loads of stuff about libraries, ioctl etc !!!

umask(0)                                        = 022
Exim version 1.82 debug level set to 9
write(2, " E x i m   v e r s i o n".., 39)      = 39
probably ndbm
write(2, " p r o b a b l y   n d b".., 14)      = 14
getuid()                                        = 2001 [2001]
getgid()                                        = 14 [14]
getgroups(16, 0xEFFFFCE8)                       = 3
getuid()                                        = 2001 [2001]
setgroups(0, 0x00000000)                        Err#1 EPERM
setgroups(1, 0xEFFFFCE8)                        Err#1 EPERM
getgid()                                        = 14 [14]
setgid(14)                                      = 0
getuid()                                        = 2001 [2001]
setuid(2001)                                    = 0
open("/opt/exim/etc/configure", O_RDONLY)       = 3
fstat(3, 0xEFFFF850)                            = 0
fstat(3, 0xEFFFF158)                            = 0
brk(0x00089DF8)                                 = 0
brk(0x0008BDF8)                                 = 0
ioctl(3, TCGETA, 0xEFFFF0E4)                    Err#25 ENOTTY
read(3, " #   E X I M   T e m p l".., 8192)     = 8192
open("/etc/.name_service_door", O_RDONLY)       = 4
fcntl(4, F_SETFD, 0x00000001)                   = 0
door_info(4, 0xEF615970)                        = 0
door_call(4, 0xEFFFED20, 0x00000400, 0x00000015, 0x00000000) = 0
brk(0x0008BDF8)                                 = 0
brk(0x0008DDF8)                                 = 0
read(3, " e   r e l a y\n s e n d".., 8192)     = 7818
uname(0xEFFFF330)                               = 1
open("/etc/netconfig", O_RDONLY)                = 5
fstat(5, 0xEFFFCAF8)                            = 0
brk(0x0008DDF8)                                 = 0
brk(0x0008FDF8)                                 = 0
ioctl(5, TCGETA, 0xEFFFCA84)                    Err#25 ENOTTY
read(5, " #\n #   T h e   " N e t".., 8192)     = 1064
read(5, 0x0008C0AC, 8192)                       = 0
lseek(5, 0, SEEK_CUR)                           = 1064
lseek(5, 0, SEEK_SET)                           = 0
read(5, " #\n #   T h e   " N e t".., 8192)     = 1064
read(5, 0x0008C0AC, 8192)                       = 0
lseek(5, 0, SEEK_CUR)                           = 1064
close(5)                                        = 0
open("/dev/udp", O_RDWR)                        = 5
ioctl(5, I_PUSH, "sockmod")                     = 0
ioctl(5, I_STR, 0xEFFFD0F8)                     = 0
ioctl(5, I_SETCLTIME, 0xEFFFD1AC)               = 0
ioctl(5, I_SWROPT, 0x00000002)                  = 0
sigfillset(0xEF616164)                          = 0
sigprocmask(SIG_SETMASK, 0xEFFFD19C, 0xEFFFD18C) = 0
ioctl(5, I_STR, 0xEFFFD010)                     = 0
sigprocmask(SIG_SETMASK, 0xEFFFD18C, 0xEFFFD168) = 0
ioctl(5, 0xC0086914, 0xEFFFF1E0)                = 0
ioctl(5, 0xC0206911, 0xEFFFF1C0)                = 0
ioctl(5, 0xC020690D, 0xEFFFF1C0)                = 0
Actual local interface address is 127.0.0.1
write(2, " A c t u a l   l o c a l".., 44)      = 44
ioctl(5, 0xC0206911, 0xEFFFF1C0)                = 0
ioctl(5, 0xC020690D, 0xEFFFF1C0)                = 0
Actual local interface address is 154.32.105.6
write(2, " A c t u a l   l o c a l".., 47)      = 47
close(5)                                        = 0
LOG: 0 MAIN
  3 args: exim -d9 -bp
write(2, " L O G :   0   M A I N\n".., 35)      = 35
time()                                          = 890995744
open("/usr/share/lib/zoneinfo/GB", O_RDONLY)    = 5
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0".., 8192)     = 1291
close(5)                                        = 0
open("/var/spool/exim/log/mainlog", O_WRONLY|O_APPEND) Err#13 EACCES
open("/var/spool/exim/log/mainlog", O_WRONLY|O_APPEND|O_CREAT, 0640) Err#13
EACCES
LOG: 0 PANIC
  Cannot open main log file "/var/spool/exim/log/mainlog": Permission denied
write(2, " L O G :   0   P A N I C".., 90)      = 90
time()                                          = 890995744
open("/var/spool/exim/log/paniclog", O_WRONLY|O_APPEND) Err#13 EACCES
open("/var/spool/exim/log/paniclog", O_WRONLY|O_APPEND|O_CREAT, 0640) Err#13
EACCES
could not open panic log: aborting
write(2, " c o u l d   n o t   o p".., 35)      = 35
original error was: write(2, " o r i g i n a l   e r r".., 20)  = 20
1998-03-27 10:49:04 Cannot open main log file "/var/spool/exim/log/mainlog":
Permission denied
write(2, " 1 9 9 8 - 0 3 - 2 7   1".., 95)      = 95
open("/dev/conslog", O_WRONLY)                  = 5
fcntl(5, F_SETFD, 0x00000001)                   = 0
fstat(5, 0xEFFFE7B8)                            = 0
fstat(5, 0xEFFFF208)                            = 0
time()                                          = 890995744
getpid()                                        = 12649 [12648]
putmsg(5, 0xEFFFE8C0, 0xEFFFE8B4, 0)            = 0
open("/etc/syslog.pid", O_RDONLY)               = 6
fstat(6, 0xEFFFE770)                            = 0
fcntl(6, F_SETFD, 0x00000001)                   = 0
fcntl(6, F_SETLK, 0xEFFFE81C)                   Err#11 EAGAIN
fstat(6, 0xEFFFF268)                            = 0
close(6)                                        = 0
fstat(5, 0xEFFFF268)                            = 0
close(5)                                        = 0
lseek(0, 0, SEEK_CUR)                           = 11235
lseek(3, 0xFFFFE21A, SEEK_CUR)                  = 8356
_exit(1)






hmmm, to misquote someone famous... "is this a bug I see before me"?

Paul


--
*** Exim information can be found at http://www.exim.org/ ***