File: pam_cgroup-Revert-broken-cache-usage.patch

package info (click to toggle)
libcgroup 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,840 kB
  • sloc: ansic: 15,527; python: 8,219; cpp: 5,652; sh: 5,209; yacc: 470; makefile: 419; lex: 38
file content (38 lines) | stat: -rw-r--r-- 1,437 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
27
28
29
30
31
32
33
34
35
36
37
38
From: Christian Kastner <ckk@debian.org>
Date: Fri, 2 Oct 2015 14:41:56 +0200
Subject: pam_cgroup: Revert broken cache usage

This reverts the following upstream commit:

	commit ac6173f74922b7dbc46e87370b9bc42cd0fa892d
	Author: Peter Schiffer <pschiffe@redhat.com>
	Date: Tue Jun 25 06:37:41 2013 +0200
	Subject: Use cache when reading /etc/passwd file

The cache that is to be used is not initialized and therefore remains empty,
hence pam_cgroup doesn't really do anything.

Thanks, Reco, for the report!

Bug: http://sourceforge.net/p/libcg/bugs/52/
Bug-Debian: https://bugs.debian.org/788244
Bug-RedHat: https://bugzilla.redhat.com/show_bug.cgi?id=1060227
Forwarded: not-needed
Last-Update: 2015-10-02
---
 src/pam/pam_cgroup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: libcgroup/src/pam/pam_cgroup.c
===================================================================
--- libcgroup.orig/src/pam/pam_cgroup.c
+++ libcgroup/src/pam/pam_cgroup.c
@@ -127,7 +127,7 @@ PAM_EXTERN int pam_sm_open_session(pam_h
 	 * Note: We are using default gid here. Is there a way to
 	 * determine under what egid service will be provided?
 	 */
-	ret = cgroup_change_cgroup_uid_gid_flags(pwd->pw_uid, pwd->pw_gid, pid, CGFLAG_USECACHE);
+	ret = cgroup_change_cgroup_uid_gid(pwd->pw_uid, pwd->pw_gid, pid);
 	if (ret) {
 		if (ctrl & PAM_DEBUG_ARG) {
 			pam_syslog(pamh, LOG_ERR, "Change of cgroup for process with username");