extern char *optarg;
extern int optind;
-int Argc;
-char **Argv;
-const char *session_dir = _PATH_SUDO_TRANSCRIPT;
-
union io_fd {
FILE *f;
#ifdef HAVE_ZLIB
static struct search_node *node_stack[32];
static int stack_top;
+static const char *session_dir = _PATH_SUDO_TRANSCRIPT;
+
static union io_fd io_fds[IOFD_MAX];
static const char *io_fnames[IOFD_MAX] = {
"/stdin",
size_t len, nread, off;
ssize_t nwritten;
- Argc = argc;
- Argv = argv;
+#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME)
+ setprogname(argc > 0 argv[0] ? "sudoreplay");
+#endif
while ((ch = getopt(argc, argv, "d:lm:s:V")) != -1) {
switch(ch) {
/*
* Globals
*/
-int Argc, NewArgc;
-char **Argv, **NewArgv;
+int NewArgc;
+char **NewArgv;
int num_interfaces;
struct interface *interfaces;
struct sudo_user sudo_user;
yydebug = 1;
#endif
- Argv = argv;
- Argc = argc;
+#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME)
+ setprogname(argc > 0 argv[0] ? "testsudoers");
+#endif
dflag = 0;
grfile = pwfile = runas_group = runas_user = NULL;
/*
* Globals
*/
-int Argc;
-char **Argv;
int num_interfaces;
struct interface *interfaces;
struct sudo_user sudo_user;
malloc_options = "AFGJPR";
#endif
- Argv = argv;
- if ((Argc = argc) < 1)
+#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME)
+ setprogname(argc > 0 argv[0] ? "visudo");
+#endif
+ if (argc < 1)
usage();
/*