strange moment in chroot environment

Sergey Velikanov [UzPAK] vgray at uzpak.uz
Sun Oct 3 23:46:00 PDT 2004


Hi

I use "pw" in chroot environment, everything is work, but pw
always says that "unable to parse auth.conf", I've discovered that
error appear when pw call properties_read from libutil, I can't
understand why? I run "strace" twice, in chroot environment and normal
environment I discover next difference ( also difference I soo when
run proftpd in chroot and normal environments)

Could anybody help me to solve this problem.

> This is chroot

>open("1
>", O_RDONLY) = -1 ENOENT (No such file or directory)
>issetugid(0x280b1434) = 0
>open(" %e %H:%M:%S %Z %Y", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat(3, {st_mode=S_IFBLK|S_ISUID|S_ISGID|0440, st_rdev=makedev(108, 1935999081), ...}) = 0 
write(3, "2004-09-27 11:47:02 [root:groupa"..., 47) = 47 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
open("/etc/group", O_RDONLY) = 4 
fstat(4, {st_mode=057516, st_size=8511913699829643361, ...}) = 0 
lseek(4, 0, SEEK_CUR) = 0 
lseek(4, 0, SEEK_SET) = 0 
read(4, "# $FreeBSD: src/etc/group,v 1.28"..., 16384) = 738 
close(4) = 0 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
gettimeofday({7, 7}, NULL) = 0 
gettimeofday({17, 18}, NULL) = 0 
access("/bin/sh", X_OK) = 0 
lstat("/etc/login.conf", {st_mode=S_IFBLK|S_ISGID|S_ISVTX|0145, st_rdev=makedev(99, 543883361), ...}) = 0 
stat(": %m", {st_mode=0154162, st_size=18446700587165669490, ...}) = 0 
open("rьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪДьЪЪrьЪЪrьЪЪrьЪЪщьЪЪrьЪЪrьЪЪrьЪЪrьЪЪжьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪ^EыЪЪrьЪЪrьЪЪrьЪЪКьЪЪrьЪ 
fcntl(4, F_SETFD, FD_CLOEXEC) = 0 
read(4, "\0\6\25a\0\0\0\2\0\0\4\322\0\0@\0\0\0\0\16\0\0\1\0\0\0"..., 260) = 260 
lseek(4, 32768, SEEK_SET) = 32768 
read(4, "\16\0\371?\333=\323=\262;\255;\2179\2139n7h7I5B5#5\r5\356"..., 16384) = 16384 
close(4) = 0 
open("/etc/auth.conf", O_RDONLY) = 4 
read(4, "\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"..., 4096) = 231 
read(4, "", 4096) = 0 
close(4) = 0 
gettimeofday({4294967295, 4294967295}, NULL) = 0 
socket(PF_UNIX, SOCK_DGRAM, 0) = 4 
fcntl(4, F_SETFD, FD_CLOEXEC) = 0 
connect(4, {sa_family=0xff /* AF_??? */, sa_data="-./012345\377\377\377\377\377"}, 106) = -1 ENOENT (No such file or directory 
connect(4, {sa_family=0x32 /* AF_??? */, sa_data=".5.2.1 2001/05"}, 106) = 0 
sendto(4, "/24 12:20:02 markm Exp $\0$1$\0$\0\0"..., 74, 0, NULL, 0) = 74 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
fork() = 1649 
--- SIGCHLD (Child exited) --- 


> This is normal
>open("1
>", O_RDONLY) = 4
>fstat(4, {st_mode=035115, st_size=7309429057448327794, ...}) = 0
>read(4, "ectory\0No such process\0Interrupt"..., 7944) = 56
close(4) = 0 
fstat(3, {st_mode=S_IFCHR|0155, st_rdev=makedev(111, 1953824815), ...}) = 0 
write(3, "2004-09-27 10:44:44 [root:groupa"..., 4 = 48 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
open("/etc/group", O_RDONLY) = 4 
fstat(4, {st_mode=057516, st_size=8511913699829643361, ...}) = 0 
lseek(4, 0, SEEK_CUR) = 0 
lseek(4, 0, SEEK_SET) = 0 
read(4, "# $FreeBSD: src/etc/group,v 1.28"..., 16384) = 443 
close(4) = 0 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
gettimeofday({7, 7}, NULL) = 0 
gettimeofday({17, 18}, NULL) = 0 
access("/bin/sh", X_OK) = 0 
lstat("/etc/login.conf", {st_mode=S_IFBLK|S_ISGID|S_ISVTX|0145, st_rdev=makedev(99, 543883361), ...}) = 0 
stat(": %m", {st_mode=0154162, st_size=18446700587165669490, ...}) = 0 
open("rьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪДьЪЪrьЪЪrьЪЪrьЪЪщьЪЪrьЪЪrьЪЪrьЪЪrьЪЪжьЪЪrьЪЪrьЪЪrьЪЪrьЪЪrьЪЪ.ыЪЪrьЪЪrьЪЪrьЪЪКьЪЪrьЪЪ 
fcntl(4, F_SETFD, FD_CLOEXEC) = 0 
read(4, "\0\6\25a\0\0\0\2\0\0\4\322\0\0@\0\0\0\0\16\0\0\1\0\0\0"..., 260) = 260 
lseek(4, 32768, SEEK_SET) = 32768 
read(4, "\16\0\371?\333=\323=\262;\255;\2179\2139n7h7I5B5#5\r5\356"..., 16384) = 16384 
close(4) = 0 
open("/etc/auth.conf", O_RDONLY) = 4 
read(4, "\16\30:`\213\16\236l>\212\36\260\301w\25\327\'K1\275\332"..., 4096) = 231 
read(4, "", 4096) = 0 
close(4) = 0 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
stat("/etc/nsswitch.conf", {st_mode=01, st_size=42949672969, ...}) = 0 
fork() = 1279 
--- SIGCHLD (Child exited) ---  
 


Sergey Velikanov
Technical  Division
National Data Network "UzPAK"
tel +(99871) 114-6326
e-mail:  vgray at uzpak.uz
http://www.uzpak.uz/




More information about the freebsd-questions mailing list