File: 0001-pam_access-fix-group-name-match-regression.patch

package info (click to toggle)
pam 1.7.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,268 kB
  • sloc: ansic: 36,301; xml: 21,687; perl: 972; sh: 836; yacc: 412; lex: 64; makefile: 56; python: 21
file content (25 lines) | stat: -rw-r--r-- 884 bytes parent folder | download
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
From: "Dmitry V. Levin" <ldv@strace.io>
Date: Wed, 27 Nov 2024 20:00:00 +0000
Subject: [PATCH] pam_access: fix group name match regression

* modules/pam_access/pam_access.c (group_match): Fix the order
of arguments passed to group_name_or_gid_match.

Resolves: https://github.com/linux-pam/linux-pam/issues/860
---
 modules/pam_access/pam_access.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index 48e7c7e..11f6b92 100644
--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -763,7 +763,7 @@ group_match (pam_handle_t *pamh, char *tok, const char* usr, int debug)
     tok++;
     tok[strlen(tok) - 1] = '\0';
 
-    if (group_name_or_gid_match (pamh, usr, tok, debug))
+    if (group_name_or_gid_match (pamh, tok, usr, debug))
         return YES;
 
     return NO;