X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fsudo_exec.h;h=9238fda879b97416f1944e45766ca1d43132d67f;hb=e8db7f6eea9b35527ddd4532affabd18a30549b5;hp=eb104cdd12eaa90ee89e0d586e38d04ffda1ba1d;hpb=98b9fd63cd28a3636a7cd24641b8f497eaadcd50;p=debian%2Fsudo diff --git a/src/sudo_exec.h b/src/sudo_exec.h index eb104cd..9238fda 100644 --- a/src/sudo_exec.h +++ b/src/sudo_exec.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Todd C. Miller + * Copyright (c) 2010-2013 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -23,13 +23,29 @@ #define SIGCONT_FG -2 #define SIGCONT_BG -3 +/* + * Positions in saved_signals[] + */ +#define SAVED_SIGALRM 0 +#define SAVED_SIGCHLD 1 +#define SAVED_SIGCONT 2 +#define SAVED_SIGHUP 3 +#define SAVED_SIGINT 4 +#define SAVED_SIGPIPE 5 +#define SAVED_SIGQUIT 6 +#define SAVED_SIGTERM 7 +#define SAVED_SIGTSTP 8 +#define SAVED_SIGTTIN 9 +#define SAVED_SIGTTOU 10 +#define SAVED_SIGUSR1 11 +#define SAVED_SIGUSR2 12 + /* * Symbols shared between exec.c and exec_pty.c */ /* exec.c */ int sudo_execve(const char *path, char *const argv[], char *const envp[], int noexec); -int pipe_nonblock(int fds[2]); extern volatile pid_t cmnd_pid; /* exec_pty.c */ @@ -38,6 +54,8 @@ struct command_status; int fork_pty(struct command_details *details, int sv[], int *maxfd, sigset_t *omask); int perform_io(fd_set *fdsr, fd_set *fdsw, struct command_status *cstat); int suspend_parent(int signo); +void exec_cmnd(struct command_details *details, struct command_status *cstat, + int *errfd); void fd_set_iobs(fd_set *fdsr, fd_set *fdsw); #ifdef SA_SIGINFO void handler(int s, siginfo_t *info, void *context); @@ -47,7 +65,6 @@ void handler(int s); void pty_close(struct command_status *cstat); void pty_setup(uid_t uid, const char *tty, const char *utmp_user); void terminate_command(pid_t pid, bool use_pgrp); -extern int signal_pipe[2]; /* utmp.c */ bool utmp_login(const char *from_line, const char *to_line, int ttyfd,