Use setprogname() as needed.

This commit is contained in:
Todd C. Miller
2010-05-30 06:35:21 -04:00
parent 0e2d33b5fc
commit 1a217bcc22
3 changed files with 14 additions and 14 deletions

View File

@@ -101,10 +101,6 @@
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
@@ -165,6 +161,8 @@ struct search_node {
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",
@@ -212,8 +210,9 @@ main(int argc, char *argv[])
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) {