You are not logged in.

#1 2011-10-15 20:08:44

misc
Member
From: Bavaria, Germany
Registered: 2010-03-22
Posts: 115

[SOLVED] Debugging fgetty-pam (or any other getty?)

fgetty-pam (fgetty "patched for PAM-support", e.g. with SHA-2 support) immediately crashes with SIGSEGV when I enter my user's password, regardless it being correct or actually hashed with SHA512 instead of MD5. (mingetty and agetty work fine, as does the stock fgetty with MD5.)

So I'm trying to get a trace. Trouble is, I can't do that with gdb (at least via the usual way) as fgetty therein complains about "warning: could not set controlling tty!", followed by a useless "pipe did not return fd 3" exit.

valgrind (with --trace-children=yes; --log-file=… results in an empty file) appears to function, but only by sending its messages to fgetty's target tty. (/dev/vcs# contains the corresponding tty's current content, but without any newline characters.) I. e., I have no idea how to retrieve valgrind's output from there.

Does somebody know a way to get that trace? Thanks!

edit: “setterm -append [tty #]” in a loop could do the trick. I wonder if there aren't settings to do this within gdb, though.

Last edited by misc (2012-08-12 14:02:22)

Offline

#2 2011-10-16 12:33:27

hiciu
Member
Registered: 2010-08-11
Posts: 89

Re: [SOLVED] Debugging fgetty-pam (or any other getty?)

You could try to run fgetty-pam without gdb and then try one of these:

gdb --pid=$pid
strace -p $pid

Last edited by hiciu (2011-10-16 12:34:27)

Offline

#3 2011-10-16 22:12:09

misc
Member
From: Bavaria, Germany
Registered: 2010-03-22
Posts: 115

Re: [SOLVED] Debugging fgetty-pam (or any other getty?)

That worked indeed. Thank you.

Offline

Board footer

Powered by FluxBB