From: Noel Power Date: Wed, 22 Mar 2017 20:06:13 +0000 (+0000) Subject: s3/smbd: allow set quota for non root user (when built with --enable-selftest) X-Git-Tag: ldb-1.3.6~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=807611fe3bc9647e82feeb1d2b2d909fa35ad8ef;p=thirdparty%2Fsamba.git 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 Reviewed-by: Jeremy Allison --- 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));