Don't care at all what the real uid is when we call toggle_dac_capability().

OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/cifs-utils?expand=0&rev=53
This commit is contained in:
Lars Müller 2012-04-19 19:43:12 +00:00 committed by Git OBS Bridge
parent 24df7bdc57
commit b8fb2f2b10
3 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Apr 19 19:36:19 UTC 2012 - lmuelle@suse.com
- Don't care at all what the real uid is when we call toggle_dac_capability().
-------------------------------------------------------------------
Thu Apr 19 19:03:21 UTC 2012 - lmuelle@suse.com

View File

@ -31,6 +31,7 @@ Patch: 8c6268cbbd4202631e5c4b30297adc0088a1d568.diff
Patch1: bkup-uid-gid-uninitialized.diff
Patch2: krb5_auth_con_set_req_cksumtype-implicit-declaration.diff
Patch3: mount.cifs-toggle_dac_capability-return-stored-returncode.diff
Patch4: mount.cifs-toggle_dac_capability-remove-check.diff
%if 0%{?suse_version}
PreReq: insserv %{?fillup_prereq} mkinitrd
%else
@ -83,6 +84,7 @@ the Linux CIFS filesystem.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
autoreconf --force --install

View File

@ -0,0 +1,26 @@
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@samba.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