Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
To: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	lmuelle-IBi9RG/b67k@public.gmane.org
Subject: Re: [PATCH] mount.cifs: remove unnecessary getuid() check in libcap version of toggle_dac_capability
Date: Fri, 20 Apr 2012 11:47:49 -0400	[thread overview]
Message-ID: <20120420114749.1a9618fd@corrin.poochiereds.net> (raw)
In-Reply-To: <1334863493-18978-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

On Thu, 19 Apr 2012 15:24:53 -0400
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:

> I'm not sure what I was thinking when I added that check in, but it's
> been there since the inception. We shouldn't care at all what the
> real uid is when we call toggle_dac_capability and indeed we don't
> care with the libcap-ng version. Remove that check.
> 
> Signed-off-by: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
> ---
>  mount.cifs.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/mount.cifs.c b/mount.cifs.c
> index 06715dd..c90ce3e 100644
> --- a/mount.cifs.c
> +++ b/mount.cifs.c
> @@ -552,9 +552,6 @@ toggle_dac_capability(int writable, int enable)
>  	cap_t caps;
>  	cap_value_t capability = writable ? CAP_DAC_OVERRIDE : CAP_DAC_READ_SEARCH;
>  
> -	if (getuid() != 0)
> -		return 0;
> -
>  	caps = cap_get_proc();
>  	if (caps == NULL) {
>  		fprintf(stderr, "Unable to get current capability set: %s\n",

Merged...
-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

      parent reply	other threads:[~2012-04-20 15:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 19:24 [PATCH] mount.cifs: remove unnecessary getuid() check in libcap version of toggle_dac_capability Jeff Layton
     [not found] ` <1334863493-18978-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2012-04-20  5:34   ` Suresh Jayaraman
     [not found]     ` <4F90F55D.30909-IBi9RG/b67k@public.gmane.org>
2012-04-20 11:56       ` Jeff Layton
2012-04-20 15:47   ` Jeff Layton [this message]

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=20120420114749.1a9618fd@corrin.poochiereds.net \
    --to=jlayton-eunubhrolfbytjvyw6ydsg@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lmuelle-IBi9RG/b67k@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox