diff mbox series

cifs: treat password/account expired as -EACCES

Message ID 20200918031812.20578-1-lsahlber@redhat.com (mailing list archive)
State New, archived
Headers show
Series cifs: treat password/account expired as -EACCES | expand

Commit Message

Ronnie Sahlberg Sept. 18, 2020, 3:18 a.m. UTC
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@redhat.com>
---
 fs/cifs/smb2maperror.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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"},