mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 04:53:44 +02:00
A few very tiny bits of dead code removal, etc.
This commit is contained in:
parent
a18336fa18
commit
1d4563ac31
2 changed files with 15 additions and 35 deletions
|
@ -29,9 +29,6 @@
|
|||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
/* Name used in err msgs */
|
||||
char *progname = "";
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
@ -63,9 +60,6 @@ char *progname = "";
|
|||
#endif
|
||||
|
||||
/* Global Declarations */
|
||||
#ifdef USE_SOCKS_DNS
|
||||
static int (*realresinit)(void);
|
||||
#endif
|
||||
static int (*realconnect)(CONNECT_SIG);
|
||||
static int (*realselect)(SELECT_SIG);
|
||||
static int (*realbind)(BIND_SIG);
|
||||
|
@ -100,11 +94,6 @@ int clone(CLONE_SIG);
|
|||
int dup2(DUP2_SIG);
|
||||
int dup3(DUP3_SIG);
|
||||
|
||||
|
||||
#ifdef USE_SOCKS_DNS
|
||||
int res_init(void);
|
||||
#endif
|
||||
|
||||
int connect_to_service(void);
|
||||
int init_service_connection();
|
||||
void load_symbols(void);
|
||||
|
@ -117,8 +106,8 @@ int checkpid();
|
|||
ssize_t sock_fd_read(int sock, void *buf, ssize_t bufsize, int *fd);
|
||||
|
||||
/* threading */
|
||||
pthread_mutex_t lock;
|
||||
pthread_mutex_t loglock;
|
||||
static pthread_mutex_t lock;
|
||||
static pthread_mutex_t loglock;
|
||||
|
||||
void handle_error(char *name, char *info, int err)
|
||||
{
|
||||
|
@ -328,13 +317,8 @@ void load_symbols(void)
|
|||
realclone = dlsym(RTLD_NEXT, "clone");
|
||||
realclose = dlsym(RTLD_NEXT, "close");
|
||||
realsyscall = dlsym(RTLD_NEXT, "syscall");
|
||||
/* realsyscall = dlsym(RTLD_NEXT, "poll"); */
|
||||
realdup2 = dlsym(RTLD_NEXT, "dup2");
|
||||
realdup3 = dlsym(RTLD_NEXT, "dup3");
|
||||
#ifdef USE_SOCKS_DNS
|
||||
realresinit = dlsym(RTLD_NEXT, "res_init");
|
||||
#endif
|
||||
|
||||
#else
|
||||
lib = dlopen(LIBCONNECT, RTLD_LAZY);
|
||||
realconnect = dlsym(lib, "connect");
|
||||
|
@ -349,12 +333,8 @@ void load_symbols(void)
|
|||
realclone = dlsym(lib, "clone");
|
||||
realclose = dlsym(lib, "close");
|
||||
realsyscall = dlsym(lib, "syscall");
|
||||
/* realsyscall = dlsym(lib, "poll"); */
|
||||
realdup2 = dlsym(RTLD_NEXT, "dup2");
|
||||
realdup3 = dlsym(RTLD_NEXT, "dup3");
|
||||
#ifdef USE_SOCKS_DNS
|
||||
realresinit = dlsym(lib, "res_init");
|
||||
#endif
|
||||
dlclose(lib);
|
||||
lib = dlopen(LIBC, RTLD_LAZY);
|
||||
dlclose(lib);
|
||||
|
|
BIN
netcon/libzerotierintercept.so.1.0
Executable file
BIN
netcon/libzerotierintercept.so.1.0
Executable file
Binary file not shown.
Loading…
Add table
Reference in a new issue