Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 28 May 2015 15:23:27 +0530
From: Sayantan Datta <std2048@...il.com>
To: john-dev <john-dev@...ts.openwall.com>
Subject: Re: Signal handling within john formats.

On Wed, May 27, 2015 at 1:01 PM, Sayantan Datta <std2048@...il.com> wrote:

> Hi all,
>
> I'd like to use signal handling functions - alarm() and sigaction() within
> a format. Howver using them disrupts status checking, even if I restore to
> the previous signal handler after I'm done using signals.
>
> The sequence of function calls within the format is as follows:
>
> sigaction(SIGALARM, &set_signal, &old_signal);
> alarm(x);
> .
> .
> .
> alarm(0);
> sigaction(SIGALARM, &old_signal, NULL);
>
>
> But the above sequence fails to restore normal JtR signal handling. So,
> what's missing?
>
> Regards,
> Sayantan
>

Turns out restoring previous signal handler is not enough; alarm() function
interferes with setitimer() function. So, set setitimer() must also be
saved before using alarm() and then restored after calling alarm().

Regards,
Sayantan

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.