Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff -ruN a/gradm_adm.c b/gradm_adm.c | ||
--- a/gradm_adm.c 2016-08-13 18:56:45.000000000 +0200 | ||
+++ b/gradm_adm.c 2016-11-26 02:47:05.829718770 +0100 | ||
@@ -166,6 +166,8 @@ | ||
ADD_OBJ("/usr/libx32", "rx"); | ||
ADD_OBJ("/lib64", "rx"); | ||
ADD_OBJ("/usr/lib64", "rx"); | ||
+ ADD_OBJ("/nix/store", "h"); | ||
+ ADD_OBJ("/nix/store/*/lib", "rx"); | ||
ADD_OBJ(gradm_name, "x"); | ||
ADD_OBJ(grpam_path, "x"); | ||
|
||
@@ -286,6 +288,8 @@ | ||
ADD_OBJ("/usr/lib32", "rx"); | ||
ADD_OBJ("/lib64", "rx"); | ||
ADD_OBJ("/usr/lib64", "rx"); | ||
+ ADD_OBJ("/nix/store", "h"); | ||
+ ADD_OBJ("/nix/store/*/lib", "rx"); | ||
ADD_OBJ("/tmp", ""); | ||
ADD_OBJ("/tmp/krb5cc_pam*", "rwcd"); | ||
ADD_OBJ(grpam_path, "x"); | ||
@@ -369,6 +373,9 @@ | ||
ADD_OBJ("/lib", "rx"); | ||
ADD_OBJ("/lib32", "rx"); | ||
ADD_OBJ("/lib64", "rx"); | ||
+ ADD_OBJ("/nix/store", "h"); | ||
+ ADD_OBJ("/nix/store/*/bin", "rx"); | ||
+ ADD_OBJ("/nix/store/*/lib", "rx"); | ||
ADD_OBJ("/usr", "rx"); | ||
ADD_OBJ("/proc", "r"); | ||
ADD_OBJ("/boot", "h"); |