[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#6702) slappasswd prompts missing



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 11/11/10 20:51, David Gessel wrote:
> Excellent.
> 
> Xin Li had a partial patch earlier tonight that got the prompts directed properly to console.

Thanks.

To Howard,

I think getpassphrase(3) is Solaris specific interface and not part of
standard.  On FreeBSD, getpass(3) returns a buffer pointer that contains
at most 128 (_PASSWORD_LEN) characters, which should fulfill the need of
OpenBSD but shorter than Solaris[1] which have 256, not counting the
terminating nul character.

Note that FreeBSD do have a readpassphrase(3) extension which provide
more flexibility.  I am not sure, however, whether we should implement
the Solaris behavior for getpassphrase(3), as it's not a standard
defined interface?  Is there any other operating system that provide
getpassphrase(3) and have the same behavior?

If it's desirable we could have it implemented on FreeBSD this way:

=================
char *
getpassrase(const char *prompt)
{
        static char buf[256 + 1];

        return(readpassphrase(prompt, buf, sizeof(buf), RPP_ECHO_OFF));
}
=================

Please advise, thanks!

[1]
http://docs.sun.com/app/docs/doc/816-5168/getpassphrase-3c?l=en&n=1&a=view

> -------- Original Message --------
> Subject: Re: (ITS#6702) slappasswd prompts missing
> From: Howard Chu <hyc@symas.com>
> To: gessel@blackrosetech.com
> Date: Thu Nov 11 2010 19:18:29 GMT-0800 (Pacific Standard Time)
> 
>> Apparently FreeBSD doesn't provide a usable getpassphrase() in its libc, so a 
>> replacement in the OpenLDAP code is used instead. The OpenLDAP code is now 
>> fixed in HEAD.
>>


- -- 
Xin LI <delphij@delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!	       Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iQEcBAEBCAAGBQJM3YW3AAoJEATO+BI/yjfB2jsIANUBBR2Cu/uhd7w8SDmfWJkL
UcibY5xL4i1gg2CM2DR/SgVqUYF/SHnGmMECgmu7CVRvXRNPn7Zp7TzhfYJgM7SJ
lYqE5+uajyGUt3N3z7bB4BT9GF6PTyXhWUDsdxc1IHcQ2Dvpq/3Ih7vuCQmAimCv
NJ9CXQYJPLflRo8RAMmNtiYeiZjMWK9PjrfC7CuAYKPvhKGFMQ5o7NXBZ8T+16WC
Igbw7DKALAPBZmV2hXbwMQAYJ8hBUkDlph2U8k7zBTfIkWSqx+DDeY/CaOmUnb9A
puUTm3WEYI2MxwlOVLnvy7QRNFsXejFvXkZN5ZTPoDbBT7MZRFrOn9gKQRGF4D8=
=9iQc
-----END PGP SIGNATURE-----