-
Notifications
You must be signed in to change notification settings - Fork 94
/
no-runtime-dir.patch
55 lines (50 loc) · 2.02 KB
/
no-runtime-dir.patch
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 4fd038cf866872163ba9f6db36e686a381147a06 Mon Sep 17 00:00:00 2001
From: q66 <q66@chimera-linux.org>
Date: Fri, 2 Jun 2023 17:29:35 +0200
Subject: [PATCH] do not configure a runtime directory
This is the job of turnstile.
---
src/login/pam_elogind.c | 2 ++
src/login/user-runtime-dir.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/login/pam_elogind.c b/src/login/pam_elogind.c
index f8af7a4..c51c652 100644
--- a/src/login/pam_elogind.c
+++ b/src/login/pam_elogind.c
@@ -932,6 +932,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
if (r != PAM_SUCCESS)
return r;
+#if 0
if (original_uid == ur->uid) {
/* Don't set $XDG_RUNTIME_DIR if the user we now authenticated for does not match the
* original user of the session. We do this in order not to result in privileged apps
@@ -941,6 +942,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
if (r != PAM_SUCCESS)
return r;
}
+#endif
/* Most likely we got the session/type/class from environment variables, but might have gotten the data
* somewhere else (for example PAM module parameters). Let's now update the environment variables, so that this
diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c
index ee593c3..3612a92 100644
--- a/src/login/user-runtime-dir.c
+++ b/src/login/user-runtime-dir.c
@@ -236,6 +236,7 @@ int user_runtime_dir(const char *verb, User *u) {
return do_umount(argv[2]);
assert_not_reached();
#else // 0
+#if 0
if (streq(verb, "start"))
r = do_mount(u->runtime_path, u->manager->runtime_dir_size, u->manager->runtime_dir_inodes,
u->user_record->uid, u->user_record->gid);
@@ -243,7 +244,7 @@ int user_runtime_dir(const char *verb, User *u) {
r = do_umount(u->runtime_path);
else
assert_not_reached();
-
+#endif
return r;
#endif // 0
}
--
2.41.0