All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx+linux-man@kernel.org>
To: Rich Felker <dalias@libc.org>
Cc: Vincent Lefevre <vincent@vinc17.net>,
	 Alejandro Colomar <alx@kernel.org>,
	linux-man@vger.kernel.org, libc-alpha@sourceware.org,
	 Walter Harms <wharms@bfs.de>,
	~hallyn/shadow@lists.sr.ht, musl@lists.openwall.com
Subject: Re: [musl] Re: [PATCH v1] man/man3/crypt.3: These functions accept many algorithms, not only DES
Date: Thu, 12 Nov 2026 15:07:14 +0100	[thread overview]
Message-ID: <avXFw_RUi0C4Ta1V@devuan> (raw)
In-Reply-To: <20261112135501.GI5716@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]

Hi Rich,

> Date: 2026-11-12 08:55:01-0500
> From: Rich Felker <dalias@libc.org>
>
> On Thu, Nov 12, 2026 at 02:45:16PM +0100, Vincent Lefevre wrote:
> > On 2026-11-12 14:23:08 +0100, Alejandro Colomar wrote:
> > > Hmm, yeah, I didn't intend to say POSIX is bad; I just wanted to let
> > > people know that POSIX is irrelevant about crypt(3) these days (as Rich
> > > said).  Perhaps:
> > > 
> > > 	The POSIX specification is significantly outdated,
> > > 	and all systems extend it significantly.
> > > 
> > > What do you think?
> > 
> > OK for me.
> 
> It's not "outdated". It just does not mandate particular algorithms
> but leaves these choices up to the implementation. As usual the scope
> of POSIX is what applications need to know to interface with the
> system, not administrative policy. This is why POSIX doesn't define
> things like mount, how init works, etc. either. They are in the scope
> of things that applications generally don't have to care about; only
> system components do.

But is the POSIX specification really useful for applications?
An application is probably not interested in knowing that it shall
pass two characters as the salt from the set './[A-Za-z]'.
An application should not rely on the specified return value either.

> 
> I do think there are changes to the POSIX crypt spec that could make
> it better, like defining more errors and specifying explicitly that
> salts beginning with '$' and '_' select additional
> implementation-defined algorithms and settings, etc. But overall the
> issue here is just a difference in expectation, not anything
> inherently bad.

I agree it's not inherently bad.  It's just that extensions have grown
for a long time, and deviated between themselves for various reasons
(most notably in the return value), enough that programmers must be
aware of too many implementation-defined details that they should
entirely ignore POSIX.


Cheers,
Alex

> Rich
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-11-12 14:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 23:58 [PATCH v1] man/man3/crypt.3: These functions accept many algorithms, not only DES Alejandro Colomar
2026-11-10  0:01 ` Alejandro Colomar
2026-11-11 15:05   ` Serge E. Hallyn
2026-11-11 18:55     ` Alejandro Colomar
2026-11-11 21:13       ` [musl] " Rich Felker
2026-11-11 21:43         ` Alejandro Colomar
2026-11-12  1:52   ` Vincent Lefevre
2026-11-12  2:53     ` Rich Felker
2026-11-12  3:29       ` Vincent Lefevre
2026-11-12  3:37         ` [musl] " Rich Felker
2026-11-12 10:28           ` Alejandro Colomar
2026-11-12 11:40             ` Vincent Lefevre
2026-11-12 12:08               ` Alejandro Colomar
2026-11-12 13:15                 ` Vincent Lefevre
2026-11-12 13:26                   ` Alejandro Colomar
2026-11-12 12:08             ` Rich Felker
2026-11-12 12:27               ` Alejandro Colomar
2026-11-12 12:41                 ` Szabolcs Nagy
2026-11-12 13:12                   ` Alejandro Colomar
2026-11-12 13:27                     ` Vincent Lefevre
2026-11-12 13:17                 ` Vincent Lefevre
2026-11-12 13:23                   ` Alejandro Colomar
2026-11-12 13:45                     ` Vincent Lefevre
2026-11-12 13:55                       ` Rich Felker
2026-11-12 14:07                         ` Alejandro Colomar [this message]
2026-11-12 14:43                           ` Rich Felker
2026-11-12 14:58                             ` Alejandro Colomar
2026-11-12 18:08                               ` Rich Felker
2026-11-12 22:22                                 ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avXFw_RUi0C4Ta1V@devuan \
    --to=alx+linux-man@kernel.org \
    --cc=alx@kernel.org \
    --cc=dalias@libc.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=musl@lists.openwall.com \
    --cc=vincent@vinc17.net \
    --cc=wharms@bfs.de \
    --cc=~hallyn/shadow@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.