Package: tor
Version: 0.1.2.13-1

I have tor running in a minimal chroot jail.  Since it doesn't have
a copy of /etc/passwd in there, the getpwuid(uid) call in
debian/patches/06_add_compile_time_defaults.dpatch:debian_running_as_debiantor
fails.

This leads to a -1 return value from debian_config_fix_defaults(), which
causes options_init_from_torrc() to bomb out, and eventually config_free
tries to free an improperly initialized structure and assert fails.

First of all, the assert fail is a bug.

Second, perhaps the patch should either:
- Fail more gracefully when the getpwuid() call fails, perhaps just
  doing nothing as tor did before the patch, or
- Log an error if it's going to make the program not run.

# /etc/init.d/tor start
Raising maximum number of filedescriptors (ulimit -n) to 8192.
Starting tor daemon: tor...
Apr 27 09:57:55.667 [notice] Tor v0.1.2.13. This is experimental software. Do 
not rely on it for strong anonymity.
Apr 27 09:57:55.668 [warn] Could not get passwd information for 126.
Apr 27 09:57:55.668 [err] config.c:2048: config_free: Assertion options failed;
aborting.
config.c:2048 config_free: Assertion options failed; aborting.
./tor: line 104: 32421 Aborted                 (core dumped) start-stop-daemon 
--start --quiet --oknodo --chroot "$HOME" --chuid debian-tor:debian-tor 
--pidfile $_TORPID $NICE --exec $DAEMON -- $ARGS


(I've developed a trick for keeping an absolutely minimal chroot jail
but still sharing libraries, even though the jail isn't on the same
file system as /lib.  Basically, I make a "/lib/libs.tor" directory,
hard-link only the required libraries into it, then bind mount that
onto $JAIL/lib.  $JAIL/lib/libc-2.5.so ends up being exactly the same
inode as /lib/i686/cmov/libc-2.5.so.)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to