Recongnize more error codes returned by W2K servers.

MFC after:	4 days
This commit is contained in:
bp 2002-04-17 03:14:28 +00:00
parent d45a778584
commit 96ac6411fa
2 changed files with 14 additions and 1 deletions

View File

@ -324,6 +324,7 @@ enum smb_dialects {
#define ERRbadshare 32 /* Share mode can't be granted */ #define ERRbadshare 32 /* Share mode can't be granted */
#define ERRlock 33 /* A lock request conflicts with existing lock */ #define ERRlock 33 /* A lock request conflicts with existing lock */
#define ERRfilexists 80 /* The file named in the request already exists */ #define ERRfilexists 80 /* The file named in the request already exists */
#define ERRquota 112 /* W2K returns this if quota space exceeds */
/* /*
* Error codes for the ERRSRV class * Error codes for the ERRSRV class
@ -353,6 +354,11 @@ enum smb_dialects {
#define ERRusempx 250 /* Temporarily unable to support Raw, use MPX mode */ #define ERRusempx 250 /* Temporarily unable to support Raw, use MPX mode */
#define ERRusestd 251 /* Temporarily unable to support Raw, use standard r/w */ #define ERRusestd 251 /* Temporarily unable to support Raw, use standard r/w */
#define ERRcontmpx 252 /* Continue in MPX mode */ #define ERRcontmpx 252 /* Continue in MPX mode */
#define ERRbadPassword 254
#define ERRaccountExpired 2239
#define ERRbadClient 2240 /* Cannot access the server from this workstation */
#define ERRbadLogonTime 2241 /* Cannot access the server at this time **/
#define ERRpasswordExpired 2242
#define ERRnosupport 65535 /* Invalid function */ #define ERRnosupport 65535 /* Invalid function */
/* /*

View File

@ -254,6 +254,8 @@ smb_maperror(int eclass, int eno)
return ENOTEMPTY; return ENOTEMPTY;
case 183: case 183:
return EEXIST; return EEXIST;
case ERRquota:
return EDQUOT;
} }
break; break;
case ERRSRV: case ERRSRV:
@ -261,6 +263,7 @@ smb_maperror(int eclass, int eno)
case ERRerror: case ERRerror:
return EINVAL; return EINVAL;
case ERRbadpw: case ERRbadpw:
case ERRpasswordExpired:
return EAUTH; return EAUTH;
case ERRaccess: case ERRaccess:
return EACCES; return EACCES;
@ -271,8 +274,12 @@ smb_maperror(int eclass, int eno)
return EAUTH; return EAUTH;
case 3: /* reserved and returned */ case 3: /* reserved and returned */
return EIO; return EIO;
case 2239: /* NT: account exists but disabled */ case ERRaccountExpired:
case ERRbadClient:
case ERRbadLogonTime:
return EPERM; return EPERM;
case ERRnosupport:
return EBADRPC;
} }
break; break;
case ERRHRD: case ERRHRD: