Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#21 closed defect (fixed)

Incorrect error code returned by smbcd

Reported by: psmedley Owned by: psmedley
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 Changed 12 years ago by psmedley

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 10 years ago by herwigb

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