Commit Graph

83 Commits

Author SHA1 Message Date
Morgan Jones
ca5fb292c1 openssh: drop old patches that are now never evaluated 2026-07-07 20:17:00 -07:00
Morgan Jones
625b040143 openssh: 10.2p1 -> 10.3p1 2026-04-05 21:09:56 -07:00
Alexander Bantyev
2839911e81 various: add security-review team as a maintainer
Adds the @NixOS/security-review team as a maintainer to multiple
packages deemed to be important security-wise.

For the motivation of the package list, see:
https://github.com/NixOS/nixpkgs/issues/494349#issuecomment-4005099033
2026-03-05 15:19:44 +01:00
Markus Sütter
196b385317 various: add meta.identifier.cpeParts to a batch of packages 2026-02-02 09:22:55 +01:00
nixpkgs-ci[bot]
a2302e778c Merge master into staging-next 2025-12-24 00:18:15 +00:00
Morgan Jones
e6ab94024c openssh: add withAudit (default false)
libaudit linking should be controllable independently of the static
build and should explicitly be added to configureFlags for users
that need it.
2025-12-03 13:37:40 -08:00
Morgan Jones
b8d7d975b3 openssh: fix PKCS#11 key enumeration and pin entry
Arch has cherry-picked these commits to fix a bug in OpenSSH's PKCS#11
support; we should do them ourselves too.

https://gitlab.archlinux.org/archlinux/packaging/packages/openssh/-/issues/23

Replace our hand-rolled patch for the PKCS#11 tests with the
corresponding commits landing upstream.

