tech-userlevel archive

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

Re: crypt_r()?



On Mon, 7 Feb 2022 16:12:17 +0100
Thomas Klausner <wiz%NetBSD.org@localhost> wrote:

> Hi!
> 
> I've been asked by the filezilla software developer if NetBSD will add
> crypt_r() as a thread-safe crypt() replacement.
> 
> Is anyone interested in working on this?
>  Thomas

Here is a cvs diff that implements crypt_r, as mouse pointed out
it is really trivial since __crypt is already essentially crypt_r.
I have tested this and it gives the same return strings as the old
crypt.
Some questions that I have. Where is the best place to define
struct crypt_data? should it really be in unistd.h like in FreeBSD or is
it better to have it in sys/types.h or some more fitting header. I
wonder since our unistd.h has no data definitions just declarations.
should crypt_r be under just _NETBSD_SOURCE or _NETBSD_SOURCE ||
_GNU_SOURCE since it is a GNU extension? 
__brypt has a declaration in brypt.c and in crypt.h, wonder why it is
in brypt.c since brypt.c includes crypt.h?
I would like nia, jhigh, christos, riastradh and others to look at the
diff to see that it is okay and correct.

 Niclas

Attachment: crypt_r-diff
Description: Binary data



Home | Main Index | Thread Index | Old Index