Page MenuHomePhorge

[Python 3] fork code harmonizing
ClosedPublic

Authored by ghane on Mar 14 2022, 10:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 9:16 AM
Unknown Object (File)
Thu, Apr 4, 7:29 AM
Unknown Object (File)
Tue, Mar 26, 1:47 AM
Unknown Object (File)
Fri, Mar 22, 3:02 PM
Unknown Object (File)
Mar 11 2024, 11:29 AM
Unknown Object (File)
Mar 1 2024, 6:42 PM
Unknown Object (File)
Mar 1 2024, 6:42 PM
Unknown Object (File)
Feb 25 2024, 11:32 PM
Subscribers

Details

Summary

fixes error in Python3 running saslauthd.py in fork mode

Code harmonized with code in def run of kolabd/__init.py and wallace/init__.py

Diff Detail

Repository
rP pykolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ghane created this revision.
sicherha subscribed.

Could you add to the summary of this differential a description of the concrete error that is being solved here? I presume that some part of Python (which one?) complained about one of the file descriptors for stdin/ stdout/ stderr being unavailable, but it would be great to make that explicit.

This revision now requires changes to proceed.Mar 14 2022, 11:51 PM

with --fork

testsaslauthd -u user(@domain) -p password
0: NO "authentication failed"

  • Logging error ---

Traceback (most recent call last):

File "/usr/lib/python3.x/logging/__init__.py", line 1037, in emit
  stream.write(msg + self.terminator)

BrokenPipeError: [Errno 32] Broken pipe
Call stack:

File "./saslauthd.py", line 43, in <module>
  saslauthd.run()

...
Message: "Authentication for 'user(@domain)' succeeded"

I tried to localize the error on other parts of the code, but I couldn't localize.
without --fork the code worked.

testsaslauthd -u user(@domain) -p password
0: OK "Success."

I just checked against the same fork code snippet on wallace and kolabd, C&P the missing code part and it worked.

So I just harmonized the fork code in def run on the daemon.

This revision is now accepted and ready to land.Mar 16 2022, 10:28 PM
This revision was automatically updated to reflect the committed changes.