2022-04-28 14:30:46 +01:00
|
|
|
{ stdenv, lib, fetchurl, fetchpatch, autoreconfHook, docutils, pkg-config
|
2021-03-14 16:11:48 +00:00
|
|
|
, libkrb5, keyutils, pam, talloc, python3 }:
|
2012-08-30 16:39:50 +01:00
|
|
|
|
2010-06-03 15:28:48 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "cifs-utils";
|
2021-12-11 20:35:11 +00:00
|
|
|
version = "6.14";
|
2012-08-30 16:39:50 +01:00
|
|
|
|
2010-06-03 15:28:48 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://samba/pub/linux-cifs/cifs-utils/${pname}-${version}.tar.bz2";
|
2021-12-11 20:35:11 +00:00
|
|
|
sha256 = "sha256-ZgnoB0tUISlf8BKjHwLM2aBYQVxhnIE2Lrt4jb8HVrg=";
|
2010-06-03 15:28:48 +01:00
|
|
|
};
|
|
|
|
|
2022-04-28 14:30:46 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# Fix buffer-overflow in handling of ip= parameter in mount.cifs
|
|
|
|
# https://www.openwall.com/lists/oss-security/2022/04/27/5
|
|
|
|
name = "CVE-2022-27239.patch";
|
|
|
|
url = "https://github.com/piastry/cifs-utils/commit/007c07fd91b6d42f8bd45187cf78ebb06801139d.patch";
|
|
|
|
sha256 = "sha256-3uoHso2q17r2bcEW+ZjYUWsW4OIGYA7kxYZxQQy0JOg=";
|
|
|
|
})
|
2022-04-28 14:37:14 +01:00
|
|
|
(fetchpatch {
|
|
|
|
# Fix disclosure of invalid credential configuration in verbose mode
|
|
|
|
name = "CVE-2022-29869.patch";
|
|
|
|
url = "https://github.com/piastry/cifs-utils/commit/8acc963a2e7e9d63fe1f2e7f73f5a03f83d9c379.patch";
|
|
|
|
sha256 = "sha256-MjfreeL1ME550EYK9LPOUAAjIk1BoMGfb+pQe3A1bz8=";
|
|
|
|
})
|
2022-04-28 14:30:46 +01:00
|
|
|
];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook docutils pkg-config ];
|
2018-08-29 07:32:49 +01:00
|
|
|
|
2021-03-14 16:11:48 +00:00
|
|
|
buildInputs = [ libkrb5 keyutils pam talloc python3 ];
|
2015-01-03 01:21:02 +00:00
|
|
|
|
2021-01-19 19:10:03 +00:00
|
|
|
configureFlags = [ "ROOTSBINDIR=$(out)/sbin" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
2020-12-12 06:24:38 +00:00
|
|
|
# AC_FUNC_MALLOC is broken on cross builds.
|
|
|
|
"ac_cv_func_malloc_0_nonnull=yes"
|
|
|
|
"ac_cv_func_realloc_0_nonnull=yes"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-01-19 19:10:03 +00:00
|
|
|
homepage = "https://wiki.samba.org/index.php/LinuxCIFS_utils";
|
2010-06-03 15:28:48 +01:00
|
|
|
description = "Tools for managing Linux CIFS client filesystems";
|
2015-01-03 01:21:02 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.lgpl3;
|
2010-06-03 15:28:48 +01:00
|
|
|
};
|
|
|
|
}
|