summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-20 05:15:26 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-20 05:15:26 +0000
commit11ce0f4d2d493702386c0bd49c8e2dd2aad84d56 (patch)
treef9d0e8cc2b71506b658e2a8519bf8bf4201f7618 /source3/libsmb
parent5f0b9d08303aeddb01019ff2a63001c9dfa3088b (diff)
downloadsamba-11ce0f4d2d493702386c0bd49c8e2dd2aad84d56.tar.gz
samba-11ce0f4d2d493702386c0bd49c8e2dd2aad84d56.tar.bz2
samba-11ce0f4d2d493702386c0bd49c8e2dd2aad84d56.zip
a bunch of fixes from the sflight to seattle
in particular: - fixed NT status code for a bunch of ops - fixed handling of protocol levels in ms_fnmatch (This used to be commit 3eba9606f71f90bfd9820af26f8676277ed22390)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c1
-rw-r--r--source3/libsmb/clilist.c2
-rw-r--r--source3/libsmb/clitrans.c17
3 files changed, 11 insertions, 9 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index dffff5e6ab..982ac544cf 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -414,7 +414,6 @@ BOOL cli_negprot(struct cli_state *cli)
cli->protocol = prots[SVAL(cli->inbuf,smb_vwv0)].prot;
-
if (cli->protocol >= PROTOCOL_NT1) {
/* NT protocol */
cli->sec_mode = CVAL(cli->inbuf,smb_vwv1);
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index a7ba1c07ad..e727217628 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -216,7 +216,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
continue;
}
- if (cli_is_error(cli))
+ if (cli_is_error(cli) || !rdata || !rparam)
return -1;
if (total_received == -1) total_received = 0;
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index 83912ddc6d..4822508e38 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -171,16 +171,19 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans,
* be treated as such.
*/
- if (cli_is_dos_error(cli)) {
- cli_dos_error(cli, &eclass, &ecode);
-
- if(cli->nt_pipe_fnum == 0)
- return(False);
+ if (cli_is_error(cli)) {
+ if (cli_is_dos_error(cli)) {
+ cli_dos_error(cli, &eclass, &ecode);
- if(!(eclass == ERRDOS && ecode == ERRmoredata)) {
- if (eclass != 0 && (ecode != (0x80000000 | STATUS_BUFFER_OVERFLOW)))
+ if(cli->nt_pipe_fnum == 0)
return(False);
+
+ if(!(eclass == ERRDOS && ecode == ERRmoredata)) {
+ if (eclass != 0 && (ecode != (0x80000000 | STATUS_BUFFER_OVERFLOW)))
+ return(False);
+ }
}
+ return False;
}
/* parse out the lengths */