Bug 5027 - mkfile (-С) : Permission denied (chroot and -C mutually incompatible?)
: mkfile (-С) : Permission denied (chroot and -C mutually incompatible?)
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/tcpdump)
: unstable
: all Linux
: P2 major
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2004-08-19 19:33 by
Modified: 2007-03-03 22:28 (History)


Attachments


Note

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


Description From 2004-08-19 19:33:22
[root@smart tmp]# tcpdump -w /root/tmp/dump -C 1 -ni eth0
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
когда размер дампа достигает мегабайта, получаем
tcpdump: /root/tmp/dump1: No such file or directory
[root@smart tmp]#
[root@smart tmp]# cd /root/tmp
[root@smart tmp]#
[root@smart tmp]# tcpdump -w ./dump -C 1 -ni eth0
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
когда размер дампа достигает мегабайта, получаем
tcpdump: ./dump1: Permission denied

Пробовал в разных каталогах на разных системах. tcpdump-3.8.2-alt1.1

select(5, [4], NULL, NULL, {1, 0})      = 1 (in [4], left {1, 0})
recvfrom(4, "\0\1\3\300\302\6\0\300&,\326\211\10\0E\0\0\214\0\0@\0@"..., 96,
MSG_TRUNC, {sa_family=AF_PACKET, proto=0x800, if2, pkttype=PACKET_HOST,
addr(6)={1, 00c0262cd689}, [20]) = 154
ioctl(4, SIOCGSTAMP, 0xbffff6d0)        = 0
write(6, "\207\306$AH\236\n\0`\0\0\0\266\0\0\0\0\300&,\326\211\0"..., 112) = 112
close(6)                                = 0
munmap(0x40014000, 4096)                = 0
open("./dump1", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 EACCES
(Permission denied)
write(2, "tcpdump: ", 9tcpdump: )                = 9
write(2, "./dump1: Permission denied", 26./dump1: Permission denied) = 26
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?
------- Comment #1 From 2004-08-27 15:53:39 -------
Это происходит из-за параметра -C.
------- Comment #2 From 2005-08-02 18:10:42 -------
(In reply to comment #1)
> Это происходит из-за параметра -C.

Это происходит после chroot в /var/resolv. В RH 9 такой проблемы с "-C" нет. А
между тем этот баг крайне неприятен!
------- Comment #3 From 2007-03-03 22:28:42 -------
Fixed in 3.9.5-alt1 by disabling chroot in dump truncation mode.