dropbear를 사용하여 임베디드 Linux 시스템에 chroot 감옥을 설정하려고 합니다. 나는 그것을 사용하고 있다이 페이지가이드로서, 목표에 따라 약간 조정해야 했지만.
나는 모든 것이 올바르게 설정되어야 한다고 믿습니다. 그러나 연결을 시도하면 쉘이 거의 즉시 종료되는 것 같습니다.
나는 출력을 캡처했습니다 strace
(아래는 출력의 관련 부분이라고 생각되는 것입니다). 이는 쉘을 처리해야 하는 busybox 프로세스의 출력일 뿐입니다.
이것은 dropbear가 시작되고 연결을 시도한 후의 출력입니다(이 키를 로드하지 못한 것이 문제라고 생각하지 않습니다. RSA 키를 성공적으로 로드하므로 이것이 chroot Jail 없이 작동하도록 하는 데 필요한 전부입니다).
[1752] Apr 24 16:23:50 Failed loading /etc/dropbear/dropbear_dss_host_key
[1752] Apr 24 16:23:50 Failed loading /etc/dropbear/dropbear_ecdsa_host_key
[1752] Apr 24 16:23:50 Not backgrounding
[1757] Apr 24 16:23:57 Child connection from 192.168.3.113:52163
[1757] Apr 24 16:23:57 Pubkey auth succeeded for 'filexfer' with key md5 f3:1d:ff:a5:29:7b:1e:e8:fe:0b:b4:bf:e8:33:a4:15 from 192.168.3.113:52163
[1757] Apr 24 16:23:57 Exit (filexfer): Exited normally
다음은 관련성이 있다고 생각되는 strace 출력입니다.
[pid 1737] rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART|0x4000000}, <unfinished ...>
[pid 1737] <... rt_sigaction resumed> {0x225e4, [], SA_NOCLDSTOP|0x4000000}, 8) = 0
[pid 1737] dup2(6, 0) = 0
[pid 1737] dup2(9, 1) = 1
[pid 1737] dup2(11, 2) = 2
[pid 1737] close(7) = 0
[pid 1737] close(6) = 0
[pid 1737] close(8) = 0
[pid 1737] close(9) = 0
[pid 1737] close(10) = 0
[pid 1737] close(11) = 0
[pid 1737] open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999988})
[pid 1737] read(6, "\207\203\\\207\211\35.EA\340[\260\356h\345n\366\36\256d\252O\236\371N\"\352\4\330\5i4", 32) = 32
[pid 1737] close(6) = 0
[pid 1737] open("/proc/timer_list", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999992})
[pid 1737] read(6, "Timer List Version: v0.7\nHRTIMER"..., 4096) = 2450
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999991})
[pid 1737] read(6, "", 4096) = 0
[pid 1737] close(6) = 0
[pid 1737] open("/proc/interrupts", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, " CPU0 \n 28: "..., 4096) = 1213
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, "", 4096) = 0
[pid 1737] close(6) = 0
[pid 1737] open("/proc/loadavg", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999993})
[pid 1737] read(6, "0.00 0.01 0.05 1/65 1737\n", 4096) = 25
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, "", 4096) = 0
[pid 1737] close(6) = 0
[pid 1737] open("/proc/sys/kernel/random/entropy_avail", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999982})
[pid 1737] read(6, "196\n", 4096) = 4
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999993})
[pid 1737] read(6, "", 4096) = 0
[pid 1737] close(6) = 0
[pid 1737] open("/proc/net/netstat", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999989})
[pid 1737] read(6, "TcpExt: SyncookiesSent Syncookie"..., 4096) = 2010
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, "", 2086) = 0
[pid 1737] close(6) = 0
[pid 1737] open("/proc/net/dev", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, "Inter-| Receive "..., 4096) = 569
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999995})
[pid 1737] read(6, "", 3527) = 0
[pid 1737] close(6) = 0
[pid 1737] open("/proc/net/tcp", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, " sl local_address rem_address "..., 4096) = 450
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, "", 3646) = 0
[pid 1737] close(6) = 0
[pid 1737] open("/proc/net/rt_cache", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999993})
[pid 1737] read(6, "Iface\tDestination\tGateway \tFlags"..., 4096) = 128
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, "", 3968) = 0
[pid 1737] close(6) = 0
[pid 1737] open("/proc/vmstat", O_RDONLY|O_LARGEFILE) = 6
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, "nr_free_pages 112743\nnr_alloc_ba"..., 4096) = 1658
[pid 1737] select(7, [6], NULL, NULL, {2, 0}) = 1 (in [6], left {1, 999994})
[pid 1737] read(6, "", 4096) = 0
[pid 1737] close(6) = 0
[pid 1737] gettimeofday({1493050478, 344430}, NULL) = 0
[pid 1737] times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 144217
[pid 1737] open("/dev/urandom", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 6
[pid 1737] fstat64(6, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
[pid 1737] ioctl(6, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbe98c13c) = -1 EINVAL (Invalid argument)
[pid 1737] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f31000
[pid 1737] write(6, "\3672\272 <\300W\16\340j\0210gr\207+\242\267\303JE\20oc\35\17K\337|O\242\274", 32) = 32
[pid 1737] close(6) = 0
[pid 1737] munmap(0xb6f31000, 4096) = 0
[pid 1737] getuid32() = 0
[pid 1737] setgid32(2000) = 0
[pid 1737] open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 6
[pid 1737] read(6, "65536\n", 31) = 6
[pid 1737] close(6) = 0
[pid 1737] socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6
[pid 1737] connect(6, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
[pid 1737] close(6) = 0
[pid 1737] socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 6
[pid 1737] connect(6, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
[pid 1737] close(6) = 0
[pid 1737] open("/etc/group", O_RDONLY|O_CLOEXEC) = 6
[pid 1737] _llseek(6, 0, [0], SEEK_CUR) = 0
[pid 1737] fstat64(6, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
[pid 1737] mmap2(NULL, 17, PROT_READ, MAP_SHARED, 6, 0) = 0xb6f31000
[pid 1737] _llseek(6, 17, [17], SEEK_SET) = 0
[pid 1737] fstat64(6, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
[pid 1737] munmap(0xb6f31000, 17) = 0
[pid 1737] close(6) = 0
[pid 1737] setgroups32(1, [2000]) = 0
[pid 1737] setuid32(2000) = 0
[pid 1737] chdir("/home/filexfer") = 0
[pid 1737] rt_sigaction(SIGPIPE, {SIG_DFL, [PIPE], SA_RESTART|0x4000000}, {SIG_IGN, [PIPE], SA_RESTART|0x4000000}, 8) = 0
[pid 1737] close(3) = 0
[pid 1737] close(4) = 0
[pid 1737] close(5) = 0
[pid 1737] execve("/bin/sh", ["sh", "-c", "/usr/lib/openssh/sftp-server"], [/* 6 vars */]) = 0
[pid 1737] brk(0) = 0xa0000
[pid 1737] uname({sys="Linux", node="unknown", ...}) = 0
[pid 1737] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 1737] mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fec000
[pid 1737] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 1737] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/tls/v7l/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/tls/v7l/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/tls/v7l/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/tls/v7l/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/tls/v7l/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/tls/v7l", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/tls/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/tls/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/tls/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/tls/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/tls/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/tls/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/tls", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/v7l/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/v7l/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/v7l/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/v7l/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/v7l/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/v7l/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/v7l/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/v7l", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/arm-linux-gnueabihf", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/tls/v7l/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/tls/v7l/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/tls/v7l/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/tls/v7l/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/tls/v7l/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/tls/v7l/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/tls/v7l", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/tls/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/tls/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/tls/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/tls/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/tls/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/tls/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/tls", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/v7l/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/v7l/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/v7l/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/v7l/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/v7l/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/v7l/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/v7l/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/v7l", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/usr/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/usr/lib/arm-linux-gnueabihf", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/tls/v7l/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/tls/v7l/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/tls/v7l/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/tls/v7l/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/tls/v7l/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/tls/v7l/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/tls/v7l/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/tls/v7l", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/tls/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/tls/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/tls/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/tls/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/tls/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/tls/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/tls", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/v7l/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/v7l/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/v7l/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/v7l/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/v7l/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/v7l/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/v7l/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/v7l", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/neon/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/neon/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/neon/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/neon", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/vfp/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 1737] stat64("/lib/vfp", 0xbec864f0) = -1 ENOENT (No such file or directory)
[pid 1737] open("/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 1737] read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\335\4\214D4\0\0\0"..., 512) = 512
[pid 1737] lseek(3, 887460, SEEK_SET) = 887460
[pid 1737] read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1480) = 1480
[pid 1737] lseek(3, 885236, SEEK_SET) = 885236
[pid 1737] read(3, "A4\0\0\0aeabi\0\1*\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 53) = 53
[pid 1737] fstat64(3, {st_mode=S_IFREG|0755, st_size=888940, ...}) = 0
[pid 1737] mmap2(0x448a8000, 928112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x448a8000
[pid 1737] mprotect(0x4497d000, 32768, PROT_NONE) = 0
[pid 1737] mmap2(0x44985000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd5000) = 0x44985000
[pid 1737] mmap2(0x44989000, 6512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x44989000
[pid 1737] close(3) = 0
[pid 1737] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6feb000
[pid 1737] set_tls(0xb6feb820, 0xb6febef8, 0x44817048, 0xb6feb820, 0xb6feb158) = 0
[pid 1737] mprotect(0x44985000, 8192, PROT_READ) = 0
[pid 1737] mprotect(0x44816000, 4096, PROT_READ) = 0
[pid 1737] getuid32() = 2000
[pid 1737] stat64("/etc/busybox.conf", 0xbec86b80) = -1 ENOENT (No such file or directory)
[pid 1737] getgid32() = 2000
[pid 1737] setgid32(2000) = 0
[pid 1737] setuid32(2000) = 0
[pid 1737] brk(0) = 0xa0000
[pid 1737] brk(0xc1000) = 0xc1000
[pid 1737] getpid() = 1737
[pid 1737] rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0
[pid 1737] rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART|0x4000000}, {SIG_DFL, [], 0}, 8) = 0
[pid 1737] getppid() = 1736
[pid 1737] getcwd("/home/filexfer", 4096) = 15
[pid 1737] rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
[pid 1737] rt_sigaction(SIGINT, {0x37dbc, ~[RTMIN RT_1], 0x4000000 /* SA_??? */}, NULL, 8) = 0
[pid 1737] rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
[pid 1737] rt_sigaction(SIGQUIT, {SIG_IGN, ~[RTMIN RT_1], 0x4000000 /* SA_??? */}, NULL, 8) = 0
[pid 1737] rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
[pid 1737] rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0x4000000 /* SA_??? */}, NULL, 8) = 0
[pid 1737] clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb6feb3c8) = 1738
[pid 1737] wait4(-1, Process 1738 attached
[pid 1737] <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 127}], 0, NULL) = 1738
[pid 1737] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1738, si_status=127, si_utime=0, si_stime=0} ---
[pid 1737] exit_group(127) = ?
[pid 1737] +++ exited with 127 +++
답변1
chroot 파일 시스템에 라이브러리가 누락되어 있다는 사실이 밝혀졌습니다 libnss*
. 많은 출력물을 검토하는 데 많은 시간을 소비하여 이를 발견했습니다 strace
.