mirror of
https://github.com/samba-team/samba.git
synced 2025-12-05 12:23:50 +03:00
started converting NTSTATUS to be a structure on systems with gcc in order to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs
This commit is contained in:
@@ -110,16 +110,17 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
|
||||
errors. */
|
||||
|
||||
if (cli_is_error(cli)) {
|
||||
uint32 status = 0;
|
||||
NTSTATUS status = NT_STATUS_OK;
|
||||
uint8 eclass = 0;
|
||||
uint32 ecode = 0;
|
||||
|
||||
if (cli_is_nt_error(cli))
|
||||
status = cli_nt_error(cli);
|
||||
else
|
||||
cli_dos_error(cli, &eclass, &status);
|
||||
cli_dos_error(cli, &eclass, &ecode);
|
||||
|
||||
if ((eclass == ERRDOS && status == ERRmoredata) ||
|
||||
status == STATUS_MORE_ENTRIES)
|
||||
if ((eclass == ERRDOS && ecode == ERRmoredata) ||
|
||||
NT_STATUS_V(status) == NT_STATUS_V(STATUS_MORE_ENTRIES))
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user