Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 10 Sep 2009 09:27:10 +0400
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: distro patches

On Thu, Aug 20, 2009 at 07:14:50PM -0600, RB wrote:
> The first patch (mkdir-sandbox) adds a check for EACCES against the
> return value of the mkdir() call in src/path.c that makes it more
> compatible with Gentoo's 'sandbox' build tool.

Why do they invoke JtR during package build, exactly?  If they do it to
test JtR, then merely letting the mkdir() call fail may be insufficient.
Two other issues are config file reads and possible binary fallbacks
(e.g., SSE2 to MMX).  When invoked, JtR built for system-wide install
will access certain pathnames outside of the build tree, which would be
wrong for a test during package build.

I've approached the problem differently, introducing the "make check"
target and the corresponding code into JtR.  These changes are currently
in the CVS tree:

http://cvsweb.openwall.com/john

You may also go one level up to see the john.spec file we use to build
the package on Owl.  It makes use of the binary fallbacks and now also
of "make check".  On 32-bit x86, three "john" binaries are built: plain
32-bit x86, MMX, and SSE2.  When building on a system capable of SSE2,
all three are tested during package build.  When building on a system,
say, capable of MMX but not of SSE2, two of the three binaries are
tested for real (the SSE2 one prints a "Sorry ..." message, yet exits
"successfully" because this failure to test the SSE2 code does not
indicate a build error).  The SSE2 and MMX binaries are fallback-enabled,
yet this fallback functionality is disabled for the magic invocations by
"make check" (otherwise a system-installed binary could get invoked via
the fallback).

Please have a look and maybe let the Gentoo folks know.

> The second and third (stackdef.S and all-5-stackdef.S) patches are the
> ubiquitous set that prevents dire warnings in environments that are
> strict about stack executability.  I've split them so it's clear which
> applies to the core tree and which applies to the all-5 patchset.

I've added:

#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",@progbits
#endif

to all *.S files in the official JtR tree currently in CVS.

Thanks,

Alexander


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.