A few very tiny bits of dead code removal, etc.

This commit is contained in:
Adam Ierymenko 2015-11-23 12:32:20 -08:00
parent a18336fa18
commit 1d4563ac31
2 changed files with 15 additions and 35 deletions

View file

@ -29,9 +29,6 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
/* Name used in err msgs */
char *progname = "";
#include <unistd.h> #include <unistd.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
@ -63,9 +60,6 @@ char *progname = "";
#endif #endif
/* Global Declarations */ /* Global Declarations */
#ifdef USE_SOCKS_DNS
static int (*realresinit)(void);
#endif
static int (*realconnect)(CONNECT_SIG); static int (*realconnect)(CONNECT_SIG);
static int (*realselect)(SELECT_SIG); static int (*realselect)(SELECT_SIG);
static int (*realbind)(BIND_SIG); static int (*realbind)(BIND_SIG);
@ -100,11 +94,6 @@ int clone(CLONE_SIG);
int dup2(DUP2_SIG); int dup2(DUP2_SIG);
int dup3(DUP3_SIG); int dup3(DUP3_SIG);
#ifdef USE_SOCKS_DNS
int res_init(void);
#endif
int connect_to_service(void); int connect_to_service(void);
int init_service_connection(); int init_service_connection();
void load_symbols(void); void load_symbols(void);
@ -117,8 +106,8 @@ int checkpid();
ssize_t sock_fd_read(int sock, void *buf, ssize_t bufsize, int *fd); ssize_t sock_fd_read(int sock, void *buf, ssize_t bufsize, int *fd);
/* threading */ /* threading */
pthread_mutex_t lock; static pthread_mutex_t lock;
pthread_mutex_t loglock; static pthread_mutex_t loglock;
void handle_error(char *name, char *info, int err) void handle_error(char *name, char *info, int err)
{ {
@ -328,13 +317,8 @@ void load_symbols(void)
realclone = dlsym(RTLD_NEXT, "clone"); realclone = dlsym(RTLD_NEXT, "clone");
realclose = dlsym(RTLD_NEXT, "close"); realclose = dlsym(RTLD_NEXT, "close");
realsyscall = dlsym(RTLD_NEXT, "syscall"); realsyscall = dlsym(RTLD_NEXT, "syscall");
/* realsyscall = dlsym(RTLD_NEXT, "poll"); */
realdup2 = dlsym(RTLD_NEXT, "dup2"); realdup2 = dlsym(RTLD_NEXT, "dup2");
realdup3 = dlsym(RTLD_NEXT, "dup3"); realdup3 = dlsym(RTLD_NEXT, "dup3");
#ifdef USE_SOCKS_DNS
realresinit = dlsym(RTLD_NEXT, "res_init");
#endif
#else #else
lib = dlopen(LIBCONNECT, RTLD_LAZY); lib = dlopen(LIBCONNECT, RTLD_LAZY);
realconnect = dlsym(lib, "connect"); realconnect = dlsym(lib, "connect");
@ -349,12 +333,8 @@ void load_symbols(void)
realclone = dlsym(lib, "clone"); realclone = dlsym(lib, "clone");
realclose = dlsym(lib, "close"); realclose = dlsym(lib, "close");
realsyscall = dlsym(lib, "syscall"); realsyscall = dlsym(lib, "syscall");
/* realsyscall = dlsym(lib, "poll"); */
realdup2 = dlsym(RTLD_NEXT, "dup2"); realdup2 = dlsym(RTLD_NEXT, "dup2");
realdup3 = dlsym(RTLD_NEXT, "dup3"); realdup3 = dlsym(RTLD_NEXT, "dup3");
#ifdef USE_SOCKS_DNS
realresinit = dlsym(lib, "res_init");
#endif
dlclose(lib); dlclose(lib);
lib = dlopen(LIBC, RTLD_LAZY); lib = dlopen(LIBC, RTLD_LAZY);
dlclose(lib); dlclose(lib);

Binary file not shown.