1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From: "Andrew G. Morgan" <morgan@kernel.org>
Date: Sun, 16 Feb 2025 20:17:08 -0800
Subject: Add a test for bad group prefix.
The previous commit fixed a bug with the config parsing in pam_cap.
This is a test that we don't regress against that fix.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
---
pam_cap/sudotest.conf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pam_cap/sudotest.conf b/pam_cap/sudotest.conf
index ff528ce..b73244d 100644
--- a/pam_cap/sudotest.conf
+++ b/pam_cap/sudotest.conf
@@ -10,6 +10,9 @@ cap_setuid,cap_chown @three
# neither of these should fire
cap_chown beta gamma
+# just alpha, but the wrong prefix - so should be ignored
+!cap_chown,cap_setgid +one
+
# just alpha
!cap_chown,cap_setuid @one
|