about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/util-linux
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2008-07-24 13:48:23 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2008-07-24 13:48:23 +0000
commit874804eb043e24ac2cf5f863ca91029ab590709a (patch)
treeadd0b34539a4379b1b2925d2e049aa678b9bc85a /pkgs/os-specific/linux/util-linux
parentc32f7569dcdb3e7609ee7dc77b8b10392829dedf (diff)
downloadnixlib-874804eb043e24ac2cf5f863ca91029ab590709a.tar
nixlib-874804eb043e24ac2cf5f863ca91029ab590709a.tar.gz
nixlib-874804eb043e24ac2cf5f863ca91029ab590709a.tar.bz2
nixlib-874804eb043e24ac2cf5f863ca91029ab590709a.tar.lz
nixlib-874804eb043e24ac2cf5f863ca91029ab590709a.tar.xz
nixlib-874804eb043e24ac2cf5f863ca91029ab590709a.tar.zst
nixlib-874804eb043e24ac2cf5f863ca91029ab590709a.zip
* Security fix for CVE-2007-5191.
svn path=/nixpkgs/trunk/; revision=12417
Diffstat (limited to 'pkgs/os-specific/linux/util-linux')
-rw-r--r--pkgs/os-specific/linux/util-linux/default.nix21
1 files changed, 14 insertions, 7 deletions
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix
index 0c7ebef7eb3b..8aed357d54cd 100644
--- a/pkgs/os-specific/linux/util-linux/default.nix
+++ b/pkgs/os-specific/linux/util-linux/default.nix
@@ -1,4 +1,4 @@
-args: with args;
+{stdenv, fetchurl, ncurses ? null}:
 
 stdenv.mkDerivation {
   name = "util-linux-2.13-pre7";
@@ -7,16 +7,23 @@ stdenv.mkDerivation {
     url = mirror://kernel/linux/utils/util-linux/testing/util-linux-2.13-pre7.tar.bz2;
     md5 = "13cdf4b76533e8421dc49de188f85291";
   };
-  
+
+  patches = [
+    # Fix for a local root exploit via mount/umount
+    # (http://www.gentoo.org/security/en/glsa/glsa-200710-18.xml).
+    (fetchurl {
+      url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/sys-apps/util-linux/files/util-linux-2.13-setuid-checks.patch?rev=1.1";
+      sha256 = "02ky7ljzqpx8ii3dfmjydw8nnhshpw2inwh6w1vqllz8mhn81jdf";
+    })
+  ];
+
   configureFlags = "--disable-use-tty-group";
 
-  buildInputs = [] 
-  	++ (if args ? ncurses then [args.ncurses] else [])
-  ;
+  buildInputs = stdenv.lib.optional (ncurses != null) ncurses;
 
-  preBuild = "
+  preBuild = ''
     makeFlagsArray=(usrbinexecdir=$out/bin usrsbinexecdir=$out/sbin datadir=$out/share exampledir=$out/share/getopt)
-  ";
+  '';
 
   # Hack to get static builds to work.
   NIX_CFLAGS_COMPILE = "-DHAVE___PROGNAME=1";