Jitsi Meet on Docker
The Apache Kafka C/C++ library
A place to play around
issue commentcobbler/cobbler
Yes, PAM authentication seems to work as expected after applying the patch. I have not encountered any additional issues, but I did not conduct a full audit of the module for additional type issues.
I would love to see the patch included. Thanks!
comment created time in a month
issue commentcobbler/cobbler
The following patch seems to have fixed the issue for me:
--- /usr/lib/python3.6/site-packages/cobbler/modules/authentication/pam.py.orig 2020-08-24 22:12:16.178380466 +0000
+++ /usr/lib/python3.6/site-packages/cobbler/modules/authentication/pam.py 2020-08-24 22:19:34.634209255 +0000
@@ -124,7 +124,7 @@
p_response[0] = cast(addr, POINTER(PamResponse))
for i in range(n_messages):
if messages[i].contents.msg_style == PAM_PROMPT_ECHO_OFF:
- pw_copy = STRDUP(str(password))
+ pw_copy = STRDUP(password.encode())
p_response.contents[i].resp = cast(pw_copy, c_char_p)
p_response.contents[i].resp_retcode = 0
return 0
@@ -138,7 +138,7 @@
handle = PamHandle()
conv = PamConv(my_conv, 0)
- retval = PAM_START(service, username, pointer(conv), pointer(handle))
+ retval = PAM_START(service.encode(), username.encode(), pointer(conv), pointer(handle))
if retval != 0:
# TODO: This is not an authentication error, something
comment created time in a month
issue openedcobbler/cobbler
Describe the bug
<!--- A clear and concise description of what the bug is. -->
<!--- HINT: You can paste gist.github.com links for long logs or larger files --> Enabling authentication.pam module results in TypeError exception and failure to authenticate.
To Reproduce
- Change authentication module to "authentication.pam" in modules.com
- Restart cobbler service
- Attempt to login via web UI
- See error in cobbler.log
DEBUG | authn_pam: PAM service is login
INFO | Exception occured: <class 'ctypes.ArgumentError'>
INFO | Exception value: argument 1: <class 'TypeError'>: wrong type
INFO | Exception Info:
File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 3477, in _dispatch
return method_handle(*params)
File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 3233, in login
if self.__validate_user(login_user, login_password):
File "/usr/lib/python3.6/site-packages/cobbler/remote.py", line 3113, in __validate_user
return self.api.authenticate(input_user, input_password)
File "/usr/lib/python3.6/site-packages/cobbler/api.py", line 1599, in authenticate
rc = self.authn.authenticate(self, user, password)
File "/usr/lib/python3.6/site-packages/cobbler/modules/authentication/pam.py", line 141, in authenticate
retval = PAM_START(str(service), str(username), pointer(conv), pointer(handle))
Expected behavior
<!--- A clear and concise description of what you expected to happen. --> PAM authentication should succeed.
Version
<!--- Paste output from cobbler version -->
Cobbler 3.1.2
source: ?, ?
build time: Sun May 31 02:32:34 2020
Screenshots
<!--- If applicable, add screenshots to help explain your problem. -->
Additional context
<!--- Add any other context about the problem here. -->
created time in a month