Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#21 closed defect (fixed)

Incorrect error code returned by smbcd

Reported by: Paul Smedley Owned by: Paul Smedley
Priority: minor Milestone: Netdrive plugin 1.0
Component: Samba Client Plugin Version:
Keywords: Cc:


From Vitali: I've found a bug in the smbcd.c. When it is unable to connect to a share because it has no rights to access it (wrong login/pass, then the return code from smbcd was 7 (ERROR_ARENA_TRASHED). That is rather misleading :)

Further analysis showed that smbwrp_connect returned a non-0 value as an error indicator. Values numbered 1 to 7 and are not related to OS/2 error codes.

Here is a patch. I think returning ERROR_ACCESS_DENIED on the smbwrp_failure is OK.

Please make a new build for me.

Thanks in advance, Vitali.

Index: smbcd.c =================================================================== --- smbcd.c (revision 44) +++ smbcd.c (working copy) @@ -311,7 +311,7 @@

if (res->rc) {

debuglocal(1,"Client reconnect resprc %d\n", res->rc);

  • return NO_ERROR;


} *reconnect = 1;


@@ -346,6 +346,10 @@

memcpy(srv, req->param, sizeof(smbwrp_server)); *reconnect = 1;


+ else + { + res->rc = ERROR_ACCESS_DENIED; + }

} break; case SMBREQ_DISCONNECT : {

Change History (2)

comment:1 Changed 13 years ago by Paul Smedley

Resolution: fixed
Status: newclosed

comment:2 Changed 11 years ago by Herwig Bauernfeind

Milestone: Netdrive SMB Client plugin 1.0
Note: See TracTickets for help on using tickets.