git.iko.soy/typeable/nixpkgs
on master help sign in
gradm: fix using gradm while the RBAC system is active

The built-in ACL prevents the gradm binary from loading dynamic libraries from the Nix store. Thus, once the RBAC system is activated, the gradm binary cannot be used. Fix by patching in rules to allow references to the Nix store where appropriate.

commitfdbf7dc8b38cd523804d342d2c153dfeb10cc83d authorJoachim Fasting <joachifm@fastmail.fm> dateSat 26 Nov 2016, 02:52 (10 years ago) parenta51378c
2 files changed+33
pkgs/os-specific/linux/gradm/default.nix+2 pkgs/os-specific/linux/gradm/gradm_nix_store.patch+31
pkgs/os-specific/linux/gradm/default.nix+2
@@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
1212 sha256 = "0y5565rhil5ciprwz7nx4s4ah7dsxx7zrkg42dbq0mcg8m316xrb";
1313 };
1414
15+ patches = [ ./gradm_nix_store.patch ];
16+
1517 nativeBuildInputs = [ bison flex ];
1618 buildInputs = [ pam ];
1719
pkgs/os-specific/linux/gradm/gradm_nix_store.patchnew file+31
@@ -0,0 +1,31 @@
1+diff -ruN a/gradm_adm.c b/gradm_adm.c
2+--- a/gradm_adm.c 2016-08-13 18:56:45.000000000 +0200
3++++ b/gradm_adm.c 2016-11-26 02:47:05.829718770 +0100
4+@@ -166,6 +166,8 @@
5+ ADD_OBJ("/usr/libx32", "rx");
6+ ADD_OBJ("/lib64", "rx");
7+ ADD_OBJ("/usr/lib64", "rx");
8++ ADD_OBJ("/nix/store", "h");
9++ ADD_OBJ("/nix/store/*/lib", "rx");
10+ ADD_OBJ(gradm_name, "x");
11+ ADD_OBJ(grpam_path, "x");
12+
13+@@ -286,6 +288,8 @@
14+ ADD_OBJ("/usr/lib32", "rx");
15+ ADD_OBJ("/lib64", "rx");
16+ ADD_OBJ("/usr/lib64", "rx");
17++ ADD_OBJ("/nix/store", "h");
18++ ADD_OBJ("/nix/store/*/lib", "rx");
19+ ADD_OBJ("/tmp", "");
20+ ADD_OBJ("/tmp/krb5cc_pam*", "rwcd");
21+ ADD_OBJ(grpam_path, "x");
22+@@ -369,6 +373,9 @@
23+ ADD_OBJ("/lib", "rx");
24+ ADD_OBJ("/lib32", "rx");
25+ ADD_OBJ("/lib64", "rx");
26++ ADD_OBJ("/nix/store", "h");
27++ ADD_OBJ("/nix/store/*/bin", "rx");
28++ ADD_OBJ("/nix/store/*/lib", "rx");
29+ ADD_OBJ("/usr", "rx");
30+ ADD_OBJ("/proc", "r");
31+ ADD_OBJ("/boot", "h");