Fixes: #466049
Signed-off-by: Morgan Jones <me@numin.it>
2025-11-28 14:18:47 -08:00
K900
c1f2e30990 Merge remote-tracking branch 'origin/staging-next' into staging 2025-10-26 16:51:01 +03:00
numinit
62c129dd33 pkgsStatic.openssh: fix build (#450865) 2025-10-26 07:55:26 +00:00
Morgan Jones
5c98215bcd openssh: fix PKCS#11 tests instead of disabling softhsm
This is PRed upstream. While we usually do not apply patches to OpenSSH
itself prior to them being merged, this patch simply affects the tests
and lets us re-enable softhsm support.

See: https://github.com/NixOS/nixpkgs/issues/453782
See: https://github.com/openssh/openssh-portable/pull/602
2025-10-22 22:17:41 -07:00
Ihar Hrachyshka
4a6c158fd6 openssh: --replace -> --replace-fail 2025-10-22 18:20:31 -04:00
Ihar Hrachyshka
061b844928 openssh: split out dev and man outputs
Splitting `dev` allows to reduce the closure size for static build from
150MB to 75MB.
2025-10-22 18:19:44 -04:00
nixpkgs-ci[bot]
ac9a250ff1 Merge staging-next into staging 2025-10-21 12:08:24 +00:00
Vladimír Čunát
5ee8efde22 opensshTest: nixfmt after the previous commit
I'm sorry.
2025-10-21 09:08:08 +02:00
Vladimír Čunát
e25ac51ecc opensshTest: drop softhsm (failing part of the tests)
https://github.com/NixOS/nixpkgs/issues/453782
2025-10-21 09:01:25 +02:00
Ihar Hrachyshka
192545a4d0 pkgsStatic.openssh: fix build
Fixes #445548
2025-10-10 21:35:43 -04:00
nixpkgs-ci[bot]
56806cd8a1 Merge staging-next into staging 2025-10-11 00:16:05 +00:00
Philip Taron
3ba43bda1d openssh: make the NixOS tests for openssh test the actual derivation being built 2025-10-10 08:45:06 -07:00
Luna Nova
e7fbed853b treewide: remove usages of obsolete pie hardening flag 2025-10-09 10:13:03 -07:00
Ben Wolsieffer
0de27edfbf openssh: remove softhsm ref when cross-compiling
softhsm is used for tests, which don't run when cross-compiling, but it
was accidentally included anyway due to a mistake in the preCheck
conditionals. This fixes the cross build on armv6l.
2025-08-06 23:38:09 -04:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Colin
38f9392f8c openssh: fix compilation to static hosts 2025-06-29 20:34:57 +00:00
Morgan Jones
827ab4b072 openssh: fix a 17 year old bug by using --with-mantype=doc
Using --with-mantype=man slightly mangles ssh docs:

- See #418140 for the discussion of the part of the issue that causes
  "Ns" to be interspersed throughout the text, which dates back (and
  was reproducible) on nixpkgs from 2007. We discovered several other
  unimplemented control sequences, including -nosplit, Qq, and Mt, as
  well as the lack of spacing.
- Note the comparisons at https://github.com/numinit/ssh-man-compare.

Has been around since deb889e5f2, possibly
even earlier.
2025-06-24 22:28:58 -07:00
K900
37a72a5aa2 Merge remote-tracking branch 'origin/staging-next' into staging 2025-05-29 12:02:16 +03:00
Morgan Jones
48959f25a4 openssh: fix Darwin and musl tests
Followup to #407077, disabling new tests that don't work on Darwin and musl.
2025-05-28 01:15:05 -07:00
Thomas Gerbet
39c7929c6e openssh: disable memlocking when building with PAM support
With the current OpenSSH version it can result in some crashes
preventing users to log in.

Upstream issue: https://bugzilla.mindrot.org/show_bug.cgi?id=3822

For reference Debian also disabled it for now:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103418
2025-05-28 08:18:33 +02:00
nixpkgs-ci[bot]
3f5733a8f9 Merge staging-next into staging 2025-05-26 18:06:16 +00:00
Aleksana
3a82036d0a openssh: Add patch notes (#402820) 2025-05-26 20:31:12 +08:00
Silvan Mosberger
a9a90f4bad openssh: Enable extra tests 2025-05-14 19:09:11 +02:00
Silvan Mosberger
2b94659998 openssh: Add locale archive patch note
Copied from b7af00b889
2025-04-29 15:48:05 +02:00
Morgan Jones
0f5bfe46dc openssh: add version check
Check the version of both ssh and sshd in an installCheckPhase.
Seems prudent given recent version shenanigans upstream:

https://www.openwall.com/lists/oss-security/2025/04/09/6
2025-04-15 01:22:16 -07:00
Morgan Jones
5792aff1cb openssh: drop dsaKeysSupport 2025-04-15 01:04:36 -07:00
Morgan Jones
2b75b132a1 openssh: enable --with-linux-memlock-onfault
This new configure option attempts to call the following as part of sshd
startup, simply warning if it fails:

`mlockall(MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT)`

From https://man7.org/linux/man-pages/man2/mlock.2.html:

> Since Linux 2.6.9, no limits are placed on the amount of memory
> that a privileged process can lock and the RLIMIT_MEMLOCK soft
> resource limit instead defines a limit on how much memory an
> unprivileged process may lock.

Since sshd is run as root, locking all current and future pages
also will not run into hypothetical OOM issues.
2025-04-15 01:04:35 -07:00
Aneesh Agrawal
aded50da10 openssh_gssapi, openssh_hpn: remove self (aneeshusa) from maintainers
I've never used either of these and I no longer have spare time to maintain these.

Add Philip Taron as maintainer per an in-person conversation at Planet Nix 2025.

Co-authored-by: Philip Taron <philip.taron@gmail.com>
2025-03-07 12:11:27 -08:00
Thomas Gerbet
1d4b238173 openssh, openssh_hpn, openssh_gssapi: 9.9p1 -> 9.9p2
Fixes CVE-2025-26465 and CVE-2025-26466.
https://www.qualys.com/2025/02/18/openssh-mitm-dos.txt

https://www.openssh.com/releasenotes.html#9.9p2
2025-02-18 13:46:49 +01:00
Artemis Tosini
60769ce173 openssh: Enable BSD auth on OpenBSD 2025-01-06 14:50:22 -08:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
sternenseemann
1fdd4348e4 openssh: add initrd-network-ssh nixos test to passthru.tests
openssh updates can break the sshd in initrd, as proven by the update to
9.8p1 (ref #323796). The corresponding test is not a channel blocker,
but should at least be looked at by maintainers updating openssh.
2024-11-30 18:34:24 +01:00
github-actions[bot]
683f8efd0d Merge staging-next into staging 2024-10-29 18:04:56 +00:00
Aleksana
b1669786f1 pkgsStatic.openssh: fix build (#278079) 2024-10-29 20:13:39 +08:00
Thomas Gerbet
f108380db7 openssh, openssh_hpn, openssh_gssapi: 9.8p1 -> 9.9p1 (#350699)
* openssh: 9.8p1 -> 9.9p1

Changes: https://www.openssh.com/releasenotes.html#9.9p1

* openssh_hpn: 9.8p1 -> 9.9p1

Changes: https://www.openssh.com/releasenotes.html#9.9p1

* openssh_gssapi: 9.8p1 -> 9.9p1

Changes:
https://www.openssh.com/releasenotes.html#9.9p1

---------

Co-authored-by: Ashish SHUKLA <ashish.is@lostca.se>
2024-10-25 18:06:31 +02:00
Artturin
f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Alyssa Ross
17648a4f57 openssh: fix building for musl with GCC 14 2024-09-13 20:51:50 +02:00
github-actions[bot]
0629545b27 Merge master into staging-next 2024-08-27 00:13:08 +00:00
Jade Lovelace
5dfdb09561 tree-wide: remove eelco as maintainer from things he no longer maintains
While preparing this change, I read the git blame on all of the files I
touched. I saw a working lifetime of building this system which we use
every day and love dearly and keep maintained ourselves. I saw commits
from a 14 year range between 2003 to 2017!! I could not be more thankful
for Eelco's work on building large parts of the foundation of nixpkgs
that all of us rely on now.

However, the end date of that range of the files I looked at the blame
on was 2017. I did not see surviving code from any newer date than that.
Looking at the Git logs, Eelco has been working on other things, and
that's totally fine.

However, it means that our maintenance metadata is out of date on a lot
of packages, and *that*'s the reason I am submitting this change. There
are a lot of packages that don't have anyone with their name on them to
be pinged if they need attention, even if they have had recent activity
(although it is never clear if recent activity was just someone fixing
it because ZHF or because the package actually matters to them).
There are a lot of packages with storied history that maybe don't need
to be in the set anymore at all since they have not been touched in
years; or maybe they are simply finished.

Empty maintainer lists should be a sign that we need to figure out who
maintains it or potentially remove it if it has rotted, and allowing the
maintainer list to be empty if it is already not maintained is part of a
healthy repository ecology.

Either way, I would like to have the maintenance metadata not mislead
anyone into sending Eelco emails about packages he doesn't, in practice,
work on anymore. I have not removed his name from everything; there are
some things that he is the upstream for or has worked on more recently,
for instance, like Nix, which I have left alone.
2024-08-21 01:17:45 -07:00
deinferno
e4eea8374c pkgsStatic.openssh: fix build 2024-08-19 11:09:17 +02:00
Elliot Cameron
e6f8f04f9e openssh: use krb5 dev output 2024-08-17 00:50:38 -04:00
nikstur
8677517558 openssh: put tests into passthru
openssh tests are very slow (they take ~30 mins because they are not
parallelized). This makes rebuilding (esp. after changes e.g. to
systemd) painful. Putting the tests into a separate derivation solves
this without losing any testing capability.

Debian does the same: https://packages.debian.org/sid/openssh-tests
2024-06-14 23:52:56 +02:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00