smbd: do not cover up VFS failures to get quota
authorUri Simchoni <uri@samba.org>
Wed, 30 Mar 2016 11:02:31 +0000 (14:02 +0300)
committerJeremy Allison <jra@samba.org>
Thu, 31 Mar 2016 18:30:11 +0000 (20:30 +0200)
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 <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/nttrans.c

index 232cc687b504fdba4146e817b3c8fe2756428532..fa3f74c9302cee503ba255aa1bc611973fbda5ff 100644 (file)
@@ -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 */