The Samba-Bugzilla – Attachment 6375 Details for
Bug 7080
Quota only shown when logged as root
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 3.5.next
0001-Fix-bug-7080-Quota-only-shown-when-logged-as-root.patch (text/plain), 2.79 KB, created by
Jeremy Allison
on 2011-04-05 21:18:46 UTC
(
hide
)
Description:
git-am fix for 3.5.next
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2011-04-05 21:18:46 UTC
Size:
2.79 KB
patch
obsolete
>From 3bb2dd52177abdc839e66d045eb15bf86ba5f59a Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 5 Apr 2011 14:15:56 -0700 >Subject: [PATCH] Fix bug #7080 - Quota only shown when logged as root. > >Ensure we also check conn->admin_user when rejecting non-root access. >--- > source3/smbd/fake_file.c | 2 +- > source3/smbd/nttrans.c | 4 ++-- > source3/smbd/trans2.c | 5 +++-- > 3 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/source3/smbd/fake_file.c b/source3/smbd/fake_file.c >index 6898793..e0256f2 100644 >--- a/source3/smbd/fake_file.c >+++ b/source3/smbd/fake_file.c >@@ -126,7 +126,7 @@ NTSTATUS open_fake_file(struct smb_request *req, connection_struct *conn, > NTSTATUS status; > > /* access check */ >- if (conn->server_info->utok.uid != 0) { >+ if (conn->server_info->utok.uid != 0 && !conn->admin_user) { > DEBUG(3, ("open_fake_file_shared: access_denied to " > "service[%s] file[%s] user[%s]\n", > lp_servicename(SNUM(conn)), >diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c >index 3ff192b..f82820c 100644 >--- a/source3/smbd/nttrans.c >+++ b/source3/smbd/nttrans.c >@@ -2310,7 +2310,7 @@ static void call_nt_transact_get_user_quota(connection_struct *conn, > ZERO_STRUCT(qt); > > /* access check */ >- if (conn->server_info->utok.uid != 0) { >+ if (conn->server_info->utok.uid != 0 && !conn->admin_user) { > DEBUG(1,("get_user_quota: access_denied service [%s] user " > "[%s]\n", lp_servicename(SNUM(conn)), > conn->server_info->unix_name)); >@@ -2580,7 +2580,7 @@ static void call_nt_transact_set_user_quota(connection_struct *conn, > ZERO_STRUCT(qt); > > /* access check */ >- if (conn->server_info->utok.uid != 0) { >+ if (conn->server_info->utok.uid != 0 && !conn->admin_user) { > DEBUG(1,("set_user_quota: access_denied service [%s] user " > "[%s]\n", lp_servicename(SNUM(conn)), > conn->server_info->unix_name)); >diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index 84139da..1a171d8 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -3156,7 +3156,8 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned > fsp.fnum = -1; > > /* access check */ >- if (conn->server_info->utok.uid != sec_initial_uid()) { >+ if (conn->server_info->utok.uid != sec_initial_uid() && >+ !conn->admin_user) { > DEBUG(0,("set_user_quota: access_denied " > "service [%s] user [%s]\n", > lp_servicename(SNUM(conn)), >@@ -3643,7 +3644,7 @@ cap_low = 0x%x, cap_high = 0x%x\n", > ZERO_STRUCT(quotas); > > /* access check */ >- if ((conn->server_info->utok.uid != sec_initial_uid()) >+ if (((conn->server_info->utok.uid != sec_initial_uid()) && !conn->admin_user) > ||!CAN_WRITE(conn)) { > DEBUG(0,("set_user_quota: access_denied service [%s] user [%s]\n", > lp_servicename(SNUM(conn)), >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 7080
:
5252
|
5253
| 6375