diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2020-12-09 15:45:06 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-10 13:38:04 +0000 |
commit | 77790e3656048eff5cb1a086c727d86d32773b68 (patch) | |
tree | bb125a9b9422291816a3fc5abde646e2511fd61f /lib/hashserv/client.py | |
parent | 5775d9463ecedf8681cb6c919b240b80fe70f5a3 (diff) | |
download | bitbake-77790e3656048eff5cb1a086c727d86d32773b68.tar.gz |
hashserv: Fix broken AF_UNIX path length limit
Fixes the bug were long paths would break Unix domain socket clients
(for real this time; the previous attempt was missing os.path.basename).
Adds some tests to prevent regressions
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/hashserv/client.py')
-rw-r--r-- | lib/hashserv/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hashserv/client.py b/lib/hashserv/client.py index 7bbf0865d..0ffd0c2ae 100644 --- a/lib/hashserv/client.py +++ b/lib/hashserv/client.py @@ -213,7 +213,7 @@ class Client(object): cwd = os.getcwd() try: os.chdir(os.path.dirname(path)) - self.loop.run_until_complete(self.client.connect_unix(path)) + self.loop.run_until_complete(self.client.connect_unix(os.path.basename(path))) self.loop.run_until_complete(self.client.connect()) finally: os.chdir(cwd) |