From 0e01ed06a40146d145ffe439a65fb9035ab7b1cf Mon Sep 17 00:00:00 2001 From: Uri Simchoni Date: Wed, 30 Mar 2016 14:02:31 +0300 Subject: [PATCH] smbd: do not cover up VFS failures to get quota Now that the VFS follows the convention that get-quota returns error only on error condition, and success with zero quota if there is no quota assigned, reply with an error if failing to obtain a user's quota. Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison --- source3/smbd/nttrans.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 232cc687b50..fa3f74c9302 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -2512,12 +2512,7 @@ static void call_nt_transact_get_user_quota(connection_struct *conn, nt_status = vfs_get_ntquota(fsp, SMB_USER_QUOTA_TYPE, &sid, &qt); if (!NT_STATUS_IS_OK(nt_status)) { - ZERO_STRUCT(qt); - /* - * we have to return zero's in all fields - * instead of returning an error here - * --metze - */ + reply_nterror(req, nt_status); } /* Realloc the size of parameters and data we will return */ -- 2.34.1