Re: Acces aux DNS...

Top Page

Reply to this message
Author: ML Guilde
Date:  
To: ML Guilde
Old-Topics: Re: Acces aux DNS / fichiers passwd, shadow et group
Subject: Re: Acces aux DNS...
On Monday 05 April 2004 11:59, Jerome KIEFFER wrote:

> La route est bonne ?
>
> route add default gw ip-routeur


Ouaip. Ca c'est bon.

On Monday 05 April 2004 11:41, Reveret Julien wrote:

> Tu peux toujours essayer de voir ce qui se passe avec strace.


J'ai mis la sortie en attachement. On voit bien qu'il ouvre /etc/hosts, mais
apres, rien. J'ai pourtant bien:

order hosts,bind

dans /etc/host.conf, et j'ai bien mes serveurs de noms dans /etc/resolv.conf.
D'ailleurs, pourquoi ca marche avec hosts <machine>, mais pas avec le reste ?

--
Frédéric
execve("/bin/ping", ["ping", "sunceng"], [/* 7 vars */]) = 0
brk(0)                                  = 0x1005f8ac
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libc.so.6", O_RDONLY)    = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=1034012, ...}) = 0
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\2(8"..., 4096) = 4096
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30014000
mmap(0xfee8000, 1080456, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfee8000
mprotect(0xffca000, 154760, PROT_NONE)  = 0
mmap(0xffd8000, 77824, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xe0000) = 0xffd8000
mmap(0xffeb000, 19592, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffeb000
close(3)                                = 0
getpid()                                = 38
getpid()                                = 38
brk(0)                                  = 0x1005f8ac
brk(0x1005fcc4)                         = 0x1005fcc4
brk(0)                                  = 0x1005fcc4
brk(0x10060000)                         = 0x10060000
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat64(0x3, 0x7ffffa98)                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30015000
read(3, "#\n# /etc/nsswitch.conf\n#\npasswd:"..., 4096) = 151
brk(0)                                  = 0x10060000
brk(0x10061000)                         = 0x10061000
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x30015000, 4096)                = 0
open("/usr/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libnss_files.so.2", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=40412, ...}) = 0
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\""..., 4096) = 4096
mmap(0xfebe000, 104992, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfebe000
mprotect(0xfec8000, 64032, PROT_NONE)   = 0
mmap(0xfece000, 40960, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfece000
close(3)                                = 0
open("/etc/protocols", O_RDONLY)        = -1 ENOENT (No such file or directory)
socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 3
getuid()                                = 0
setuid(0)                               = 0
gettimeofday({948402928, 739541}, NULL) = 0
getpid()                                = 38
open("/etc/resolv.conf", O_RDONLY)      = 4
fstat64(0x4, 0x7ffff558)                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30015000
read(4, "search ill.fr\nnameserver 195.83."..., 4096) = 63
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x30015000, 4096)                = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 4
connect(4, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
open("/etc/host.conf", O_RDONLY)        = 4
fstat64(0x4, 0x7ffff7c8)                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30015000
read(4, "#\n# /etc/host.conf\n#\norder hosts"..., 4096) = 47
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x30015000, 4096)                = 0
open("/etc/hosts", O_RDONLY)            = 4
fcntl(4, F_GETFD)                       = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fstat64(0x4, 0x7ffff878)                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30015000
read(4, "#\n# hosts         This file desc"..., 4096) = 446
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x30015000, 4096)                = 0
write(2, "ping: ", 6ping: )                   = 6
write(2, "sunceng", 7sunceng)                  = 7
write(2, ": ", 2: )                       = 2
writev(2, [{"Unknown host", 12}, {"\n", 1}], 2Unknown host
) = 13
exit(1)                                 = ?