2014-09-14 06:50:39 +00:00
|
|
|
{ stdenv, fetchurl, fetchpatch }:
|
2011-08-22 15:24:24 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "super-3.30.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "${name}.tar.gz";
|
2018-06-28 18:43:35 +00:00
|
|
|
url = "https://www.ucolick.org/~will/RUE/super/${name}-tar.gz";
|
2014-09-14 06:50:39 +00:00
|
|
|
sha256 = "0k476f83w7f45y9jpyxwr00ikv1vhjiq0c26fgjch9hnv18icvwy";
|
2011-08-22 15:24:24 +00:00
|
|
|
};
|
|
|
|
|
2017-06-16 12:13:54 +00:00
|
|
|
prePatch = ''
|
2017-06-17 09:43:50 +00:00
|
|
|
# do not set sticky bit in nix store
|
2017-06-16 12:13:54 +00:00
|
|
|
substituteInPlace Makefile.in \
|
|
|
|
--replace "-o root" "" \
|
|
|
|
--replace 04755 755
|
|
|
|
'';
|
|
|
|
|
2014-09-14 06:50:39 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch { url = http://anonscm.debian.org/cgit/users/robert/super.git/plain/debian/patches/14-Fix-unchecked-setuid-call.patch;
|
|
|
|
sha256 = "08m9hw4kyfjv0kqns1cqha4v5hkgp4s4z0q1rgif1fnk14xh7wqh";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2011-08-22 15:24:24 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE";
|
|
|
|
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
];
|
2011-08-22 15:24:24 +00:00
|
|
|
|
|
|
|
installFlags = "sysconfdir=$(out)/etc localstatedir=$(TMPDIR)";
|
|
|
|
|
|
|
|
meta = {
|
2014-09-14 06:50:39 +00:00
|
|
|
homepage = http://www.ucolick.org/~will/;
|
2011-08-22 15:24:24 +00:00
|
|
|
description = "Allows users to execute scripts as if they were root";
|
|
|
|
longDescription =
|
|
|
|
''
|
|
|
|
This package provides two commands: 1) “super”, which allows
|
|
|
|
users to execute commands under a different uid/gid (specified
|
|
|
|
in /etc/super.tab); and 2) “setuid”, which allows root to
|
|
|
|
execute a command under a different uid.
|
|
|
|
'';
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2016-08-02 15:51:05 +00:00
|
|
|
};
|
2011-08-22 15:24:24 +00:00
|
|
|
}
|