[PATCH] cifs: treat password/account expired as -EACCES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These two errors both require admin changes to the server before they can
be resolved so there is no point in looping to try to reconnect
indefinitely. Change the mapping to -EACCES so that we will quickly
terminate the reconnect for these threads and return an error back to userland.

RHBZ: 1798031

Signed-off-by: Ronnie Sahlberg <lsahlber@xxxxxxxxxx>
---
 fs/cifs/smb2maperror.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c
index 7fde3775cb57..9cd231486af4 100644
--- a/fs/cifs/smb2maperror.c
+++ b/fs/cifs/smb2maperror.c
@@ -409,8 +409,8 @@ static const struct status_to_posix_error smb2_error_map_table[] = {
 	{STATUS_ACCOUNT_RESTRICTION, -EACCES, "STATUS_ACCOUNT_RESTRICTION"},
 	{STATUS_INVALID_LOGON_HOURS, -EACCES, "STATUS_INVALID_LOGON_HOURS"},
 	{STATUS_INVALID_WORKSTATION, -EACCES, "STATUS_INVALID_WORKSTATION"},
-	{STATUS_PASSWORD_EXPIRED, -EKEYEXPIRED, "STATUS_PASSWORD_EXPIRED"},
-	{STATUS_ACCOUNT_DISABLED, -EKEYREVOKED, "STATUS_ACCOUNT_DISABLED"},
+	{STATUS_PASSWORD_EXPIRED, -EACCES, "STATUS_PASSWORD_EXPIRED"},
+	{STATUS_ACCOUNT_DISABLED, -EACCES, "STATUS_ACCOUNT_DISABLED"},
 	{STATUS_NONE_MAPPED, -EIO, "STATUS_NONE_MAPPED"},
 	{STATUS_TOO_MANY_LUIDS_REQUESTED, -EIO,
 	"STATUS_TOO_MANY_LUIDS_REQUESTED"},
-- 
2.13.6




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux