Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
STRANGE BUG ?!?! WITH SOCKETS under regular user, plz help..
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
amax
Tux's lil' helper
Tux's lil' helper


Joined: 22 Feb 2004
Posts: 76
Location: Russia, Novosibirsk (Silicon Taiga)

PostPosted: Tue Feb 24, 2004 3:34 pm    Post subject: STRANGE BUG ?!?! WITH SOCKETS under regular user, plz help.. Reply with quote

for example
if i ping any site under root - it works well
if under ANY user

amax@amazing amax $ ping google.com
ping: unknown host google.com
amax@amazing amax $ sudo -s
amazing amax # ping google.com
PING google.com (216.239.39.99) 56(84) bytes of data.
64 bytes from 216.239.39.99: icmp_seq=2 ttl=236 time=958 ms

--- google.com ping statistics ---
3 packets transmitted, 1 received, 66% packet loss, time 8202ms
rtt min/avg/max/mdev = 958.777/958.777/958.777/0.000 ms
amazing amax # uname -a
Linux amazing 2.6.32-amax #8 Sun Feb 22 13:33:35 NOVT 2004 x86_64 4 GNU/Linux
amazing amax #

under 2.6.3 kernel is is same

what happening?
open("/lib/libnss_dns.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\23\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=16808, ...}) = 0
mmap(NULL, 1062960, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2a95ac4000
mprotect(0x2a95ac8000, 1046576, PROT_NONE) = 0
mmap(0x2a95bc4000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2a95bc4000
close(3) = 0
munmap(0x2a9556b000, 96558) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("0.0.0.0")}, 28) = 0
sendto(3, "\223\261\1\0\0\1\0\0\0\0\0\0\6google\3com\0\0\1\0\1", 28, 0, NULL, 0) = 28
poll([{fd=3, events=POLLIN, revents=POLLERR}], 1, 5000) = 1
ioctl(3, FIONREAD, [0]) = 0
recvfrom(3, 0xbfffe9e0, 1024, 0, 0xbfffde00, 0xbfffdda0) = -1 ECONNREFUSED (Connection refused)
close(3) = 0
write(2, "ping: unknown host google.com\n", 30ping: unknown host google.com
) = 30
_exit(2)


hmm...
amazing amax # ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:188 errors:0 dropped:0 overruns:0 frame:0
TX packets:188 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:42428 (41.4 Kb) TX bytes:42428 (41.4 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:10.0.5.90 P-t-P:10.0.0.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
RX packets:76 errors:0 dropped:0 overruns:0 frame:0
TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:34657 (33.8 Kb) TX bytes:9803 (9.5 Kb)


pppd was taken from 32bit gentoo and works fine all time...

amazing etc # cat /etc/resolv.conf
nameserver 193.232.88.17
nameserver 217.118.66.243



amazing etc # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 ppp0



amax@amazing amax $ telnet 193.232.88.17 53
Trying 193.232.88.17...
Connected to 193.232.88.17.
Escape character is '^]'.

it is my default dns...

help me please.
what info is needed more for detection of problem?

it looks like I am stupid... :-\
Back to top
View user's profile Send private message
crazycat
l33t
l33t


Joined: 26 Aug 2003
Posts: 838
Location: Hamburg, Germany

PostPosted: Tue Feb 24, 2004 3:38 pm    Post subject: Reply with quote

try to chmod resolv.conf.
Back to top
View user's profile Send private message
amax
Tux's lil' helper
Tux's lil' helper


Joined: 22 Feb 2004
Posts: 76
Location: Russia, Novosibirsk (Silicon Taiga)

PostPosted: Tue Feb 24, 2004 3:47 pm    Post subject: Reply with quote

crazycat wrote:
try to chmod resolv.conf.


WOW!!! Thanks!!! It works.. ;)

I see, it was problem, which come in with new PPP daemon..

I have compiled it, with small patch to net-dialup/ppp

with changes in ppp-2.4.2.ebuild
src_compile() {
export WANT_AUTOCONF=2.1
# compile radius better than their makefile does
(cd pppd/plugins/radius/radiusclient && cp /usr/share/automake/config.guess . && cp /usr/
share/automake/config.sub . && econf && emake) || die
./configure --prefix=/usr --help|| die
emake COPTS="${CFLAGS}" || die
}

so.. after making connection it was replaced my resolv.conf with wrong permissions.. hmm ;)

I never see resolv.conf with 600 perms :))

BIG THANKS for help.. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum