Reduce socket name length

Some detectors simply ban long abstract sockets
This commit is contained in:
topjohnwu 2019-12-28 21:27:55 +08:00
parent d19f65ce4a
commit b2cb2b8b75

View File

@ -24,7 +24,7 @@ static void patch_socket_name(const char *path) {
mmap_rw(path, buf, size);
for (int i = 0; i < size; ++i) {
if (memcmp(buf + i, MAIN_SOCKET, sizeof(MAIN_SOCKET)) == 0) {
gen_rand_str(buf + i, sizeof(MAIN_SOCKET));
gen_rand_str(buf + i, 16);
i += sizeof(MAIN_SOCKET);
}
}