|
Message-ID: <89edc37d379166cd9f870da8e3c05fe9@smtp.hushmail.com> Date: Mon, 18 Mar 2013 01:41:05 +0100 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: All *2john programs should use basename of filename when put as ?login? field On 18 Mar, 2013, at 1:21 , Lukas Odzioba <lukas.odzioba@...il.com> wrote: > 2013/3/18 magnum <john.magnum@...hmail.com>: >> On 18 Mar, 2013, at 0:48 , Lukas Odzioba <lukas.odzioba@...il.com> wrote: >>> Now I am not really sure about misc.c. >>> We might need get_basename() in .c and .cpp files. >>> misc.c would be ok for C files but compiling it for C and CPP it makes a mess. >>> Now we have only 2cpp files I could live with copies of this function there. >> >> I think we can wrap all of misc.h as in the enclosed patch, and everything will be sweet. Is that not the case? > > This could help a bit but still we will have this type of problems: > 1) some other stuff is needed to compile file, but here we could just > add -D_JOHN_MISC_NO_LOG to Makefile That will result in a misc.o not suitable for next build of john - or if misc.o already existed, it might not be built with -D_JOHN_MISC_NO_LOG. A better alternative is to make gpg2john a symlink to john just like many others. > 2) C-strings vs CPP strings Not sure I understand. Maybe you should just add a separate get_basename.cpp file then. Ideally we should port all C++ files to C. > Currently I am working on C files, I just made this changes it > compiles cleanly but I need to get some test data. > If you guys have something on your hdd that you used to test utils > please post it. > > Lukas > <get_basename-r0.diff> strnzcpy(retmem, base, retsize < 256 ? retsize : 256); The ternary is not needed. Just use strnzcpy(retmem, base, sizeof(retmem)); magnum
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.