2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 03:19:48 +00:00

Fix simple password support

Simple password was broken during the MFA addition, restore
the most common authentication mechanism.
This commit is contained in:
Jarrod Johnson 2021-07-29 13:16:33 -04:00
parent 08f226a3bf
commit 2219297afc

View File

@ -168,7 +168,9 @@ class pam():
currcpassword = c_char_p(currpassword.encode('utf8'))
else:
currpassword = password
currcpassword = c_char_p(password.encode('utf8'))
if not isinstance(currpassword, bytes):
currpassword = currpassword.encode('utf8')
currcpassword = c_char_p(currpassword)
dst = calloc(len(currpassword)+1, sizeof(c_char))
memmove(dst, currcpassword, len(currpassword))
response[i].resp = dst