s3/smbd: Don't stat when doing a quota operation (as it's a fake file)
[sfrench/samba-autobuild/.git] / source3 / smbd / trans2.c
index b4a481fbf865223c7281ef535a7e9271b15e51b6..0ec20fe6337f7643433ae66d42f4074c314b9fa2 100644 (file)
@@ -3475,7 +3475,8 @@ NTSTATUS smbd_do_qfsinfo(struct smbXsrv_connection *xconn,
        ZERO_STRUCT(smb_fname);
        smb_fname.base_name = discard_const_p(char, filename);
 
-       if(SMB_VFS_STAT(conn, &smb_fname) != 0) {
+       if(info_level != SMB_FS_QUOTA_INFORMATION
+          && SMB_VFS_STAT(conn, &smb_fname) != 0) {
                DEBUG(2,("stat of . failed (%s)\n", strerror(errno)));
                return map_nt_error_from_unix(errno);
        }