summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2017-03-22 20:06:13 +0000
committerNoel Power <npower@samba.org>2018-07-31 16:56:25 +0200
commit705086d83c847c707e8230ce6a58e840a70d93c3 (patch)
tree1e6495eddb0ec33e75fbf1ca5c82b7b594affffc /source3/smbd/nttrans.c
parent801c1856a39cbc2fd65183a7d6d8b7526dbc251e (diff)
downloadsamba-705086d83c847c707e8230ce6a58e840a70d93c3.tar.gz
s3/smbd: allow set quota for non root user (when built with --enable-selftest)
Currently it appears you need to be root to set quotas, for test purposes this requirement needs to be relaxed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 6967e4e1b37..5937380fb85 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -2710,7 +2710,7 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
ZERO_STRUCT(qt);
/* access check */
- if (get_current_uid(conn) != 0) {
+ if (get_current_uid(conn) != sec_initial_uid()) {
DEBUG(1,("set_user_quota: access_denied service [%s] user "
"[%s]\n", lp_servicename(talloc_tos(), SNUM(conn)),
conn->session_info->unix_info->unix_name));