* Global variables
*/
char *Prog;
-/* PID of the child, in case it needs to be killed */
-static pid_t pid_child = 0;
/* not needed by sulog.c anymore */
static char name[BUFSIZ];
#ifdef USE_PAM
static pam_handle_t *pamh = NULL;
static bool caught = false;
+/* PID of the child, in case it needs to be killed */
+static pid_t pid_child = 0;
#endif
extern struct passwd pwent;
static void execve_shell (const char *shellstr,
char *args[],
char *const envp[]);
-static RETSIGTYPE kill_child (int s);
-#ifndef USE_PAM
+#ifdef USE_PAM
+static RETSIGTYPE kill_child (int unused(s));
+#else /* !USE_PAM */
static RETSIGTYPE die (int);
static int iswheel (const char *);
#endif /* !USE_PAM */
}
return is_on_list (grp->gr_mem, username);
}
-#endif /* !USE_PAM */
-
+#else /* USE_PAM */
static RETSIGTYPE kill_child (int unused(s))
{
if (0 != pid_child) {
}
exit (255);
}
+#endif /* USE_PAM */
/* borrowed from GNU sh-utils' "su.c" */
static bool restricted_shell (const char *shellstr)