The sudoers plugin now defines its own list of debugging subsystem names

and defines.
This commit is contained in:
Todd C. Miller
2014-10-22 13:30:52 -06:00
parent 866cfc4fc3
commit e9914a91b1
62 changed files with 641 additions and 558 deletions

View File

@@ -50,12 +50,12 @@ static size_t
fill_seq(char *str, size_t strsize, char *logdir)
{
#ifdef SUDOERS_NO_SEQ
debug_decl(fill_seq, SUDO_DEBUG_UTIL, sudoers_debug_instance)
debug_decl(fill_seq, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
debug_return_size_t(strlcpy(str, "%{seq}", strsize));
#else
static char sessid[7];
int len;
debug_decl(fill_seq, SUDO_DEBUG_UTIL, sudoers_debug_instance)
debug_decl(fill_seq, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (sessid[0] == '\0') {
if (!io_nextid(logdir, def_iolog_dir, sessid))
@@ -74,7 +74,7 @@ fill_seq(char *str, size_t strsize, char *logdir)
static size_t
fill_user(char *str, size_t strsize, char *unused)
{
debug_decl(fill_user, SUDO_DEBUG_UTIL, sudoers_debug_instance)
debug_decl(fill_user, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
debug_return_size_t(strlcpy(str, user_name, strsize));
}
@@ -83,7 +83,7 @@ fill_group(char *str, size_t strsize, char *unused)
{
struct group *grp;
size_t len;
debug_decl(fill_group, SUDO_DEBUG_UTIL, sudoers_debug_instance)
debug_decl(fill_group, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if ((grp = sudo_getgrgid(user_gid)) != NULL) {
len = strlcpy(str, grp->gr_name, strsize);
@@ -99,7 +99,7 @@ fill_group(char *str, size_t strsize, char *unused)
static size_t
fill_runas_user(char *str, size_t strsize, char *unused)
{
debug_decl(fill_runas_user, SUDO_DEBUG_UTIL, sudoers_debug_instance)
debug_decl(fill_runas_user, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
debug_return_size_t(strlcpy(str, runas_pw->pw_name, strsize));
}
@@ -108,7 +108,7 @@ fill_runas_group(char *str, size_t strsize, char *unused)
{
struct group *grp;
size_t len;
debug_decl(fill_runas_group, SUDO_DEBUG_UTIL, sudoers_debug_instance)
debug_decl(fill_runas_group, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (runas_gr != NULL) {
len = strlcpy(str, runas_gr->gr_name, strsize);
@@ -128,14 +128,14 @@ fill_runas_group(char *str, size_t strsize, char *unused)
static size_t
fill_hostname(char *str, size_t strsize, char *unused)
{
debug_decl(fill_hostname, SUDO_DEBUG_UTIL, sudoers_debug_instance)
debug_decl(fill_hostname, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
debug_return_size_t(strlcpy(str, user_shost, strsize));
}
static size_t
fill_command(char *str, size_t strsize, char *unused)
{
debug_decl(fill_command, SUDO_DEBUG_UTIL, sudoers_debug_instance)
debug_decl(fill_command, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
debug_return_size_t(strlcpy(str, user_base, strsize));
}
@@ -167,7 +167,7 @@ expand_iolog_path(const char *prefix, const char *dir, const char *file,
struct path_escape *escapes = NULL;
int pass, oldlocale;
bool strfit;
debug_decl(expand_iolog_path, SUDO_DEBUG_UTIL, sudoers_debug_instance)
debug_decl(expand_iolog_path, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* Expanded path must be <= PATH_MAX */
if (prefix != NULL)