File: Add-a-test-for-bad-group-prefix.patch

package info (click to toggle)
libcap2 1%3A2.66-4%2Bdeb12u2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-proposed-updates
  • size: 1,868 kB
  • sloc: ansic: 8,716; sh: 1,072; makefile: 723
file content (26 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (2)
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