Opened 17 years ago

Closed 17 years ago

Last modified 15 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:

Description

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;

+ return ERROR_ACCESS_DENIED;

} *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 by Paul Smedley, 17 years ago

Resolution: fixed
Status: newclosed

comment:2 by Herwig Bauernfeind, 15 years ago

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