]> git.pld-linux.org Git - packages/kernel.git/blame - kernel-small_fixes.patch
- fix autofs4 credentials passing
[packages/kernel.git] / kernel-small_fixes.patch
CommitLineData
08aa9d92 1--- linux-2.6.33/scripts/mod/modpost.c~ 2010-02-24 19:52:17.000000000 +0100
2+++ linux-2.6.33/scripts/mod/modpost.c 2010-03-07 14:26:47.242168558 +0100
3@@ -15,7 +15,8 @@
4 #include <stdio.h>
5 #include <ctype.h>
6 #include "modpost.h"
7-#include "../../include/generated/autoconf.h"
8+// PLD architectures don't use CONFIG_SYMBOL_PREFIX
9+//#include "../../include/generated/autoconf.h"
10 #include "../../include/linux/license.h"
11
12 /* Some toolchains use a `_' prefix for all user symbols. */
13
2136e199
AM
14--- linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh~ 2011-07-22 04:17:23.000000000 +0200
15+++ linux-3.0/scripts/kconfig/lxdialog/check-lxdialog.sh 2011-08-25 21:26:04.799150642 +0200
16@@ -9,6 +9,12 @@
17 $cc -print-file-name=lib${lib}.${ext} | grep -q /
18 if [ $? -eq 0 ]; then
19 echo "-l${lib}"
20+ for libt in tinfow tinfo ; do
21+ $cc -print-file-name=lib${libt}.${ext} | grep -q /
22+ if [ $? -eq 0 ]; then
23+ echo "-l${libt}"
24+ fi
25+ done
26 exit
27 fi
28 done
74a52470
JR
29From 069d5ac9ae0d271903cc4607890616418118379a Mon Sep 17 00:00:00 2001
30From: "Eric W. Biederman" <ebiederm@xmission.com>
31Date: Fri, 30 Sep 2016 11:28:05 -0500
32Subject: autofs: Fix automounts by using current_real_cred()->uid
33
34Seth Forshee reports that in 4.8-rcN some automounts are failing
35because the requesting the automount changed.
36
37The relevant call path is:
38follow_automount()
39 ->d_automount
40 autofs4_d_automount
41 autofs4_mount_wait
42 autofs4_wait
43
44In autofs4_wait wq_uid and wq_gid are set to current_uid() and
45current_gid respectively. With follow_automount now overriding creds
46uid that we export to userspace changes and that breaks existing
47setups.
48
49To remove the regression set wq_uid and wq_gid from
50current_real_cred()->uid and current_real_cred()->gid respectively.
51This restores the current behavior as current->real_cred is identical
52to current->cred except when override creds are used.
53
54Cc: stable@vger.kernel.org
55Fixes: aeaa4a79ff6a ("fs: Call d_automount with the filesystems creds")
56Reported-by: Seth Forshee <seth.forshee@canonical.com>
57Tested-by: Seth Forshee <seth.forshee@canonical.com>
58Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
59---
60 fs/autofs4/waitq.c | 4 ++--
61 1 file changed, 2 insertions(+), 2 deletions(-)
62
63diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
64index 431fd7e..e44271d 100644
65--- a/fs/autofs4/waitq.c
66+++ b/fs/autofs4/waitq.c
67@@ -431,8 +431,8 @@ int autofs4_wait(struct autofs_sb_info *sbi,
68 memcpy(&wq->name, &qstr, sizeof(struct qstr));
69 wq->dev = autofs4_get_dev(sbi);
70 wq->ino = autofs4_get_ino(sbi);
71- wq->uid = current_uid();
72- wq->gid = current_gid();
73+ wq->uid = current_real_cred()->uid;
74+ wq->gid = current_real_cred()->gid;
75 wq->pid = pid;
76 wq->tgid = tgid;
77 wq->status = -EINTR; /* Status return if interrupted */
78--
79cgit v0.12
746b5ec8 80
This page took 0.479265 seconds and 4 git commands to generate.