(ql: Qiling, sun_path: bytearray)
| 81 | |
| 82 | |
| 83 | def ql_unix_socket_path(ql: Qiling, sun_path: bytearray) -> Tuple[str, str]: |
| 84 | vpath, _, _ = sun_path.partition(b'\x00') |
| 85 | |
| 86 | # an abstract Unix namespace? |
| 87 | if not vpath: |
| 88 | # TODO: isolate from host namespace |
| 89 | # TODO: Windows |
| 90 | ql.log.warning(f'Beware! Usage of hosts abstract socket namespace {bytes(sun_path)}') |
| 91 | |
| 92 | return (sun_path.decode(), '') |
| 93 | |
| 94 | vpath = ql.os.path.virtual_abspath(vpath.decode()) |
| 95 | hpath = ql.os.path.virtual_to_host_path(vpath) |
| 96 | |
| 97 | return (hpath, vpath) |
| 98 | |
| 99 | |
| 100 | def __host_socket_type(vsock_type: int, arch_type: QL_ARCH) -> int: |
no test coverage detected