Commit 39cb4bd4 authored by Tom Fitzhenry's avatar Tom Fitzhenry Committed by tomf
Browse files

less: introduce withSecure flag

`--with-secure` is a hardening compile flag to disable potentially
dangerous commands within less(1).

References:

* https://man7.org/linux/man-pages/man1/less.1.html#SECURITY
* https://seclists.org/fulldisclosure/2014/Nov/74
parent 2ab53fad
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
, fetchpatch
, ncurses
, pcre2
, withSecure ? false
}:

stdenv.mkDerivation (finalAttrs: {
@@ -37,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
    # Look for 'sysless' in /etc.
    "--sysconfdir=/etc"
    "--with-regex=pcre2"
  ];
  ] ++ lib.optional withSecure "--with-secure";

  meta = {
    homepage = "https://www.greenwoodsoftware.com/less/";