All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mount.cifs: remove unnecessary getuid() check in libcap version of toggle_dac_capability
@ 2012-04-19 19:24 Jeff Layton
       [not found] ` <1334863493-18978-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Layton @ 2012-04-19 19:24 UTC (permalink / raw)
  To: linux-cifs-u79uwXL29TY76Z2rM5mHXA; +Cc: lmuelle-IBi9RG/b67k

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",
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-20 15:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.