From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>,
Bill Pemberton <wfp5p@virginia.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [GIT PULL] user namespace compile fix for 3.7
Date: Wed, 03 Oct 2012 16:03:54 -0700 [thread overview]
Message-ID: <87626r17l1.fsf@xmission.com> (raw)
Linus,
Please pull the for-linus git tree from:
git://git.kernel.org:/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-linus
HEAD: 702e490211b2b7e448ebe1b3a07d97ad2fc07e03 userns: Fix build of drivers/staging/dgrp
This tree contains a trivial build fix for one of the staging drivers
when user namespace support is enabled.
---
Subject: [PATCH] userns: Fix build of drivers/staging/dgrp
Explicitly test for GLOBAL_ROOT_UID and GLOBAL_ROOT_GID
instead of using 0, allowing dgrp to compile and work
properly when user namespace support is enabled.
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
drivers/staging/dgrp/dgrp_common.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/dgrp/dgrp_common.c b/drivers/staging/dgrp/dgrp_common.c
index fce74e7..3553998 100644
--- a/drivers/staging/dgrp/dgrp_common.c
+++ b/drivers/staging/dgrp/dgrp_common.c
@@ -179,9 +179,9 @@ void dgrp_carrier(struct ch_struct *ch)
*/
int dgrp_chk_perm(int mode, int op)
{
- if (!current_euid())
+ if (!uid_eq(GLOBAL_ROOT_UID, current_euid()))
mode >>= 6;
- else if (in_egroup_p(0))
+ else if (in_egroup_p(GLOBAL_ROOT_GID))
mode >>= 3;
if ((mode & op & 0007) == op)
--
1.7.5.4
next reply other threads:[~2012-10-03 23:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 23:03 Eric W. Biederman [this message]
2012-10-03 23:25 ` [GIT PULL] user namespace compile fix for 3.7 Greg Kroah-Hartman
2012-10-03 23:38 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87626r17l1.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=wfp5p@virginia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.