From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753478AbdK3AFj (ORCPT ); Wed, 29 Nov 2017 19:05:39 -0500 Received: from out01.mta.xmission.com ([166.70.13.231]:51312 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752899AbdK3AFh (ORCPT ); Wed, 29 Nov 2017 19:05:37 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: Linux Containers Cc: , Miklos Szeredi , Ian Kent , , Seth Forshee References: <874lpck52r.fsf@xmission.com> Date: Wed, 29 Nov 2017 18:05:26 -0600 In-Reply-To: <874lpck52r.fsf@xmission.com> (Eric W. Biederman's message of "Wed, 29 Nov 2017 18:01:16 -0600") Message-ID: <87shcwiqbd.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1eKCM7-0001RU-2p;;;mid=<87shcwiqbd.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=67.3.248.7;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18a3buvq7lSjqjzqwvl9GXrYIKfz6rx3Rw= X-SA-Exim-Connect-IP: 67.3.248.7 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.7 XMSubLong Long Subject * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.0 T_TooManySym_02 5+ unique symbols in subject * 0.4 FVGT_m_MULTI_ODD Contains multiple odd letter combinations * 0.0 T_TooManySym_03 6+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Linux Containers X-Spam-Relay-Country: X-Spam-Timing: total 5536 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.4 (0.0%), b_tie_ro: 1.64 (0.0%), parse: 0.68 (0.0%), extract_message_metadata: 9 (0.2%), get_uri_detail_list: 0.78 (0.0%), tests_pri_-1000: 3.3 (0.1%), tests_pri_-950: 1.13 (0.0%), tests_pri_-900: 0.95 (0.0%), tests_pri_-400: 16 (0.3%), check_bayes: 15 (0.3%), b_tokenize: 4.7 (0.1%), b_tok_get_all: 5 (0.1%), b_comp_prob: 1.49 (0.0%), b_tok_touch_all: 2.5 (0.0%), b_finish: 0.53 (0.0%), tests_pri_0: 118 (2.1%), check_dkim_signature: 0.45 (0.0%), check_dkim_adsp: 5 (0.1%), tests_pri_500: 5382 (97.2%), poll_dns_idle: 5376 (97.1%), rewrite_mail: 0.00 (0.0%) Subject: [PATCH 2/2] autofs4: Modify autofs_wait to use current_uid() and current_gid() X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The code used to do that and then I mucked with it and never quite put the code back. Today the code references current_cred()->uid and current_cred()->gid which is equivalent but more wordy, and not idiomatic. Fixes: 93faccbbfa95 ("fs: Better permission checking for submounts") Fixes: 069d5ac9ae0d ("autofs: Fix automounts by using current_real_cred()->uid") Signed-off-by: "Eric W. Biederman" --- fs/autofs4/waitq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index 8fc41705c7cd..9908ecf7fce0 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c @@ -443,8 +443,8 @@ int autofs4_wait(struct autofs_sb_info *sbi, memcpy(&wq->name, &qstr, sizeof(struct qstr)); wq->dev = autofs4_get_dev(sbi); wq->ino = autofs4_get_ino(sbi); - wq->uid = current_cred()->uid; - wq->gid = current_cred()->gid; + wq->uid = current_uid(); + wq->gid = current_gid(); wq->pid = pid; wq->tgid = tgid; wq->status = -EINTR; /* Status return if interrupted */ -- 2.14.1