From c13273a45a0cb27548096e743479a88c2be2517a Mon Sep 17 00:00:00 2001 From: uku Date: Fri, 13 Sep 2024 11:31:33 +0200 Subject: [PATCH] fix(overlay): add openssh patch for fhs envs --- exprs/openssh-fhs-fix.patch | 13 +++++++++++++ exprs/overlay.nix | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 exprs/openssh-fhs-fix.patch diff --git a/exprs/openssh-fhs-fix.patch b/exprs/openssh-fhs-fix.patch new file mode 100644 index 0000000..27cc5ce --- /dev/null +++ b/exprs/openssh-fhs-fix.patch @@ -0,0 +1,13 @@ +diff --git a/readconf.h b/readconf.h +index ded13c9..94f489e 100644 +--- a/readconf.h ++++ b/readconf.h +@@ -203,7 +203,7 @@ typedef struct { + #define SESSION_TYPE_SUBSYSTEM 1 + #define SESSION_TYPE_DEFAULT 2 + +-#define SSHCONF_CHECKPERM 1 /* check permissions on config file */ ++#define SSHCONF_CHECKPERM 0 /* check permissions on config file */ + #define SSHCONF_USERCONF 2 /* user provided config file not system */ + #define SSHCONF_FINAL 4 /* Final pass over config, after canon. */ + #define SSHCONF_NEVERMATCH 8 /* Match/Host never matches; internal only */ \ No newline at end of file diff --git a/exprs/overlay.nix b/exprs/overlay.nix index a99e1b5..dd8448f 100644 --- a/exprs/overlay.nix +++ b/exprs/overlay.nix @@ -10,10 +10,15 @@ final: prev: { }; }); + fhs-openssh = prev.openssh.overrideAttrs (old: { + patches = old.patches or [] ++ [ ./openssh-fhs-fix.patch ]; + }); + idea-ultimate-fhs = prev.buildFHSEnv { name = "idea-ultimate"; targetPkgs = pkgs: (with pkgs; [ + fhs-openssh stdenv.cc.cc.lib glfw3-minecraft openal