Re: crypt_r()?

2022-02-15 Thread Jason Thorpe
> On Feb 15, 2022, at 5:13 PM, Mouse wrote: > >> There really should be a function that takes a user name or ID and a clearte$ > > Maybe. But then you have a lot more failure modes and a lot more > possible attack surface. It would also mean that you can't check or > change passwords in

Re: crypt_r()?

2022-02-15 Thread Konrad Schroder
On 2/15/2022 5:04 PM, Mouse wrote: (2) Hashing password, which takes the password and the settings and returns an allocated string with the resulting hash. [...] I really don't like making them depend on malloc, though I have a hard time articulating what bothers me about it. I can't say

Re: crypt_r()?

2022-02-15 Thread Mouse
> There really should be a function that takes a user name or ID and a clearte$ Maybe. But then you have a lot more failure modes and a lot more possible attack surface. It would also mean that you can't check or change passwords in single-user mode without starting the magic daemon; that would

Re: crypt_r()?

2022-02-15 Thread Mouse
> There are two sensible interface contracts here: > (1) Verification only, which takes the password and the expected hash > and returns a bool. [...] > (2) Hashing password, which takes the password and the settings and > returns an allocated string with the resulting hash. [...] Well, I

Re: crypt_r()?

2022-02-15 Thread Jason Thorpe
> On Feb 15, 2022, at 3:30 PM, Joerg Sonnenberger wrote: > > Am Wed, Feb 16, 2022 at 12:04:16AM +0100 schrieb Niclas Rosenvik: >> do you mean that the interface should be >> crypt_r(const char *key, const char setting, char * storage, size_t >> *storage_len) >> where storage can be set to

Re: crypt_r()?

2022-02-15 Thread Joerg Sonnenberger
Am Wed, Feb 16, 2022 at 12:04:16AM +0100 schrieb Niclas Rosenvik: > do you mean that the interface should be > crypt_r(const char *key, const char setting, char * storage, size_t > *storage_len) > where storage can be set to NULL to return the needed storage size in > storage_len? No. There are

Re: crypt_r()?

2022-02-15 Thread Niclas Rosenvik
On Sat, 12 Feb 2022 23:32:31 +0100 Joerg Sonnenberger wrote: > Am Sat, Feb 12, 2022 at 05:25:11PM +0100 schrieb Niclas Rosenvik: > > On Mon, 7 Feb 2022 16:12:17 +0100 > > Thomas Klausner wrote: > > > > > Hi! > > > > > > I've been asked by the filezilla software developer if NetBSD > > > will