Clean up some XXXs

This commit is contained in:
Todd C. Miller
2010-06-15 15:01:11 -04:00
parent d92c82ea3f
commit f64bb67c6c
7 changed files with 5 additions and 23 deletions

View File

@@ -60,8 +60,6 @@
#include "sudo_plugin.h"
#include "sudo_plugin_int.h"
extern struct user_details user_details; /* XXX need tty name for SELinux */
/* shared with exec_pty.c */
sig_atomic_t recvsig[NSIG];
void handler(int s);

View File

@@ -111,8 +111,6 @@ static void sync_ttysize(int src, int dst);
static void deliver_signal(pid_t pid, int signo);
static int safe_close(int fd);
extern struct user_details user_details; /* XXX need tty name for SELinux */
/*
* Cleanup hook for error()/errorx()
*/
@@ -538,10 +536,6 @@ fork_pty(struct command_details *details, char *argv[], char *envp[],
sa.sa_flags = SA_INTERRUPT; /* do not restart syscalls */
sa.sa_handler = handler;
sigaction(SIGTSTP, &sa, NULL);
#if 0 /* XXX - add these? */
sigaction(SIGTTIN, &sa, NULL);
sigaction(SIGTTOU, &sa, NULL);
#endif
if (foreground) {
/* Copy terminal attrs from user tty -> pty slave. */

View File

@@ -56,11 +56,7 @@
extern char *optarg;
extern int optind;
extern struct user_details user_details;
/* XXX - better home for these and extern in header file */
int tgetpass_flags;
const char *list_user, *runas_user, *runas_group;
/*
* Local functions.

View File

@@ -87,6 +87,8 @@
*/
struct plugin_container policy_plugin;
struct plugin_container_list io_plugins;
struct user_details user_details;
const char *list_user, *runas_user, *runas_group; /* extern for parse_args.c */
int debug_level;
/*
@@ -98,12 +100,6 @@ static char **get_user_info(struct user_details *);
static void command_info_to_details(char * const info[],
struct command_details *details);
/* XXX - header file */
extern const char *list_user, *runas_user, *runas_group;
/* Needed by tgetpass when executing askpass helper */
struct user_details user_details;
#if defined(RLIMIT_CORE) && !defined(SUDO_DEVEL)
static struct rlimit corelimit;
#endif /* RLIMIT_CORE && !SUDO_DEVEL */

View File

@@ -192,6 +192,7 @@ int atobool(const char *str);
/* parse_args.c */
int parse_args(int argc, char **argv, int *nargc, char ***nargv,
char ***settingsp, char ***env_addp);
extern int tgetpass_flags;
/* get_pty.c */
int get_pty(int *master, int *slave, char *name, size_t namesz, uid_t uid);
@@ -204,8 +205,9 @@ int exec_setup(struct command_details *details, const char *ptyname, int ptyfd);
int run_command(struct command_details *details, char *argv[],
char *envp[]);
void sudo_debug(int level, const char *format, ...) __printflike(2, 3);
extern int debug_level;
extern const char *list_user, *runas_user, *runas_group;
extern struct user_details user_details;
/* sudo_edit.c */
int sudo_edit(struct command_details *details, char *argv[], char *envp[]);

View File

@@ -55,8 +55,6 @@
#include "sudo.h"
extern struct user_details user_details;
static void
switch_user(uid_t euid, gid_t egid, int ngroups, GETGROUPS_T *groups)
{

View File

@@ -62,8 +62,6 @@ static void handler(int);
static char *getln(int, char *, size_t, int);
static char *sudo_askpass(const char *, const char *);
extern struct user_details user_details; /* XXX */
#ifdef _PATH_SUDO_ASKPASS
const char *askpass_path = _PATH_SUDO_ASKPASS;
#else