Go back to a 2 args debug_decl and just use the "default" instance,

now renamed "active".
This commit is contained in:
Todd C. Miller
2015-02-01 08:24:49 -07:00
parent e71726d0f9
commit 59ab26dbcc
95 changed files with 843 additions and 895 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2010-2014 Todd C. Miller <Todd.Miller@courtesan.com>
* Copyright (c) 2008, 2010-2015 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -51,8 +51,6 @@
__dso_public int main(int argc, char *argv[], char *envp[]);
int sudo_debug_instance = SUDO_DEBUG_INSTANCE_INITIALIZER;
static int sesh_sudoedit(int argc, char *argv[]);
/*
@@ -68,7 +66,7 @@ int
main(int argc, char *argv[], char *envp[])
{
int ret;
debug_decl(main, SUDO_DEBUG_MAIN, sudo_debug_instance)
debug_decl(main, SUDO_DEBUG_MAIN)
initprogname(argc > 0 ? argv[0] : "sesh");
@@ -81,8 +79,8 @@ main(int argc, char *argv[], char *envp[])
/* Read sudo.conf and initialize the debug subsystem. */
sudo_conf_read(NULL, SUDO_CONF_DEBUG);
sudo_debug_instance = sudo_debug_register(getprogname(),
NULL, NULL, sudo_conf_debug_files(getprogname()));
sudo_debug_register(getprogname(), NULL, NULL,
sudo_conf_debug_files(getprogname()));
if (strcmp(argv[1], "-e") == 0) {
ret = sesh_sudoedit(argc, argv);
@@ -125,7 +123,7 @@ sesh_sudoedit(int argc, char *argv[])
struct stat sb;
struct timeval times[2];
char buf[BUFSIZ];
debug_decl(sesh_sudoedit, SUDO_DEBUG_EDIT, sudo_debug_instance)
debug_decl(sesh_sudoedit, SUDO_DEBUG_EDIT)
if (argc < 3)
debug_return_int(SESH_ERR_FAILURE);