Recongnize more error codes returned by W2K servers.

MFC after:	4 days
This commit is contained in:
Boris Popov 2002-04-17 03:14:28 +00:00
parent 0904a0d3fe
commit af9b5e8fe5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94914
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 ERRlock 33 /* A lock request conflicts with existing lock */
#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
@ -353,6 +354,11 @@ enum smb_dialects {
#define ERRusempx 250 /* Temporarily unable to support Raw, use MPX mode */
#define ERRusestd 251 /* Temporarily unable to support Raw, use standard r/w */
#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 */
/*

View File

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