summaryrefslogtreecommitdiff
path: root/kvmd/plugins/auth
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins/auth')
-rw-r--r--kvmd/plugins/auth/http.py4
-rw-r--r--kvmd/plugins/auth/ldap.py8
-rw-r--r--kvmd/plugins/auth/radius.py8
3 files changed, 10 insertions, 10 deletions
diff --git a/kvmd/plugins/auth/http.py b/kvmd/plugins/auth/http.py
index 520f64dc..b59218aa 100644
--- a/kvmd/plugins/auth/http.py
+++ b/kvmd/plugins/auth/http.py
@@ -85,8 +85,8 @@ class Plugin(BaseAuthService):
"User-Agent": htclient.make_user_agent("KVMD"),
"X-KVMD-User": user,
},
- ) as response:
- htclient.raise_not_200(response)
+ ) as resp:
+ htclient.raise_not_200(resp)
return True
except Exception:
get_logger().exception("Failed HTTP auth request for user %r", user)
diff --git a/kvmd/plugins/auth/ldap.py b/kvmd/plugins/auth/ldap.py
index fa6b9fff..961a47c7 100644
--- a/kvmd/plugins/auth/ldap.py
+++ b/kvmd/plugins/auth/ldap.py
@@ -100,10 +100,10 @@ class Plugin(BaseAuthService):
return True
except ldap.INVALID_CREDENTIALS:
pass
- except ldap.SERVER_DOWN as err:
- get_logger().error("LDAP server is down: %s", tools.efmt(err))
- except Exception as err:
- get_logger().error("Unexpected LDAP error: %s", tools.efmt(err))
+ except ldap.SERVER_DOWN as ex:
+ get_logger().error("LDAP server is down: %s", tools.efmt(ex))
+ except Exception as ex:
+ get_logger().error("Unexpected LDAP error: %s", tools.efmt(ex))
finally:
if conn is not None:
try:
diff --git a/kvmd/plugins/auth/radius.py b/kvmd/plugins/auth/radius.py
index 92c4632d..f048a2e6 100644
--- a/kvmd/plugins/auth/radius.py
+++ b/kvmd/plugins/auth/radius.py
@@ -435,10 +435,10 @@ class Plugin(BaseAuthService):
timeout=self.__timeout,
dict=dct,
)
- request = client.CreateAuthPacket(code=pyrad.packet.AccessRequest, User_Name=user)
- request["User-Password"] = request.PwCrypt(passwd)
- response = client.SendPacket(request)
- return (response.code == pyrad.packet.AccessAccept)
+ req = client.CreateAuthPacket(code=pyrad.packet.AccessRequest, User_Name=user)
+ req["User-Password"] = req.PwCrypt(passwd)
+ resp = client.SendPacket(req)
+ return (resp.code == pyrad.packet.AccessAccept)
except Exception:
get_logger().exception("Failed RADIUS auth request for user %r", user)
return False