extern void printtrailer P((struct tcb *));
extern void tabto P((int));
extern void call_summary P((FILE *));
-extern void fake_execve P((struct tcb *, char *, char *[], char *[]));
extern void printtv32 P((struct tcb*, long));
extern void tprint_iov P((struct tcb *, int, long));
#endif
-void
-fake_execve(tcp, program, argv, envp)
-struct tcb *tcp;
-char *program;
-char *argv[];
-char *envp[];
-{
- int i;
-
-#ifdef ARM
- if (!(qual_flags[SYS_execve - __NR_SYSCALL_BASE] & QUAL_TRACE))
- return;
-#else
- if (!(qual_flags[SYS_execve] & QUAL_TRACE))
- return;
-#endif /* !ARM */
- printleader(tcp);
- tprintf("execve(");
- string_quote(program);
- tprintf(", [");
- for (i = 0; argv[i] != NULL; i++) {
- if (i != 0)
- tprintf(", ");
- string_quote(argv[i]);
- }
- for (i = 0; envp[i] != NULL; i++)
- ;
- tprintf("], [/* %d var%s */]) ", i, (i != 1) ? "s" : "");
- tabto(acolumn);
- tprintf("= 0");
- printtrailer(tcp);
-}
-
static void
printargv(tcp, addr)
struct tcb *tcp;
}
else
setreuid(run_uid, run_uid);
+
+ /*
+ * Induce an immediate stop so that the parent
+ * will resume us with PTRACE_SYSCALL and display
+ * this execve call normally.
+ */
+ kill(getpid(), SIGSTOP);
#endif /* !USE_PROCFS */
execv(pathname, &argv[optind]);
exit(1);
}
#endif /* USE_PROCFS */
-#ifndef USE_PROCFS
- if (!cflag)
- fake_execve(tcp, pathname,
- &argv[optind], environ);
-#endif /* !USE_PROCFS */
break;
}
}