Bernd Walter wrote:
>
> Achte auf den RetCode:
> #define RMP_E_NOFILE 16 /* boot reply: file does not exist */
> Laut soruce versucht der einen open(2) auf das File - sollte per
> ktrace/kdump leicht zu prüfen sein, was für einen Pfad der genau sucht.
hmjo...
[...]
210 rbootd CALL chdir(0x804b74f)
210 rbootd NAMI "/usr/mdec/rbootd"
210 rbootd RET chdir 0
210 rbootd CALL sigprocmask(0x1,0xbfbff3d0,0xbfbff3c0)
210 rbootd RET sigprocmask 0
210 rbootd CALL stat(0x804b8cf,0xbfbff2c0)
210 rbootd NAMI "."
210 rbootd RET stat 0
210 rbootd CALL open(0x804b8cf,0x4,0x28051b3d)
210 rbootd NAMI "."
210 rbootd RET open 3
210 rbootd CALL fstat(0x3,0xbfbff2c0)
210 rbootd RET fstat 0
210 rbootd CALL fcntl(0x3,0x2,0x1)
210 rbootd RET fcntl 0
210 rbootd CALL __sysctl(0xbfbff178,0x2,0x28101300,0xbfbff174,0,0)
210 rbootd RET __sysctl 0
210 rbootd CALL fstatfs(0x3,0xbfbff1c0)
210 rbootd RET fstatfs 0
210 rbootd CALL getdirentries(0x3,0x8050000,0x1000,0x804f074)
210 rbootd RET getdirentries 512/0x200
210 rbootd CALL stat(0x8050008,0xbfbff380)
210 rbootd NAMI "."
210 rbootd RET stat 0
210 rbootd CALL stat(0x8050014,0xbfbff380)
210 rbootd NAMI ".."
210 rbootd RET stat 0
210 rbootd CALL stat(0x8050020,0xbfbff380)
210 rbootd NAMI "SYSNBSD"
210 rbootd RET stat 0
210 rbootd CALL getdirentries(0x3,0x8050000,0x1000,0x804f074)
210 rbootd RET getdirentries 0
210 rbootd CALL lseek(0x3,0,0,0,0)
210 rbootd RET lseek 0
210 rbootd CALL close(0x3)
210 rbootd RET close 0
210 rbootd CALL open(0x804b72a,0,0x1b6)
210 rbootd NAMI "/etc/rbootd.conf"
210 rbootd RET open 3
210 rbootd CALL sigprocmask(0x1,0xbfbfef90,0xbfbfef80)
210 rbootd RET sigprocmask 0
210 rbootd CALL fstat(0x3,0xbfbfeea0)
210 rbootd RET fstat 0
210 rbootd CALL break(0x8055000)
210 rbootd RET break 0
210 rbootd CALL read(0x3,0x8053000,0x2000)
210 rbootd GIO fd 3 read 26 bytes
"08:00:09:70:69:21 SYSNBSD
"
210 rbootd RET read 26/0x1a
210 rbootd CALL read(0x3,0x8053000,0x2000)
210 rbootd GIO fd 3 read 0 bytes
""
[...]
210 rbootd RET write 36/0x24
210 rbootd CALL write(0x1,0x8053000,0x19)
210 rbootd GIO fd 1 wrote 25 bytes
" File Name (5): <gurke>
"
210 rbootd RET write 25/0x19
210 rbootd CALL write(0x1,0x8053000,0x1)
210 rbootd GIO fd 1 wrote 1 byte
"
"
210 rbootd RET write 1
210 rbootd CALL sigprocmask(0x3,0xbfbff310,0xbfbff300)
210 rbootd RET sigprocmask 0
210 rbootd CALL write(0x3,0x8054000,0x28)
210 rbootd GIO fd 3 wrote 40 bytes
"\b\0 pi!\b\0 pi!\0\^Z\M-x\M-x\^C\0\0\0\^F
\^F\b\M^A\0\0\0\0\0\0\0\0\^B\^Egurke"
210 rbootd RET write 40/0x28
210 rbootd CALL sigprocmask(0x3,0xbfbff3c0,0xbfbff3b0)
210 rbootd RET sigprocmask 0
210 rbootd CALL select(0x4,0xbfbffa20,0,0,0)
210 rbootd RET select 1
210 rbootd CALL read(0x3,0x8052000,0x1000)
210 rbootd GIO fd 3 read 78 bytes
"\M-a\M-R\M-`=\^UJ\^N\0<\0\0\0<\0\0\0\^R\0\0`\M^W9:v\b\0
pi!\0)\M-x\M-x\^C\0\0\0\^F\b\^F \^A\0.\M^T6X\0\0\0\^BHPS700
\0~~~~~"
210 rbootd RET read 78/0x4e
210 rbootd CALL sigprocmask(0x1,0xbfbff3a0,0xbfbff390)
210 rbootd RET sigprocmask 0
210 rbootd CALL write(0x1,0x8053000,0x3a)
210 rbootd GIO fd 1 wrote 58 bytes
"<<< 14:23:45.936469 Addr: 08:00:09:70:69:21 Intf: ep0
"
210 rbootd RET write 58/0x3a
210 rbootd CALL write(0x1,0x8053000,0x25)
210 rbootd GIO fd 1 wrote 37 bytes
" 802.2 LLC: DSAP:f8 SSAP:f8 CTRL:300
"
210 rbootd RET write 37/0x25
210 rbootd CALL write(0x1,0x8053000,0x20)
210 rbootd GIO fd 1 wrote 32 bytes
" HP Ext: DXSAP:608 SXSAP:609
"
210 rbootd RET write 32/0x20
210 rbootd CALL write(0x1,0x8053000,0xf)
210 rbootd GIO fd 1 wrote 15 bytes
" Boot Request:
"
210 rbootd RET write 15/0xf
210 rbootd CALL write(0x1,0x8053000,0x2b)
210 rbootd GIO fd 1 wrote 43 bytes
" RetCode:0 SeqNo:2e943658 SessID:0 Vers:2
"
210 rbootd RET write 43/0x2b
210 rbootd CALL write(0x1,0x8053000,0x25)
210 rbootd GIO fd 1 wrote 37 bytes
" Machine Type: HPS700
"
210 rbootd RET write 37/0x25
210 rbootd CALL write(0x1,0x8053000,0x14)
210 rbootd GIO fd 1 wrote 20 bytes
" File Name (0): <>
"
210 rbootd RET write 20/0x14
210 rbootd CALL write(0x1,0x8053000,0x1)
210 rbootd GIO fd 1 wrote 1 byte
"
"
210 rbootd RET write 1
210 rbootd CALL sigprocmask(0x3,0xbfbff3a0,0xbfbff390)
210 rbootd RET sigprocmask 0
210 rbootd CALL sigprocmask(0x1,0xbfbff3d0,0xbfbff3c0)
210 rbootd RET sigprocmask 0
210 rbootd CALL gettimeofday(0xbfbfe598,0)
210 rbootd RET gettimeofday 0
210 rbootd CALL break(0x8056000)
210 rbootd RET break 0
210 rbootd CALL getpid
210 rbootd RET getpid 210/0xd2
210 rbootd CALL sendto(0x2,0xbfbfea40,0x4d,0,0,0)
210 rbootd GIO fd 2 wrote 77 bytes
"<30>Nov 24 14:23:45 rbootd[210]: 08:00:09:70:69:21: request to
boot (denied)"
210 rbootd RET sendto 77/0x4d
210 rbootd CALL gettimeofday(0x8054df0,0)
210 rbootd RET gettimeofday 0
210 rbootd CALL sigprocmask(0x1,0xbfbff210,0xbfbff200)
210 rbootd RET sigprocmask 0
[...]
denied? wiso das denn? die ip adresse taucht in rbootd.conf auf, und das
SYSNBSD versucht er ja nichtmal zu oeffnen. (zumindest aber findet er es
oben beim getdirentries()).
am anfang kommt komischerweise auch 953 mal
210 rbootd CALL close(0x3)
210 rbootd RET close -1 errno 9 Bad file descriptor
210 rbootd CALL close(0x4)
210 rbootd RET close -1 errno 9 Bad file descriptor
210 rbootd CALL close(0x5)
210 rbootd RET close -1 errno 9 Bad file descriptor
[...]
210 rbootd CALL close(0x3bc)
210 rbootd RET close -1 errno 9 Bad file descriptor
210 rbootd CALL sigaction(0x1e,0xbfbff3c8,0xbfbff3b0)
210 rbootd RET sigaction 0
210 rbootd CALL sigaction(0x1f,0xbfbff3b8,0xbfbff3a0)
210 rbootd RET sigaction 0
210 rbootd CALL close(0x2)
210 rbootd RET close 0
210 rbootd CALL gettimeofday(0xbfbfe708,0)
210 rbootd RET gettimeofday 0
210 rbootd CALL readlink(0x280eacd4,0xbfbfe370,0x3f)
210 rbootd NAMI "/etc/malloc.conf"
Gruesse, Oliver
-- Oliver Lehmann, lehmann@ans-netz.de, http://www.pofo.de/ http://wishlist.pofo.de/ To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org with "unsubscribe de-bsd-questions" in the body of the messageReceived on Sun 24 Nov 2002 - 14:42:51 CET