Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 25 Apr 2016 00:30:27 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: System wide build

Claudio,

On Sun, Apr 24, 2016 at 04:52:17PM +0000, Claudio Andr?? wrote:
> Solar Designer <solar@...> writes:
> > > This is not ugly but the 'patch' for JOHN_SYSTEMWIDE_EXEC is going to be.
> > 
> > What do you mean?
> 
> I was expecting you guys to dislike the hole idea. I will create a packager 
> patch (not suitable for merge) and I like the idea to use only $JOHN for 
> system wide 'self contained' builds ). The excerpt below might clarify.
> 
> +	puts("System-wide exec: " "$JOHN/");
> +	puts("System-wide home: " "$JOHN/");

Why do you need these two lines, and why put the "$JOHN/" in separate
quotes?  Don't these two lines always print literally this? -

System-wide exec: $JOHN/
System-wide home: $JOHN/

> If a patch like the original one get accepted, I will have to think again.

Please do think again assuming that a patch like the original one gets
accepted into jumbo.

> -#ifdef JOHN_SYSTEMWIDE_EXEC
> +#if defined(JOHN_SYSTEMWIDE_EXEC) && !defined(_SNAP)

Why not just avoid having JOHN_SYSTEMWIDE_EXEC set in the snap package,
if you need the #else code version here?

> +	if (argv[0]) {
> +		int dos=0;
> +		if (!john_home_path) {
> +			pos = strrchr(argv[0], '/');
> +			if (!pos) {
> +				pos = strrchr(argv[0], '\\'); // handle this 
> for MSVC and MinGW which use 'DOS' style C:\path\run\john  syntax.
> +				if (pos>argv[0] && argv[0][1] == ':') {
> +					argv[0] += 2;
> +					dos = 1;
> +				}
> +			}

FWIW, this code had been introduced by Jim.  Cygwin and DJGPP manage to
work well without it, but maybe that's due to them translating to
backward to forward slashes internally.  Anyway, you should keep this
as-is in your current changes, as it's a separate topic.

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.