unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 55912@debbugs.gnu.org
Subject: [bug#55912] [PATCH] home: Add OpenSSH service.
Date: Mon, 13 Jun 2022 23:58:32 +0200	[thread overview]
Message-ID: <52f35ffdfd2f0f17679662d89c515b7611fbce77.camel@telenet.be> (raw)
In-Reply-To: <87czfcuche.fsf@gnu.org>

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

Ludovic Courtès schreef op ma 13-06-2022 om 11:41 [+0200]:
> > TCP only allows natural numbers up to some bound, and in practice
> > implementations only support non-zero natural numbers, so maybe the
> > predicate can be refined a bit?
> 
> We could do that, though that’s more code for little in return…

Input validation is generally considered good practice.  This has
recently been rediscovered in, say,
<https://lists.gnu.org/archive/html/guix-devel/2022-02/msg00140.html>.

The little extra code is trivial (just an new predicate doing some
bounds checks and exact-integer?) and:

  * I believe that simply implementing the tiny procedure is less
    expensive than doing a proper cost-benefit analysis

  * the cost is only once, it's not a recurring cost

  * the cost is trivial

  * the new predicate can benefit _all_ services handling network ports

  * it would benefit _all_ users of OpenSSH that might make a typo
    or such.  Likewise for other network services.

  * the benefit is not only once, it's recurring

  * cost of not doing checks:
    error messages that don't appear during "guix home reconfigure"
    inside Guix, and instead appear later during using the new Home
    from within external software even though the error was in the
    Guix Home.  Becomes rather complicated.

(Slight benefit, multiplied over many uses & much time -> large benefit
compared to the tiny one-time investment.)

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  parent reply	other threads:[~2022-06-13 21:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11 16:49 [bug#55912] [PATCH] home: Add OpenSSH service Ludovic Courtès
2022-06-11 19:51 ` Maxime Devos
2022-06-11 22:13   ` Maxime Devos
2022-06-13  9:41   ` Ludovic Courtès
2022-06-13 10:51     ` Maxime Devos
2022-06-13 12:02       ` Ludovic Courtès
2022-06-13 12:38         ` Maxime Devos
2022-06-13 21:58     ` Maxime Devos [this message]
2022-06-14  8:08       ` Ludovic Courtès
2022-06-15 20:29   ` [bug#55912] [PATCH v2] " Ludovic Courtès
2022-06-15 20:47     ` Maxime Devos
2022-06-16 10:47       ` Ludovic Courtès
2022-06-16 12:16         ` Maxime Devos
2022-06-16 12:31           ` Maxime Devos
2022-06-16 16:18           ` [bug#55912] [PATCH] " Ludovic Courtès
2022-06-16 16:45             ` Maxime Devos
2022-06-17 12:32               ` Ludovic Courtès
2022-06-17 12:42               ` Philip McGrath
2022-06-17 20:56                 ` Maxime Devos
2022-06-18 21:41     ` bug#55912: " Ludovic Courtès

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=52f35ffdfd2f0f17679662d89c515b7611fbce77.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=55912@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).