|
Message-ID: <20110723211549.GA13803@openwall.com> Date: Sun, 24 Jul 2011 01:15:49 +0400 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: Re: Plugin formats "released" Jim, magnum - On Mon, Jul 04, 2011 at 03:18:21PM -0500, JFoug wrote: > Now that this has been released, I plan on basing any upcoming patches I > make, against this 'plugin version' of the jumbo. > > As it was released by magnum, could easily be a jumbo-3 (with a change to > params.h and any docs), with no functionality change, but simply converting > into the 'plugin' format. Frankly, I have mixed feelings about this plugin formats stuff, but since this is -jumbo, I accept. The dependency on GNU make is nasty, but it is tricky and maybe unreasonable to avoid it (e.g., running a configure script before make wouldn't be obviously better). So, I started with john-1.7.8-jumbo-2-plugin.diff (yes, I didn't use the tarball), did the renames with rename(1) (moved files _not_ to be renamed to a subdirectory temporarily), made sure things worked for me on Linux, then went on to modify things. Here are the changed bits: I did not understand the rationale behind some of: # Should work on Solaris and gmake PLUGFORMATS_SRCS: sh =if [ -f *_plug.c ]; then ls *_plug.c; fi PLUGFORMATS_SRCS += $(shell ls *_plug.c) PLUGFORMATS_OBJS = $(PLUGFORMATS_SRCS:.c=.o) So I simplified it to: # Requires GNU make (under Solaris, use "gmake") PLUGFORMATS_SRCS = $(wildcard *_plug.c) PLUGFORMATS_OBJS = $(PLUGFORMATS_SRCS:.c=.o) Then, I did not like the grep|sed|awk commands, which I simplified to single invocations of sed: fmt_externs.h: $(PLUGFORMATS_SRCS) Makefile $(SED) -n 's/^\(struct fmt_main [^ ]\+\) =.*/extern \1;/p' *_fmt_plug.c > fmt_externs.h fmt_registers.h: $(PLUGFORMATS_SRCS) Makefile $(SED) -n 's/^struct fmt_main \([^ ]\+\) =.*/john_register_one(\&\1);/p' *_fmt_plug.c > fmt_registers.h john.o: john.c fmt_externs.h fmt_registers.h $(CC) $(CFLAGS) $(OPT_NORMAL) john.c I think that relying on fewer tools makes this more reliable. I'd appreciate it if you test these changes on systems other than Linux while I proceed to review/merge other recent patches. 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.