|
@@ -43,7 +43,6 @@
|
|
|
#include <sys/ptrace.h>
|
|
#include <sys/ptrace.h>
|
|
|
#include <sys/wait.h>
|
|
#include <sys/wait.h>
|
|
|
#endif /* S_ANTITRACE */
|
|
#endif /* S_ANTITRACE */
|
|
|
-#include <dirent.h>
|
|
|
|
|
#include <pwd.h>
|
|
#include <pwd.h>
|
|
|
|
|
|
|
|
#include "chan.h"
|
|
#include "chan.h"
|
|
@@ -201,27 +200,6 @@ void checkpass()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int clear_tmp()
|
|
|
|
|
-{
|
|
|
|
|
- DIR *tmp;
|
|
|
|
|
- struct dirent *dir_ent;
|
|
|
|
|
- if (!(tmp = opendir(tempdir))) return 1;
|
|
|
|
|
- while ((dir_ent = readdir(tmp))) {
|
|
|
|
|
- if (strncmp(dir_ent->d_name, ".pid.", 4) && strncmp(dir_ent->d_name, ".u", 2) && strcmp(dir_ent->d_name, ".bin.old")
|
|
|
|
|
- && strcmp(dir_ent->d_name, ".") && strcmp(dir_ent->d_name, ".un") && strcmp(dir_ent->d_name, "..")) {
|
|
|
|
|
- char *file = malloc(strlen(dir_ent->d_name) + strlen(tempdir) + 1);
|
|
|
|
|
- file[0] = 0;
|
|
|
|
|
- strcat(file, tempdir);
|
|
|
|
|
- strcat(file, dir_ent->d_name);
|
|
|
|
|
- file[strlen(file)] = 0;
|
|
|
|
|
- unlink(file);
|
|
|
|
|
- free(file);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- closedir(tmp);
|
|
|
|
|
- return 0;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
void got_ed(char *which, char *in, char *out)
|
|
void got_ed(char *which, char *in, char *out)
|
|
|
{
|
|
{
|
|
|
sdprintf(STR("got_Ed called: -%s i: %s o: %s"), which, in, out);
|
|
sdprintf(STR("got_Ed called: -%s i: %s o: %s"), which, in, out);
|