diff --git a/sudo.c b/sudo.c index fd4025c7d..85ce854b8 100644 --- a/sudo.c +++ b/sudo.c @@ -399,6 +399,11 @@ main(argc, argv, envp) "please report this error at http://courtesan.com/sudo/bugs/"); } +#ifdef HAVE_SYSTRACE + if (ISSET(validated, FLAG_TRACE)) + systrace_attach(getpid()); +#endif + /* Override user's umask if configured to do so. */ if (def_umask != 0777) (void) umask(def_umask); diff --git a/sudo.h b/sudo.h index 80da4e6d8..559ee4930 100644 --- a/sudo.h +++ b/sudo.h @@ -239,6 +239,9 @@ int pam_prep_user __P((struct passwd *)); void zero_bytes __P((volatile VOID *, size_t)); int gettime __P((struct timespec *)); YY_DECL; +#ifdef HAVE_SYSTRACE +void systrace_attach __P((pid_t)); +#endif /* Only provide extern declarations outside of sudo.c. */ #ifndef _SUDO_MAIN