Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] Some python bugs (with fix) in dbi driver #70

Open
kotee4ko opened this issue Aug 6, 2021 · 0 comments
Open

[Linux] Some python bugs (with fix) in dbi driver #70

kotee4ko opened this issue Aug 6, 2021 · 0 comments

Comments

@kotee4ko
Copy link

kotee4ko commented Aug 6, 2021

https://github.com/mxmssh/manul/blob/master/dbi_mode.py#L15

#1
15 - return "/usr/tmp/manul_uds_socket_%d"
15 + return "/usr/tmp/manul_uds_socket_%d" % random.randint(1, 999999999)

#2
on Debian 10 Linux l0c4lh05t 5.10.24 #8 SMP Sun Jun 13 01:31:09 EEST 2021 x86_64 GNU/Linux
I don't have /usr/tmp dir.

63 os.unlink(self.ipc_obj_name) return false
and
73 self.sock.bind(self.ipc_obj_name) return crash
FileNotFoundError: [Errno 2] No such file or directory

workaround:

 61         # Make sure the socket does not already exist
 62         if not os.path.exists("/usr/tmp"):
 63             try:
 64                 os.mkdir("/usr/tmp")
 65             except:
 66                 print("Can't create dir with very strange path. Are u root?\n")
 67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant