Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pwhash?



On Fri, 15 Oct 2021 at 12:55, nia <nia%netbsd.org@localhost> wrote:
>
> The Argon2 code was originally added and documented in 2019 but was
> not enabled by default. There were also a few edge cases where it
> didn't work and the hash format differed from the reference
> implementation so recently I've been fixing it up.
>
> To build with Argon2 support you need MKARGON2=yes in mk.conf.
> However, since the past day or so this is the default.

I have the last bsd.own.mk with MKARGON2 in the default on flags; I
cannot understand why I am still getting:
...
➜  pwhash make USETOOLS=no
rm -f .gdbinit
touch .gdbinit
#   compile  pwhash/pwhash.o
gcc -O2   -fPIE    -std=gnu99    -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wno-sign-compare
-Wsystem-headers   -Wno-traditional   -Wa,--fatal-warnings
-Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra
-Wno-unused-parameter -Wno-sign-compare -Wold-style-definition
-Wsign-compare -Wformat=2  -Wno-format-zero-length  -Werror
-I/home/sysbuild/src/usr.bin/pwhash -DLOGIN_CAP  -c    pwhash.c -o
pwhash.o.o
ctfconvert -g -L VERSION -o pwhash.o pwhash.o.o && rm -f pwhash.o.o
#      link  pwhash/pwhash
gcc      -pie  -shared-libgcc  -Wl,--warn-shared-textrel -Wl,-z,relro
   -o pwhash  pwhash.o  -Wl,-rpath-link,/lib  -L=/lib -lcrypt -lutil
ctfmerge -t -g -L VERSION -o pwhash pwhash.o
...

It seems the conditional
.if ( defined(MKARGON2) && ${MKARGON2} != "no" )
CPPFLAGS+=      -DHAVE_ARGON2
.endif

in the Makefile is not fulfilled (this is even with non-existent /etc/mk.conf).

However, if I add 'MKARGON2=YES' to /etc/mk.conf, pwhash is built with it:

➜  pwhash make USETOOLS=no
rm -f .gdbinit
touch .gdbinit
#   compile  pwhash/pwhash.o
gcc -O2   -fPIE    -std=gnu99    -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wno-sign-compare
-Wsystem-headers   -Wno-traditional   -Wa,--fatal-warnings
-Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra
-Wno-unused-parameter -Wno-sign-compare -Wold-style-definition
-Wsign-compare -Wformat=2  -Wno-format-zero-length  -Werror
-DHAVE_ARGON2 -I/home/sysbuild/src/usr.bin/pwhash -DLOGIN_CAP  -c
pwhash.c -o pwhash.o.o
ctfconvert -g -L VERSION -o pwhash.o pwhash.o.o && rm -f pwhash.o.o
#      link  pwhash/pwhash
gcc      -pie  -shared-libgcc  -Wl,--warn-shared-textrel -Wl,-z,relro
   -o pwhash  pwhash.o  -Wl,-rpath-link,/lib  -L=/lib -lcrypt -lutil
ctfmerge -t -g -L VERSION -o pwhash pwhash.o

No idea...


Chavdar





-- 
----


Home | Main Index | Thread Index | Old Index