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

@@ -437,6 +437,7 @@ plugins/sudoers/sudoers.h
plugins/sudoers/sudoers.in plugins/sudoers/sudoers.in
plugins/sudoers/sudoers2ldif plugins/sudoers/sudoers2ldif
plugins/sudoers/sudoers_debug.c plugins/sudoers/sudoers_debug.c
plugins/sudoers/sudoers_debug.h
plugins/sudoers/sudoers_version.h plugins/sudoers/sudoers_version.h
plugins/sudoers/sudoreplay.c plugins/sudoers/sudoreplay.c
plugins/sudoers/testsudoers.c plugins/sudoers/testsudoers.c

View File

@@ -65,33 +65,20 @@ struct sudo_conf_debug_file_list;
* Note: order must match sudo_debug_subsystems[] * Note: order must match sudo_debug_subsystems[]
*/ */
#define SUDO_DEBUG_MAIN ( 1<<16) /* sudo main() */ #define SUDO_DEBUG_MAIN ( 1<<16) /* sudo main() */
#define SUDO_DEBUG_ARGS ( 2<<16) /* command line argument processing */ #define SUDO_DEBUG_UTIL ( 2<<16) /* utility functions */
#define SUDO_DEBUG_EXEC ( 3<<16) /* command execution */ #define SUDO_DEBUG_NETIF ( 3<<16) /* network interface functions */
#define SUDO_DEBUG_PTY ( 4<<16) /* pseudo-tty */ #define SUDO_DEBUG_PLUGIN ( 4<<16) /* main plugin functions */
#define SUDO_DEBUG_UTMP ( 5<<16) /* utmp file ops */ #define SUDO_DEBUG_EVENT ( 5<<16) /* event handling */
#define SUDO_DEBUG_CONV ( 6<<16) /* user conversation */ #define SUDO_DEBUG_ARGS ( 6<<16) /* command line argument processing */
#define SUDO_DEBUG_PCOMM ( 7<<16) /* plugin communications */ #define SUDO_DEBUG_EXEC ( 7<<16) /* command execution */
#define SUDO_DEBUG_UTIL ( 8<<16) /* utility functions */ #define SUDO_DEBUG_PTY ( 8<<16) /* pseudo-tty */
#define SUDO_DEBUG_NETIF ( 9<<16) /* network interface functions */ #define SUDO_DEBUG_UTMP ( 9<<16) /* utmp file ops */
#define SUDO_DEBUG_AUDIT (10<<16) /* audit */ #define SUDO_DEBUG_CONV (10<<16) /* user conversation */
#define SUDO_DEBUG_EDIT (11<<16) /* sudoedit */ #define SUDO_DEBUG_PCOMM (11<<16) /* plugin communications */
#define SUDO_DEBUG_SELINUX (12<<16) /* selinux */ #define SUDO_DEBUG_EDIT (12<<16) /* sudoedit */
#define SUDO_DEBUG_LDAP (13<<16) /* sudoers LDAP */ #define SUDO_DEBUG_SELINUX (13<<16) /* selinux */
#define SUDO_DEBUG_MATCH (14<<16) /* sudoers matching */ #define SUDO_DEBUG_HOOKS (14<<16) /* hook functions */
#define SUDO_DEBUG_PARSER (15<<16) /* sudoers parser */ #define SUDO_DEBUG_ALL 0xffff0000 /* all subsystems */
#define SUDO_DEBUG_ALIAS (16<<16) /* sudoers alias functions */
#define SUDO_DEBUG_DEFAULTS (17<<16) /* sudoers defaults settings */
#define SUDO_DEBUG_AUTH (18<<16) /* authentication functions */
#define SUDO_DEBUG_ENV (19<<16) /* environment handling */
#define SUDO_DEBUG_LOGGING (20<<16) /* logging functions */
#define SUDO_DEBUG_NSS (21<<16) /* network service switch */
#define SUDO_DEBUG_RBTREE (22<<16) /* red-black tree functions */
#define SUDO_DEBUG_PERMS (23<<16) /* uid/gid swapping functions */
#define SUDO_DEBUG_PLUGIN (24<<16) /* main plugin functions */
#define SUDO_DEBUG_HOOKS (25<<16) /* hook functions */
#define SUDO_DEBUG_SSSD (26<<16) /* sudoers SSSD */
#define SUDO_DEBUG_EVENT (27<<16) /* event handling */
#define SUDO_DEBUG_ALL 0xffff0000 /* all subsystems */
/* Initializer for instance index to indicate that debugging is not setup. */ /* Initializer for instance index to indicate that debugging is not setup. */
#define SUDO_DEBUG_INSTANCE_INITIALIZER SUDO_DEBUG_MKINSTANCE(-1) #define SUDO_DEBUG_INSTANCE_INITIALIZER SUDO_DEBUG_MKINSTANCE(-1)

View File

@@ -85,35 +85,21 @@ static const char *const sudo_debug_priorities[] = {
}; };
/* Note: this must match the order in sudo_debug.h */ /* Note: this must match the order in sudo_debug.h */
/* XXX - remove sudoers-specific bits */
static const char *const sudo_debug_default_subsystems[] = { static const char *const sudo_debug_default_subsystems[] = {
"main", "main",
"util",
"netif",
"plugin",
"event",
"args", "args",
"exec", "exec",
"pty", "pty",
"utmp", "utmp",
"conv", "conv",
"pcomm", "pcomm",
"util",
"netif",
"audit",
"edit", "edit",
"selinux", "selinux",
"ldap",
"match",
"parser",
"alias",
"defaults",
"auth",
"env",
"logging",
"nss",
"rbtree",
"perms",
"plugin",
"hooks", "hooks",
"sssd",
"event",
NULL NULL
}; };

View File

@@ -52,7 +52,7 @@ static int
get_ttysize_ioctl(int *rowp, int *colp) get_ttysize_ioctl(int *rowp, int *colp)
{ {
struct winsize wsize; struct winsize wsize;
debug_decl(get_ttysize_ioctl, SUDO_DEBUG_EXEC, SUDO_DEBUG_INSTANCE_DEFAULT) debug_decl(get_ttysize_ioctl, SUDO_DEBUG_UTIL, SUDO_DEBUG_INSTANCE_DEFAULT)
if (ioctl(STDERR_FILENO, TIOCGWINSZ, &wsize) == 0 && if (ioctl(STDERR_FILENO, TIOCGWINSZ, &wsize) == 0 &&
wsize.ws_row != 0 && wsize.ws_col != 0) { wsize.ws_row != 0 && wsize.ws_col != 0) {
@@ -73,7 +73,7 @@ get_ttysize_ioctl(int *rowp, int *colp)
void void
sudo_get_ttysize_v1(int *rowp, int *colp) sudo_get_ttysize_v1(int *rowp, int *colp)
{ {
debug_decl(sudo_get_ttysize, SUDO_DEBUG_EXEC, SUDO_DEBUG_INSTANCE_DEFAULT) debug_decl(sudo_get_ttysize, SUDO_DEBUG_UTIL, SUDO_DEBUG_INSTANCE_DEFAULT)
if (get_ttysize_ioctl(rowp, colp) == -1) { if (get_ttysize_ioctl(rowp, colp) == -1) {
char *p; char *p;

View File

@@ -461,7 +461,8 @@ afs.lo: $(authdir)/afs.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/afs.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/afs.c
aix_auth.lo: $(authdir)/aix_auth.c $(devdir)/def_data.h \ aix_auth.lo: $(authdir)/aix_auth.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -470,7 +471,8 @@ aix_auth.lo: $(authdir)/aix_auth.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/aix_auth.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/aix_auth.c
alias.lo: $(srcdir)/alias.c $(devdir)/def_data.h $(devdir)/gram.h \ alias.lo: $(srcdir)/alias.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -479,7 +481,8 @@ alias.lo: $(srcdir)/alias.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \
$(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/alias.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/alias.c
audit.lo: $(srcdir)/audit.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ audit.lo: $(srcdir)/audit.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \
@@ -488,7 +491,8 @@ audit.lo: $(srcdir)/audit.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/bsm_audit.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/bsm_audit.h \
$(srcdir)/defaults.h $(srcdir)/linux_audit.h $(srcdir)/logging.h \ $(srcdir)/defaults.h $(srcdir)/linux_audit.h $(srcdir)/logging.h \
$(srcdir)/solaris_audit.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/solaris_audit.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/audit.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/audit.c
base64.lo: $(srcdir)/base64.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ base64.lo: $(srcdir)/base64.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \
@@ -496,7 +500,8 @@ base64.lo: $(srcdir)/base64.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/base64.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/base64.c
base64.o: base64.lo base64.o: base64.lo
boottime.lo: $(srcdir)/boottime.c $(devdir)/def_data.h \ boottime.lo: $(srcdir)/boottime.c $(devdir)/def_data.h \
@@ -506,7 +511,8 @@ boottime.lo: $(srcdir)/boottime.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/boottime.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/boottime.c
bsdauth.lo: $(authdir)/bsdauth.c $(devdir)/def_data.h \ bsdauth.lo: $(authdir)/bsdauth.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -515,7 +521,8 @@ bsdauth.lo: $(authdir)/bsdauth.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/bsdauth.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/bsdauth.c
bsm_audit.lo: $(srcdir)/bsm_audit.c $(incdir)/sudo_compat.h \ bsm_audit.lo: $(srcdir)/bsm_audit.c $(incdir)/sudo_compat.h \
$(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h \ $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h \
@@ -528,8 +535,8 @@ check.lo: $(srcdir)/check.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/check.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/check.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/check.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/check.c
check_addr.o: $(srcdir)/regress/parser/check_addr.c $(devdir)/def_data.h \ check_addr.o: $(srcdir)/regress/parser/check_addr.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -539,7 +546,8 @@ check_addr.o: $(srcdir)/regress/parser/check_addr.c $(devdir)/def_data.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \
$(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/regress/parser/check_addr.c $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/regress/parser/check_addr.c
check_base64.o: $(srcdir)/regress/parser/check_base64.c \ check_base64.o: $(srcdir)/regress/parser/check_base64.c \
$(incdir)/sudo_compat.h $(top_builddir)/config.h $(incdir)/sudo_compat.h $(top_builddir)/config.h
@@ -566,7 +574,8 @@ check_iolog_path.o: $(srcdir)/regress/iolog_path/check_iolog_path.c \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h \ $(srcdir)/defaults.h $(srcdir)/logging.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/regress/iolog_path/check_iolog_path.c $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/regress/iolog_path/check_iolog_path.c
check_symbols.o: $(srcdir)/regress/check_symbols/check_symbols.c \ check_symbols.o: $(srcdir)/regress/check_symbols/check_symbols.c \
$(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \
@@ -583,7 +592,8 @@ dce.lo: $(authdir)/dce.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/dce.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/dce.c
defaults.lo: $(srcdir)/defaults.c $(devdir)/def_data.c $(devdir)/def_data.h \ defaults.lo: $(srcdir)/defaults.c $(devdir)/def_data.c $(devdir)/def_data.h \
$(devdir)/gram.h $(incdir)/compat/stdbool.h \ $(devdir)/gram.h $(incdir)/compat/stdbool.h \
@@ -593,14 +603,16 @@ defaults.lo: $(srcdir)/defaults.c $(devdir)/def_data.c $(devdir)/def_data.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \
$(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \
$(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/defaults.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/defaults.c
env.lo: $(srcdir)/env.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ env.lo: $(srcdir)/env.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \
$(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/env.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/env.c
find_path.lo: $(srcdir)/find_path.c $(devdir)/def_data.h \ find_path.lo: $(srcdir)/find_path.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -609,8 +621,8 @@ find_path.lo: $(srcdir)/find_path.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/find_path.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/find_path.c
find_path.o: find_path.lo find_path.o: find_path.lo
fwtk.lo: $(authdir)/fwtk.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ fwtk.lo: $(authdir)/fwtk.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
@@ -619,7 +631,8 @@ fwtk.lo: $(authdir)/fwtk.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/fwtk.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/fwtk.c
getdate.o: $(devdir)/getdate.c $(incdir)/sudo_compat.h $(top_builddir)/config.h getdate.o: $(devdir)/getdate.c $(incdir)/sudo_compat.h $(top_builddir)/config.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(devdir)/getdate.c $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(devdir)/getdate.c
@@ -630,8 +643,8 @@ getspwuid.lo: $(srcdir)/getspwuid.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/getspwuid.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/getspwuid.c
goodpath.lo: $(srcdir)/goodpath.c $(devdir)/def_data.h \ goodpath.lo: $(srcdir)/goodpath.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -640,7 +653,8 @@ goodpath.lo: $(srcdir)/goodpath.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/goodpath.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/goodpath.c
goodpath.o: goodpath.lo goodpath.o: goodpath.lo
gram.lo: $(devdir)/gram.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ gram.lo: $(devdir)/gram.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
@@ -649,8 +663,8 @@ gram.lo: $(devdir)/gram.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(srcdir)/toke.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(srcdir)/toke.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(devdir)/gram.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(devdir)/gram.c
group_plugin.lo: $(srcdir)/group_plugin.c $(devdir)/def_data.h \ group_plugin.lo: $(srcdir)/group_plugin.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -660,7 +674,8 @@ group_plugin.lo: $(srcdir)/group_plugin.c $(devdir)/def_data.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \
$(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/group_plugin.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/group_plugin.c
group_plugin.o: group_plugin.lo group_plugin.o: group_plugin.lo
hexchar.lo: $(srcdir)/hexchar.c $(devdir)/def_data.h \ hexchar.lo: $(srcdir)/hexchar.c $(devdir)/def_data.h \
@@ -670,7 +685,8 @@ hexchar.lo: $(srcdir)/hexchar.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/hexchar.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/hexchar.c
hexchar.o: hexchar.lo hexchar.o: hexchar.lo
interfaces.lo: $(srcdir)/interfaces.c $(devdir)/def_data.h \ interfaces.lo: $(srcdir)/interfaces.c $(devdir)/def_data.h \
@@ -681,7 +697,8 @@ interfaces.lo: $(srcdir)/interfaces.c $(devdir)/def_data.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/interfaces.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/interfaces.c
interfaces.o: interfaces.lo interfaces.o: interfaces.lo
iolog.lo: $(srcdir)/iolog.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ iolog.lo: $(srcdir)/iolog.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
@@ -690,8 +707,8 @@ iolog.lo: $(srcdir)/iolog.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/iolog.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/iolog.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/iolog.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/iolog.c
iolog_path.lo: $(srcdir)/iolog_path.c $(devdir)/def_data.h \ iolog_path.lo: $(srcdir)/iolog_path.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -700,8 +717,8 @@ iolog_path.lo: $(srcdir)/iolog_path.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/iolog_path.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/iolog_path.c
iolog_path.o: iolog_path.lo iolog_path.o: iolog_path.lo
kerb5.lo: $(authdir)/kerb5.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ kerb5.lo: $(authdir)/kerb5.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
@@ -710,7 +727,8 @@ kerb5.lo: $(authdir)/kerb5.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/kerb5.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/kerb5.c
ldap.lo: $(srcdir)/ldap.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ ldap.lo: $(srcdir)/ldap.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \
@@ -718,8 +736,8 @@ ldap.lo: $(srcdir)/ldap.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/ldap.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/ldap.c
linux_audit.lo: $(srcdir)/linux_audit.c $(incdir)/sudo_alloc.h \ linux_audit.lo: $(srcdir)/linux_audit.c $(incdir)/sudo_alloc.h \
$(incdir)/sudo_compat.h $(incdir)/sudo_debug.h \ $(incdir)/sudo_compat.h $(incdir)/sudo_debug.h \
@@ -740,7 +758,8 @@ logging.lo: $(srcdir)/logging.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/logging.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/logging.c
logwrap.lo: $(srcdir)/logwrap.c $(devdir)/def_data.h \ logwrap.lo: $(srcdir)/logwrap.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -749,7 +768,8 @@ logwrap.lo: $(srcdir)/logwrap.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/logwrap.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/logwrap.c
logwrap.o: logwrap.lo logwrap.o: logwrap.lo
match.lo: $(srcdir)/match.c $(devdir)/def_data.h $(devdir)/gram.h \ match.lo: $(srcdir)/match.c $(devdir)/def_data.h $(devdir)/gram.h \
@@ -760,8 +780,8 @@ match.lo: $(srcdir)/match.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/match.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/match.c
match_addr.lo: $(srcdir)/match_addr.c $(devdir)/def_data.h \ match_addr.lo: $(srcdir)/match_addr.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -771,7 +791,8 @@ match_addr.lo: $(srcdir)/match_addr.c $(devdir)/def_data.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/match_addr.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/match_addr.c
match_addr.o: match_addr.lo match_addr.o: match_addr.lo
net_ifs.o: $(top_srcdir)/src/net_ifs.c $(incdir)/compat/stdbool.h \ net_ifs.o: $(top_srcdir)/src/net_ifs.c $(incdir)/compat/stdbool.h \
@@ -785,7 +806,8 @@ pam.lo: $(authdir)/pam.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/pam.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/pam.c
parse.lo: $(srcdir)/parse.c $(devdir)/def_data.h $(devdir)/gram.h \ parse.lo: $(srcdir)/parse.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -794,7 +816,8 @@ parse.lo: $(srcdir)/parse.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ $(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \
$(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \
$(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/parse.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/parse.c
passwd.lo: $(authdir)/passwd.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ passwd.lo: $(authdir)/passwd.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \
@@ -802,7 +825,8 @@ passwd.lo: $(authdir)/passwd.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/passwd.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/passwd.c
policy.lo: $(srcdir)/policy.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ policy.lo: $(srcdir)/policy.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \
@@ -810,8 +834,9 @@ policy.lo: $(srcdir)/policy.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(srcdir)/sudoers_version.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_version.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/policy.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/policy.c
prompt.lo: $(srcdir)/prompt.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ prompt.lo: $(srcdir)/prompt.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \
@@ -819,7 +844,8 @@ prompt.lo: $(srcdir)/prompt.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/prompt.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/prompt.c
pwutil.lo: $(srcdir)/pwutil.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ pwutil.lo: $(srcdir)/pwutil.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h \
@@ -827,8 +853,8 @@ pwutil.lo: $(srcdir)/pwutil.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/pwutil.h $(srcdir)/redblack.h \ $(srcdir)/logging.h $(srcdir)/pwutil.h $(srcdir)/redblack.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/pwutil.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/pwutil.c
pwutil.o: pwutil.lo pwutil.o: pwutil.lo
pwutil_impl.lo: $(srcdir)/pwutil_impl.c $(devdir)/def_data.h \ pwutil_impl.lo: $(srcdir)/pwutil_impl.c $(devdir)/def_data.h \
@@ -839,7 +865,8 @@ pwutil_impl.lo: $(srcdir)/pwutil_impl.c $(devdir)/def_data.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/pwutil.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/pwutil.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/pwutil_impl.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/pwutil_impl.c
pwutil_impl.o: pwutil_impl.lo pwutil_impl.o: pwutil_impl.lo
redblack.lo: $(srcdir)/redblack.c $(devdir)/def_data.h \ redblack.lo: $(srcdir)/redblack.c $(devdir)/def_data.h \
@@ -849,8 +876,8 @@ redblack.lo: $(srcdir)/redblack.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/redblack.h $(srcdir)/sudo_nss.h \ $(srcdir)/logging.h $(srcdir)/redblack.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/redblack.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/redblack.c
redblack.o: redblack.lo redblack.o: redblack.lo
rfc1938.lo: $(authdir)/rfc1938.c $(devdir)/def_data.h \ rfc1938.lo: $(authdir)/rfc1938.c $(devdir)/def_data.h \
@@ -860,7 +887,8 @@ rfc1938.lo: $(authdir)/rfc1938.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/rfc1938.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/rfc1938.c
secureware.lo: $(authdir)/secureware.c $(devdir)/def_data.h \ secureware.lo: $(authdir)/secureware.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -869,8 +897,8 @@ secureware.lo: $(authdir)/secureware.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/secureware.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/secureware.c
securid5.lo: $(authdir)/securid5.c $(devdir)/def_data.h \ securid5.lo: $(authdir)/securid5.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -879,7 +907,8 @@ securid5.lo: $(authdir)/securid5.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/securid5.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/securid5.c
set_perms.lo: $(srcdir)/set_perms.c $(devdir)/def_data.h \ set_perms.lo: $(srcdir)/set_perms.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -888,15 +917,16 @@ set_perms.lo: $(srcdir)/set_perms.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/set_perms.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/set_perms.c
sia.lo: $(authdir)/sia.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ sia.lo: $(authdir)/sia.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \
$(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ $(incdir)/sudo_debug.h $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/sia.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/sia.c
solaris_audit.lo: $(srcdir)/solaris_audit.c $(devdir)/def_data.h \ solaris_audit.lo: $(srcdir)/solaris_audit.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -906,8 +936,8 @@ solaris_audit.lo: $(srcdir)/solaris_audit.c $(devdir)/def_data.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h \ $(srcdir)/defaults.h $(srcdir)/logging.h \
$(srcdir)/solaris_audit.h $(srcdir)/sudo_nss.h \ $(srcdir)/solaris_audit.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/solaris_audit.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/solaris_audit.c
sssd.lo: $(srcdir)/sssd.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ sssd.lo: $(srcdir)/sssd.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ $(incdir)/sudo_alloc.h $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \
@@ -915,8 +945,8 @@ sssd.lo: $(srcdir)/sssd.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sssd.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sssd.c
sudo_auth.lo: $(authdir)/sudo_auth.c $(devdir)/def_data.h \ sudo_auth.lo: $(authdir)/sudo_auth.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -928,7 +958,8 @@ sudo_auth.lo: $(authdir)/sudo_auth.c $(devdir)/def_data.h \
$(srcdir)/ins_classic.h $(srcdir)/ins_csops.h \ $(srcdir)/ins_classic.h $(srcdir)/ins_csops.h \
$(srcdir)/ins_goons.h $(srcdir)/insults.h $(srcdir)/logging.h \ $(srcdir)/ins_goons.h $(srcdir)/insults.h $(srcdir)/logging.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/sudo_auth.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(authdir)/sudo_auth.c
sudo_nss.lo: $(srcdir)/sudo_nss.c $(devdir)/def_data.h \ sudo_nss.lo: $(srcdir)/sudo_nss.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -937,7 +968,8 @@ sudo_nss.lo: $(srcdir)/sudo_nss.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \
$(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudo_nss.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudo_nss.c
sudo_printf.o: $(srcdir)/sudo_printf.c $(incdir)/sudo_compat.h \ sudo_printf.o: $(srcdir)/sudo_printf.c $(incdir)/sudo_compat.h \
@@ -952,8 +984,8 @@ sudoers.lo: $(srcdir)/sudoers.c $(devdir)/def_data.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \
$(incdir)/sudo_util.h $(srcdir)/auth/sudo_auth.h \ $(incdir)/sudo_util.h $(srcdir)/auth/sudo_auth.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/sudo_nss.h \
$(srcdir)/sudoers.h $(top_builddir)/config.h \ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudoers.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudoers.c
sudoers_debug.lo: $(srcdir)/sudoers_debug.c $(devdir)/def_data.h \ sudoers_debug.lo: $(srcdir)/sudoers_debug.c $(devdir)/def_data.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -963,7 +995,8 @@ sudoers_debug.lo: $(srcdir)/sudoers_debug.c $(devdir)/def_data.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h \ $(srcdir)/defaults.h $(srcdir)/logging.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudoers_debug.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudoers_debug.c
sudoers_debug.o: sudoers_debug.lo sudoers_debug.o: sudoers_debug.lo
sudoreplay.o: $(srcdir)/sudoreplay.c $(incdir)/compat/getopt.h \ sudoreplay.o: $(srcdir)/sudoreplay.c $(incdir)/compat/getopt.h \
@@ -984,7 +1017,8 @@ testsudoers.o: $(srcdir)/testsudoers.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \
$(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \ $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/tsgetgrpw.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(srcdir)/sudoers_debug.h $(srcdir)/tsgetgrpw.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/testsudoers.c $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/testsudoers.c
timestamp.lo: $(srcdir)/timestamp.c $(devdir)/def_data.h \ timestamp.lo: $(srcdir)/timestamp.c $(devdir)/def_data.h \
@@ -995,7 +1029,8 @@ timestamp.lo: $(srcdir)/timestamp.c $(devdir)/def_data.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \
$(incdir)/sudo_util.h $(srcdir)/check.h $(srcdir)/defaults.h \ $(incdir)/sudo_util.h $(srcdir)/check.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/timestamp.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/timestamp.c
timestr.lo: $(srcdir)/timestr.c $(incdir)/sudo_compat.h $(top_builddir)/config.h timestr.lo: $(srcdir)/timestr.c $(incdir)/sudo_compat.h $(top_builddir)/config.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/timestr.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/timestr.c
@@ -1006,8 +1041,8 @@ toke.lo: $(devdir)/toke.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \
$(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/toke.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/toke.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(devdir)/toke.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(devdir)/toke.c
toke_util.lo: $(srcdir)/toke_util.c $(devdir)/def_data.h $(devdir)/gram.h \ toke_util.lo: $(srcdir)/toke_util.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -1016,7 +1051,8 @@ toke_util.lo: $(srcdir)/toke_util.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/toke.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(srcdir)/sudoers_debug.h $(srcdir)/toke.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/toke_util.c $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/toke_util.c
toke_util.o: toke_util.lo toke_util.o: toke_util.lo
@@ -1027,8 +1063,8 @@ tsgetgrpw.o: $(srcdir)/tsgetgrpw.c $(devdir)/def_data.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/logging.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(srcdir)/tsgetgrpw.h $(top_builddir)/config.h \ $(srcdir)/sudoers_debug.h $(srcdir)/tsgetgrpw.h \
$(top_builddir)/pathnames.h $(top_builddir)/config.h $(top_builddir)/pathnames.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/tsgetgrpw.c $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/tsgetgrpw.c
visudo.o: $(srcdir)/visudo.c $(devdir)/def_data.h $(devdir)/gram.h \ visudo.o: $(srcdir)/visudo.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/compat/getopt.h $(incdir)/compat/stdbool.h \ $(incdir)/compat/getopt.h $(incdir)/compat/stdbool.h \
@@ -1037,8 +1073,9 @@ visudo.o: $(srcdir)/visudo.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \
$(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/redblack.h \ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/redblack.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_version.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_version.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/visudo.c $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/visudo.c
visudo_json.o: $(srcdir)/visudo_json.c $(devdir)/def_data.h $(devdir)/gram.h \ visudo_json.o: $(srcdir)/visudo_json.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \ $(incdir)/compat/stdbool.h $(incdir)/sudo_alloc.h \
@@ -1048,5 +1085,6 @@ visudo_json.o: $(srcdir)/visudo_json.c $(devdir)/def_data.h $(devdir)/gram.h \
$(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \
$(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \
$(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \
$(top_builddir)/config.h $(top_builddir)/pathnames.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \
$(top_builddir)/pathnames.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/visudo_json.c $(CC) -c $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/visudo_json.c

View File

@@ -60,7 +60,7 @@ alias_compare(const void *v1, const void *v2)
const struct alias *a1 = (const struct alias *)v1; const struct alias *a1 = (const struct alias *)v1;
const struct alias *a2 = (const struct alias *)v2; const struct alias *a2 = (const struct alias *)v2;
int res; int res;
debug_decl(alias_compare, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(alias_compare, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
if (v1 == NULL) if (v1 == NULL)
res = -1; res = -1;
@@ -83,7 +83,7 @@ alias_get(char *name, int type)
struct alias key; struct alias key;
struct rbnode *node; struct rbnode *node;
struct alias *a = NULL; struct alias *a = NULL;
debug_decl(alias_get, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(alias_get, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
key.name = name; key.name = name;
key.type = type; key.type = type;
@@ -111,7 +111,7 @@ alias_get(char *name, int type)
void void
alias_put(struct alias *a) alias_put(struct alias *a)
{ {
debug_decl(alias_put, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(alias_put, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
a->used = false; a->used = false;
debug_return; debug_return;
} }
@@ -125,7 +125,7 @@ alias_add(char *name, int type, struct member *members)
{ {
static char errbuf[512]; static char errbuf[512];
struct alias *a; struct alias *a;
debug_decl(alias_add, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(alias_add, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
a = sudo_ecalloc(1, sizeof(*a)); a = sudo_ecalloc(1, sizeof(*a));
a->name = name; a->name = name;
@@ -146,7 +146,7 @@ alias_add(char *name, int type, struct member *members)
void void
alias_apply(int (*func)(void *, void *), void *cookie) alias_apply(int (*func)(void *, void *), void *cookie)
{ {
debug_decl(alias_apply, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(alias_apply, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
rbapply(aliases, func, cookie, inorder); rbapply(aliases, func, cookie, inorder);
@@ -159,7 +159,7 @@ alias_apply(int (*func)(void *, void *), void *cookie)
bool bool
no_aliases(void) no_aliases(void)
{ {
debug_decl(no_aliases, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(no_aliases, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
debug_return_bool(rbisempty(aliases)); debug_return_bool(rbisempty(aliases));
} }
@@ -173,7 +173,7 @@ alias_free(void *v)
struct member *m; struct member *m;
struct sudo_command *c; struct sudo_command *c;
void *next; void *next;
debug_decl(alias_free, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(alias_free, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
sudo_efree(a->name); sudo_efree(a->name);
TAILQ_FOREACH_SAFE(m, &a->members, entries, next) { TAILQ_FOREACH_SAFE(m, &a->members, entries, next) {
@@ -198,7 +198,7 @@ alias_remove(char *name, int type)
{ {
struct rbnode *node; struct rbnode *node;
struct alias key; struct alias key;
debug_decl(alias_remove, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(alias_remove, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
key.name = name; key.name = name;
key.type = type; key.type = type;
@@ -212,7 +212,7 @@ alias_remove(char *name, int type)
void void
init_aliases(void) init_aliases(void)
{ {
debug_decl(init_aliases, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(init_aliases, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
if (aliases != NULL) if (aliases != NULL)
rbdestroy(aliases, alias_free); rbdestroy(aliases, alias_free);

View File

@@ -43,7 +43,7 @@ int
audit_success(int argc, char *argv[]) audit_success(int argc, char *argv[])
{ {
int rc = 0; int rc = 0;
debug_decl(audit_success, SUDO_DEBUG_AUDIT, sudoers_debug_instance) debug_decl(audit_success, SUDOERS_DEBUG_AUDIT, sudoers_debug_instance)
if (argv != NULL) { if (argv != NULL) {
#ifdef HAVE_BSM_AUDIT #ifdef HAVE_BSM_AUDIT
@@ -67,7 +67,7 @@ int
audit_failure(int argc, char *argv[], char const *const fmt, ...) audit_failure(int argc, char *argv[], char const *const fmt, ...)
{ {
int rc = 0; int rc = 0;
debug_decl(audit_success, SUDO_DEBUG_AUDIT, sudoers_debug_instance) debug_decl(audit_success, SUDOERS_DEBUG_AUDIT, sudoers_debug_instance)
#if defined(HAVE_BSM_AUDIT) || defined(HAVE_LINUX_AUDIT) #if defined(HAVE_BSM_AUDIT) || defined(HAVE_LINUX_AUDIT)
if (argv != NULL) { if (argv != NULL) {

View File

@@ -53,7 +53,7 @@ sudo_afs_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{ {
struct ktc_encryptionKey afs_key; struct ktc_encryptionKey afs_key;
struct ktc_token afs_token; struct ktc_token afs_token;
debug_decl(sudo_afs_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_afs_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Try to just check the password */ /* Try to just check the password */
ka_StringToKey(pass, NULL, &afs_key); ka_StringToKey(pass, NULL, &afs_key);

View File

@@ -55,7 +55,7 @@ sudo_aix_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
char *pass, *message = NULL; char *pass, *message = NULL;
int result = 1, reenter = 0; int result = 1, reenter = 0;
int rval = AUTH_SUCCESS; int rval = AUTH_SUCCESS;
debug_decl(sudo_aix_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_aix_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
do { do {
pass = auth_getpass(prompt, def_passwd_timeout * 60, pass = auth_getpass(prompt, def_passwd_timeout * 60,
@@ -90,7 +90,7 @@ sudo_aix_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
int int
sudo_aix_cleanup(struct passwd *pw, sudo_auth *auth) sudo_aix_cleanup(struct passwd *pw, sudo_auth *auth)
{ {
debug_decl(sudo_aix_cleanup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_aix_cleanup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Unset AUTHSTATE as it may not be correct for the runas user. */ /* Unset AUTHSTATE as it may not be correct for the runas user. */
if (sudo_unsetenv("AUTHSTATE") == -1) if (sudo_unsetenv("AUTHSTATE") == -1)

View File

@@ -63,7 +63,7 @@ int
bsdauth_init(struct passwd *pw, sudo_auth *auth) bsdauth_init(struct passwd *pw, sudo_auth *auth)
{ {
static struct bsdauth_state state; static struct bsdauth_state state;
debug_decl(bsdauth_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(bsdauth_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Get login class based on auth user, which may not be invoking user. */ /* Get login class based on auth user, which may not be invoking user. */
if (pw->pw_class && *pw->pw_class) if (pw->pw_class && *pw->pw_class)
@@ -113,7 +113,7 @@ bsdauth_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
int authok = 0; int authok = 0;
sigaction_t sa, osa; sigaction_t sa, osa;
auth_session_t *as = ((struct bsdauth_state *) auth->data)->as; auth_session_t *as = ((struct bsdauth_state *) auth->data)->as;
debug_decl(bsdauth_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(bsdauth_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* save old signal handler */ /* save old signal handler */
sigemptyset(&sa.sa_mask); sigemptyset(&sa.sa_mask);
@@ -174,7 +174,7 @@ int
bsdauth_cleanup(struct passwd *pw, sudo_auth *auth) bsdauth_cleanup(struct passwd *pw, sudo_auth *auth)
{ {
struct bsdauth_state *state = auth->data; struct bsdauth_state *state = auth->data;
debug_decl(bsdauth_cleanup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(bsdauth_cleanup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (state != NULL) { if (state != NULL) {
auth_close(state->as); auth_close(state->as);

View File

@@ -74,7 +74,7 @@ sudo_dce_verify(struct passwd *pw, char *plain_pw, sudo_auth *auth)
boolean32 reset_passwd; boolean32 reset_passwd;
sec_login_auth_src_t auth_src; sec_login_auth_src_t auth_src;
error_status_t status; error_status_t status;
debug_decl(sudo_dce_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_dce_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* /*
* Create the local context of the DCE principal necessary * Create the local context of the DCE principal necessary
@@ -188,7 +188,7 @@ check_dce_status(error_status_t input_status, char *comment)
{ {
int error_stat; int error_stat;
unsigned char error_string[dce_c_error_string_len]; unsigned char error_string[dce_c_error_string_len];
debug_decl(check_dce_status, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(check_dce_status, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (input_status == rpc_s_ok) if (input_status == rpc_s_ok)
debug_return_bool(0); debug_return_bool(0);

View File

@@ -53,7 +53,7 @@ sudo_fwtk_init(struct passwd *pw, sudo_auth *auth)
{ {
static Cfg *confp; /* Configuration entry struct */ static Cfg *confp; /* Configuration entry struct */
char resp[128]; /* Response from the server */ char resp[128]; /* Response from the server */
debug_decl(sudo_fwtk_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_fwtk_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if ((confp = cfg_read("sudo")) == (Cfg *)-1) { if ((confp = cfg_read("sudo")) == (Cfg *)-1) {
sudo_warnx(U_("unable to read fwtk config")); sudo_warnx(U_("unable to read fwtk config"));
@@ -85,7 +85,7 @@ sudo_fwtk_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
char buf[SUDO_CONV_REPL_MAX + 12]; /* General prupose buffer */ char buf[SUDO_CONV_REPL_MAX + 12]; /* General prupose buffer */
char resp[128]; /* Response from the server */ char resp[128]; /* Response from the server */
int error; int error;
debug_decl(sudo_fwtk_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_fwtk_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Send username to authentication server. */ /* Send username to authentication server. */
(void) snprintf(buf, sizeof(buf), "authorize %s 'sudo'", pw->pw_name); (void) snprintf(buf, sizeof(buf), "authorize %s 'sudo'", pw->pw_name);
@@ -147,7 +147,7 @@ done:
int int
sudo_fwtk_cleanup(struct passwd *pw, sudo_auth *auth) sudo_fwtk_cleanup(struct passwd *pw, sudo_auth *auth)
{ {
debug_decl(sudo_fwtk_cleanup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_fwtk_cleanup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
auth_close(); auth_close();
debug_return_int(AUTH_SUCCESS); debug_return_int(AUTH_SUCCESS);

View File

@@ -96,7 +96,7 @@ int
sudo_krb5_setup(struct passwd *pw, char **promptp, sudo_auth *auth) sudo_krb5_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
{ {
static char *krb5_prompt; static char *krb5_prompt;
debug_decl(sudo_krb5_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_krb5_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (krb5_prompt == NULL) { if (krb5_prompt == NULL) {
krb5_context sudo_context; krb5_context sudo_context;
@@ -135,7 +135,7 @@ sudo_krb5_init(struct passwd *pw, sudo_auth *auth)
krb5_context sudo_context; krb5_context sudo_context;
krb5_error_code error; krb5_error_code error;
char cache_name[64], *pname = pw->pw_name; char cache_name[64], *pname = pw->pw_name;
debug_decl(sudo_krb5_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_krb5_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
auth->data = (void *) &sudo_krb5_data; /* Stash all our data here */ auth->data = (void *) &sudo_krb5_data; /* Stash all our data here */
@@ -183,7 +183,7 @@ sudo_krb5_verify(struct passwd *pw, char *pass, sudo_auth *auth)
krb5_principal princ; krb5_principal princ;
krb5_ccache ccache; krb5_ccache ccache;
krb5_error_code error; krb5_error_code error;
debug_decl(sudo_krb5_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_krb5_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context; sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context;
princ = ((sudo_krb5_datap) auth->data)->princ; princ = ((sudo_krb5_datap) auth->data)->princ;
@@ -202,7 +202,7 @@ sudo_krb5_verify(struct passwd *pw, char *pass, sudo_auth *auth)
krb5_ccache ccache; krb5_ccache ccache;
krb5_error_code error; krb5_error_code error;
krb5_get_init_creds_opt *opts = NULL; krb5_get_init_creds_opt *opts = NULL;
debug_decl(sudo_krb5_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_krb5_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context; sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context;
princ = ((sudo_krb5_datap) auth->data)->princ; princ = ((sudo_krb5_datap) auth->data)->princ;
@@ -266,7 +266,7 @@ sudo_krb5_cleanup(struct passwd *pw, sudo_auth *auth)
krb5_context sudo_context; krb5_context sudo_context;
krb5_principal princ; krb5_principal princ;
krb5_ccache ccache; krb5_ccache ccache;
debug_decl(sudo_krb5_cleanup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_krb5_cleanup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context; sudo_context = ((sudo_krb5_datap) auth->data)->sudo_context;
princ = ((sudo_krb5_datap) auth->data)->princ; princ = ((sudo_krb5_datap) auth->data)->princ;
@@ -298,7 +298,7 @@ verify_krb_v5_tgt(krb5_context sudo_context, krb5_creds *cred, char *auth_name)
krb5_error_code error; krb5_error_code error;
krb5_principal server; krb5_principal server;
krb5_verify_init_creds_opt vopt; krb5_verify_init_creds_opt vopt;
debug_decl(verify_krb_v5_tgt, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(verify_krb_v5_tgt, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* /*
* Get the server principal for the local host. * Get the server principal for the local host.

View File

@@ -87,7 +87,7 @@ sudo_pam_init(struct passwd *pw, sudo_auth *auth)
{ {
static struct pam_conv pam_conv; static struct pam_conv pam_conv;
static int pam_status; static int pam_status;
debug_decl(sudo_pam_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_pam_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Initial PAM setup */ /* Initial PAM setup */
auth->data = (void *) &pam_status; auth->data = (void *) &pam_status;
@@ -133,7 +133,7 @@ sudo_pam_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
{ {
const char *s; const char *s;
int *pam_status = (int *) auth->data; int *pam_status = (int *) auth->data;
debug_decl(sudo_pam_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_pam_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
def_prompt = prompt; /* for converse */ def_prompt = prompt; /* for converse */
@@ -193,7 +193,7 @@ int
sudo_pam_cleanup(struct passwd *pw, sudo_auth *auth) sudo_pam_cleanup(struct passwd *pw, sudo_auth *auth)
{ {
int *pam_status = (int *) auth->data; int *pam_status = (int *) auth->data;
debug_decl(sudo_pam_cleanup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_pam_cleanup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* If successful, we can't close the session until sudo_pam_end_session() */ /* If successful, we can't close the session until sudo_pam_end_session() */
if (*pam_status != PAM_SUCCESS || auth->end_session == NULL) { if (*pam_status != PAM_SUCCESS || auth->end_session == NULL) {
@@ -208,7 +208,7 @@ sudo_pam_begin_session(struct passwd *pw, char **user_envp[], sudo_auth *auth)
{ {
int status = AUTH_SUCCESS; int status = AUTH_SUCCESS;
int *pam_status = (int *) auth->data; int *pam_status = (int *) auth->data;
debug_decl(sudo_pam_begin_session, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_pam_begin_session, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* /*
* If there is no valid user we cannot open a PAM session. * If there is no valid user we cannot open a PAM session.
@@ -279,7 +279,7 @@ int
sudo_pam_end_session(struct passwd *pw, sudo_auth *auth) sudo_pam_end_session(struct passwd *pw, sudo_auth *auth)
{ {
int status = AUTH_SUCCESS; int status = AUTH_SUCCESS;
debug_decl(sudo_pam_end_session, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_pam_end_session, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (pamh != NULL) { if (pamh != NULL) {
/* /*
@@ -326,7 +326,7 @@ converse(int num_msg, PAM_CONST struct pam_message **msg,
char *pass; char *pass;
int n, type; int n, type;
int ret = PAM_AUTH_ERR; int ret = PAM_AUTH_ERR;
debug_decl(converse, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(converse, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if ((*response = calloc(num_msg, sizeof(struct pam_response))) == NULL) if ((*response = calloc(num_msg, sizeof(struct pam_response))) == NULL)
debug_return_int(PAM_SYSTEM_ERR); debug_return_int(PAM_SYSTEM_ERR);

View File

@@ -50,7 +50,7 @@
int int
sudo_passwd_init(struct passwd *pw, sudo_auth *auth) sudo_passwd_init(struct passwd *pw, sudo_auth *auth)
{ {
debug_decl(sudo_passwd_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_passwd_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
#ifdef HAVE_SKEYACCESS #ifdef HAVE_SKEYACCESS
if (skeyaccess(pw, user_tty, NULL, NULL) == 0) if (skeyaccess(pw, user_tty, NULL, NULL) == 0)
@@ -69,7 +69,7 @@ sudo_passwd_verify(struct passwd *pw, char *pass, sudo_auth *auth)
char *pw_epasswd = auth->data; char *pw_epasswd = auth->data;
size_t pw_len; size_t pw_len;
int matched = 0; int matched = 0;
debug_decl(sudo_passwd_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_passwd_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
pw_len = strlen(pw_epasswd); pw_len = strlen(pw_epasswd);
@@ -111,7 +111,7 @@ sudo_passwd_cleanup(pw, auth)
sudo_auth *auth; sudo_auth *auth;
{ {
char *pw_epasswd = auth->data; char *pw_epasswd = auth->data;
debug_decl(sudo_passwd_cleanup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_passwd_cleanup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (pw_epasswd != NULL) { if (pw_epasswd != NULL) {
memset_s(pw_epasswd, SUDO_CONV_REPL_MAX, 0, strlen(pw_epasswd)); memset_s(pw_epasswd, SUDO_CONV_REPL_MAX, 0, strlen(pw_epasswd));

View File

@@ -68,7 +68,7 @@ sudo_rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
static char *orig_prompt = NULL, *new_prompt = NULL; static char *orig_prompt = NULL, *new_prompt = NULL;
static int op_len, np_size; static int op_len, np_size;
static struct RFC1938 rfc1938; static struct RFC1938 rfc1938;
debug_decl(sudo_rfc1938_setup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_rfc1938_setup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Stash a pointer to the rfc1938 struct if we have not initialized */ /* Stash a pointer to the rfc1938 struct if we have not initialized */
if (!auth->data) if (!auth->data)
@@ -126,7 +126,7 @@ sudo_rfc1938_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
int int
sudo_rfc1938_verify(struct passwd *pw, char *pass, sudo_auth *auth) sudo_rfc1938_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{ {
debug_decl(sudo_rfc1938_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_rfc1938_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (rfc1938verify((struct RFC1938 *) auth->data, pass) == 0) if (rfc1938verify((struct RFC1938 *) auth->data, pass) == 0)
debug_return_int(AUTH_SUCCESS); debug_return_int(AUTH_SUCCESS);

View File

@@ -56,12 +56,12 @@ sudo_secureware_init(struct passwd *pw, sudo_auth *auth)
{ {
#ifdef __alpha #ifdef __alpha
extern int crypt_type; extern int crypt_type;
debug_decl(sudo_secureware_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_secureware_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (crypt_type == INT_MAX) if (crypt_type == INT_MAX)
debug_return_int(AUTH_FAILURE); /* no shadow */ debug_return_int(AUTH_FAILURE); /* no shadow */
#else #else
debug_decl(secureware_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(secureware_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
#endif #endif
sudo_setspent(); sudo_setspent();
auth->data = sudo_getepw(pw); auth->data = sudo_getepw(pw);
@@ -74,7 +74,7 @@ sudo_secureware_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{ {
char *pw_epasswd = auth->data; char *pw_epasswd = auth->data;
char *epass = NULL; char *epass = NULL;
debug_decl(sudo_secureware_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_secureware_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
#ifdef __alpha #ifdef __alpha
{ {
extern int crypt_type; extern int crypt_type;
@@ -103,7 +103,7 @@ sudo_secureware_cleanup(pw, auth)
sudo_auth *auth; sudo_auth *auth;
{ {
char *pw_epasswd = auth->data; char *pw_epasswd = auth->data;
debug_decl(sudo_secureware_cleanup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_secureware_cleanup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (pw_epasswd != NULL) { if (pw_epasswd != NULL) {
memset_s(pw_epasswd, SUDO_CONV_REPL_MAX, 0, strlen(pw_epasswd)); memset_s(pw_epasswd, SUDO_CONV_REPL_MAX, 0, strlen(pw_epasswd));

View File

@@ -69,7 +69,7 @@ int
sudo_securid_init(struct passwd *pw, sudo_auth *auth) sudo_securid_init(struct passwd *pw, sudo_auth *auth)
{ {
static SDI_HANDLE sd_dat; /* SecurID handle */ static SDI_HANDLE sd_dat; /* SecurID handle */
debug_decl(sudo_securid_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_securid_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
auth->data = (void *) &sd_dat; /* For method-specific data */ auth->data = (void *) &sd_dat; /* For method-specific data */
@@ -99,7 +99,7 @@ sudo_securid_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
{ {
SDI_HANDLE *sd = (SDI_HANDLE *) auth->data; SDI_HANDLE *sd = (SDI_HANDLE *) auth->data;
int retval; int retval;
debug_decl(sudo_securid_setup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_securid_setup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Re-initialize SecurID every time. */ /* Re-initialize SecurID every time. */
if (SD_Init(sd) != ACM_OK) { if (SD_Init(sd) != ACM_OK) {
@@ -150,7 +150,7 @@ sudo_securid_verify(struct passwd *pw, char *pass, sudo_auth *auth)
{ {
SDI_HANDLE *sd = (SDI_HANDLE *) auth->data; SDI_HANDLE *sd = (SDI_HANDLE *) auth->data;
int rval; int rval;
debug_decl(sudo_securid_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_securid_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
pass = auth_getpass("Enter your PASSCODE: ", pass = auth_getpass("Enter your PASSCODE: ",
def_passwd_timeout * 60, SUDO_CONV_PROMPT_ECHO_OFF); def_passwd_timeout * 60, SUDO_CONV_PROMPT_ECHO_OFF);

View File

@@ -69,7 +69,7 @@ sudo_collect(int timeout, int rendition, uchar_t *title, int nprompts,
{ {
int rval; int rval;
sigset_t mask, omask; sigset_t mask, omask;
debug_decl(sudo_collect, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_collect, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
switch (rendition) { switch (rendition) {
case SIAFORM: case SIAFORM:
@@ -108,7 +108,7 @@ sudo_sia_setup(struct passwd *pw, char **promptp, sudo_auth *auth)
{ {
SIAENTITY *siah = NULL; SIAENTITY *siah = NULL;
int i; int i;
debug_decl(sudo_sia_setup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_sia_setup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Rebuild argv for sia_ses_init() */ /* Rebuild argv for sia_ses_init() */
sudo_argc = NewArgc + 1; sudo_argc = NewArgc + 1;
@@ -132,7 +132,7 @@ int
sudo_sia_verify(struct passwd *pw, char *prompt, sudo_auth *auth) sudo_sia_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
{ {
SIAENTITY *siah = (SIAENTITY *) auth->data; SIAENTITY *siah = (SIAENTITY *) auth->data;
debug_decl(sudo_sia_verify, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_sia_verify, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
def_prompt = prompt; /* for sudo_collect */ def_prompt = prompt; /* for sudo_collect */
@@ -147,7 +147,7 @@ int
sudo_sia_cleanup(struct passwd *pw, sudo_auth *auth) sudo_sia_cleanup(struct passwd *pw, sudo_auth *auth)
{ {
SIAENTITY *siah = (SIAENTITY *) auth->data; SIAENTITY *siah = (SIAENTITY *) auth->data;
debug_decl(sudo_sia_cleanup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_sia_cleanup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
(void) sia_ses_release(&siah); (void) sia_ses_release(&siah);
sudo_efree(sudo_argv); sudo_efree(sudo_argv);

View File

@@ -104,7 +104,7 @@ sudo_auth_init(struct passwd *pw)
{ {
sudo_auth *auth; sudo_auth *auth;
int status = AUTH_SUCCESS; int status = AUTH_SUCCESS;
debug_decl(sudo_auth_init, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_auth_init, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (auth_switch[0].name == NULL) if (auth_switch[0].name == NULL)
debug_return_int(0); debug_return_int(0);
@@ -146,7 +146,7 @@ sudo_auth_cleanup(struct passwd *pw)
{ {
sudo_auth *auth; sudo_auth *auth;
int status = AUTH_SUCCESS; int status = AUTH_SUCCESS;
debug_decl(sudo_auth_cleanup, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_auth_cleanup, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Call cleanup routines. */ /* Call cleanup routines. */
for (auth = auth_switch; auth->name; auth++) { for (auth = auth_switch; auth->name; auth++) {
@@ -163,7 +163,7 @@ static void
pass_warn(void) pass_warn(void)
{ {
const char *warning = def_badpass_message; const char *warning = def_badpass_message;
debug_decl(pass_warn, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(pass_warn, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
#ifdef INSULT #ifdef INSULT
if (def_insults) if (def_insults)
@@ -196,7 +196,7 @@ verify_user(struct passwd *pw, char *prompt, int validated)
sudo_auth *auth; sudo_auth *auth;
sigset_t mask, omask; sigset_t mask, omask;
sigaction_t sa, saved_sigtstp; sigaction_t sa, saved_sigtstp;
debug_decl(verify_user, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(verify_user, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Make sure we have at least one auth method. */ /* Make sure we have at least one auth method. */
if (auth_switch[0].name == NULL) { if (auth_switch[0].name == NULL) {
@@ -316,7 +316,7 @@ sudo_auth_begin_session(struct passwd *pw, char **user_env[])
{ {
sudo_auth *auth; sudo_auth *auth;
int status = AUTH_SUCCESS; int status = AUTH_SUCCESS;
debug_decl(sudo_auth_begin_session, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_auth_begin_session, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
for (auth = auth_switch; auth->name; auth++) { for (auth = auth_switch; auth->name; auth++) {
if (auth->begin_session && !IS_DISABLED(auth)) { if (auth->begin_session && !IS_DISABLED(auth)) {
@@ -333,7 +333,7 @@ sudo_auth_needs_end_session(void)
{ {
sudo_auth *auth; sudo_auth *auth;
bool needed = false; bool needed = false;
debug_decl(sudo_auth_needs_end_session, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_auth_needs_end_session, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
for (auth = auth_switch; auth->name; auth++) { for (auth = auth_switch; auth->name; auth++) {
if (auth->end_session && !IS_DISABLED(auth)) { if (auth->end_session && !IS_DISABLED(auth)) {
@@ -353,7 +353,7 @@ sudo_auth_end_session(struct passwd *pw)
{ {
sudo_auth *auth; sudo_auth *auth;
int status = AUTH_SUCCESS; int status = AUTH_SUCCESS;
debug_decl(sudo_auth_end_session, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_auth_end_session, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
for (auth = auth_switch; auth->name; auth++) { for (auth = auth_switch; auth->name; auth++) {
if (auth->end_session && !IS_DISABLED(auth)) { if (auth->end_session && !IS_DISABLED(auth)) {
@@ -371,7 +371,7 @@ auth_getpass(const char *prompt, int timeout, int type)
struct sudo_conv_message msg; struct sudo_conv_message msg;
struct sudo_conv_reply repl; struct sudo_conv_reply repl;
sigset_t mask, omask; sigset_t mask, omask;
debug_decl(auth_getpass, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(auth_getpass, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Mask user input if pwfeedback set and echo is off. */ /* Mask user input if pwfeedback set and echo is off. */
if (type == SUDO_CONV_PROMPT_ECHO_OFF && def_pwfeedback) if (type == SUDO_CONV_PROMPT_ECHO_OFF && def_pwfeedback)
@@ -407,7 +407,7 @@ void
dump_auth_methods(void) dump_auth_methods(void)
{ {
sudo_auth *auth; sudo_auth *auth;
debug_decl(dump_auth_methods, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(dump_auth_methods, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
sudo_printf(SUDO_CONV_INFO_MSG, _("Authentication methods:")); sudo_printf(SUDO_CONV_INFO_MSG, _("Authentication methods:"));
for (auth = auth_switch; auth->name; auth++) for (auth = auth_switch; auth->name; auth++)

View File

@@ -51,7 +51,7 @@ base64_decode(const char *str, unsigned char *dst, size_t dsize)
unsigned char ch[4]; unsigned char ch[4];
char *pos; char *pos;
int i; int i;
debug_decl(base64_decode, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(base64_decode, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
/* /*
* Convert from base64 to binary. Each base64 char holds 6 bits of data * Convert from base64 to binary. Each base64 char holds 6 bits of data

View File

@@ -72,7 +72,7 @@ get_boottime(struct timeval *tv)
bool found = false; bool found = false;
ssize_t len; ssize_t len;
FILE *fp; FILE *fp;
debug_decl(get_boottime, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(get_boottime, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* read btime from /proc/stat */ /* read btime from /proc/stat */
fp = fopen("/proc/stat", "r"); fp = fopen("/proc/stat", "r");
@@ -102,7 +102,7 @@ get_boottime(struct timeval *tv)
{ {
size_t size; size_t size;
int mib[2]; int mib[2];
debug_decl(get_boottime, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(get_boottime, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
mib[0] = CTL_KERN; mib[0] = CTL_KERN;
mib[1] = KERN_BOOTTIME; mib[1] = KERN_BOOTTIME;
@@ -119,7 +119,7 @@ bool
get_boottime(struct timeval *tv) get_boottime(struct timeval *tv)
{ {
struct utmpx *ut, key; struct utmpx *ut, key;
debug_decl(get_boottime, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(get_boottime, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
memset(&key, 0, sizeof(key)); memset(&key, 0, sizeof(key));
key.ut_type = BOOT_TIME; key.ut_type = BOOT_TIME;
@@ -138,7 +138,7 @@ bool
get_boottime(struct timeval *tv) get_boottime(struct timeval *tv)
{ {
struct utmp *ut, key; struct utmp *ut, key;
debug_decl(get_boottime, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(get_boottime, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
memset(&key, 0, sizeof(key)); memset(&key, 0, sizeof(key));
key.ut_type = BOOT_TIME; key.ut_type = BOOT_TIME;
@@ -156,7 +156,7 @@ get_boottime(struct timeval *tv)
bool bool
get_boottime(struct timeval *tv) get_boottime(struct timeval *tv)
{ {
debug_decl(get_boottime, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(get_boottime, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
debug_return_bool(false); debug_return_bool(false);
} }
#endif #endif

View File

@@ -54,7 +54,7 @@ audit_sudo_selected(int sorf)
auditinfo_addr_t ainfo_addr; auditinfo_addr_t ainfo_addr;
struct au_mask *mask; struct au_mask *mask;
int rc; int rc;
debug_decl(audit_sudo_selected, SUDO_DEBUG_AUDIT, sudoers_debug_instance) debug_decl(audit_sudo_selected, SUDOERS_DEBUG_AUDIT, sudoers_debug_instance)
if (getaudit_addr(&ainfo_addr, sizeof(ainfo_addr)) < 0) { if (getaudit_addr(&ainfo_addr, sizeof(ainfo_addr)) < 0) {
if (errno == ENOSYS) { if (errno == ENOSYS) {
@@ -89,7 +89,7 @@ bsm_audit_success(char *exec_args[])
long au_cond; long au_cond;
int aufd, selected; int aufd, selected;
pid_t pid; pid_t pid;
debug_decl(bsm_audit_success, SUDO_DEBUG_AUDIT, sudoers_debug_instance) debug_decl(bsm_audit_success, SUDOERS_DEBUG_AUDIT, sudoers_debug_instance)
/* /*
* If we are not auditing, don't cut an audit record; just return. * If we are not auditing, don't cut an audit record; just return.
@@ -178,7 +178,7 @@ bsm_audit_failure(char *exec_args[], char const *const fmt, va_list ap)
au_id_t auid; au_id_t auid;
pid_t pid; pid_t pid;
int aufd; int aufd;
debug_decl(bsm_audit_success, SUDO_DEBUG_AUDIT, sudoers_debug_instance) debug_decl(bsm_audit_success, SUDOERS_DEBUG_AUDIT, sudoers_debug_instance)
/* /*
* If we are not auditing, don't cut an audit record; just return. * If we are not auditing, don't cut an audit record; just return.

View File

@@ -63,7 +63,7 @@ static int
check_user_interactive(int validated, int mode, struct passwd *auth_pw) check_user_interactive(int validated, int mode, struct passwd *auth_pw)
{ {
int status, rval = true; int status, rval = true;
debug_decl(check_user_interactive, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(check_user_interactive, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Always need a password when -k was specified with the command. */ /* Always need a password when -k was specified with the command. */
if (ISSET(mode, MODE_IGNORE_TICKET)) if (ISSET(mode, MODE_IGNORE_TICKET))
@@ -121,7 +121,7 @@ check_user(int validated, int mode)
{ {
struct passwd *auth_pw; struct passwd *auth_pw;
int rval = -1; int rval = -1;
debug_decl(check_user, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(check_user, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* /*
* Init authentication system regardless of whether we need a password. * Init authentication system regardless of whether we need a password.
@@ -175,7 +175,7 @@ display_lecture(int status)
ssize_t nread; ssize_t nread;
struct sudo_conv_message msg; struct sudo_conv_message msg;
struct sudo_conv_reply repl; struct sudo_conv_reply repl;
debug_decl(lecture, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(lecture, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (def_lecture == never || if (def_lecture == never ||
(def_lecture == once && already_lectured(status))) (def_lecture == once && already_lectured(status)))
@@ -212,7 +212,7 @@ bool
user_is_exempt(void) user_is_exempt(void)
{ {
bool rval = false; bool rval = false;
debug_decl(user_is_exempt, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(user_is_exempt, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (def_exempt_group) if (def_exempt_group)
rval = user_in_group(sudo_user.pw, def_exempt_group); rval = user_in_group(sudo_user.pw, def_exempt_group);
@@ -228,7 +228,7 @@ static struct passwd *
get_authpw(int mode) get_authpw(int mode)
{ {
struct passwd *pw = NULL; struct passwd *pw = NULL;
debug_decl(get_authpw, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(get_authpw, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (ISSET(mode, (MODE_CHECK|MODE_LIST))) { if (ISSET(mode, (MODE_CHECK|MODE_LIST))) {
/* In list mode we always prompt for the user's password. */ /* In list mode we always prompt for the user's password. */

View File

@@ -118,7 +118,7 @@ dump_defaults(void)
struct list_member *item; struct list_member *item;
struct def_values *def; struct def_values *def;
char *desc; char *desc;
debug_decl(dump_defaults, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(dump_defaults, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
for (cur = sudo_defs_table; cur->name; cur++) { for (cur = sudo_defs_table; cur->name; cur++) {
if (cur->desc) { if (cur->desc) {
@@ -200,7 +200,7 @@ set_default(char *var, char *val, int op)
{ {
struct sudo_defs_types *cur; struct sudo_defs_types *cur;
int num; int num;
debug_decl(set_default, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(set_default, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
for (cur = sudo_defs_table, num = 0; cur->name; cur++, num++) { for (cur = sudo_defs_table, num = 0; cur->name; cur++, num++) {
if (strcmp(var, cur->name) == 0) if (strcmp(var, cur->name) == 0)
@@ -345,7 +345,7 @@ init_defaults(void)
{ {
static int firsttime = 1; static int firsttime = 1;
struct sudo_defs_types *def; struct sudo_defs_types *def;
debug_decl(init_defaults, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(init_defaults, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
/* Clear any old settings. */ /* Clear any old settings. */
if (!firsttime) { if (!firsttime) {
@@ -508,7 +508,7 @@ update_defaults(int what)
{ {
struct defaults *def; struct defaults *def;
bool rc = true; bool rc = true;
debug_decl(update_defaults, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(update_defaults, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
TAILQ_FOREACH(def, &defaults, entries) { TAILQ_FOREACH(def, &defaults, entries) {
switch (def->type) { switch (def->type) {
@@ -567,7 +567,7 @@ check_defaults(int what, bool quiet)
struct sudo_defs_types *cur; struct sudo_defs_types *cur;
struct defaults *def; struct defaults *def;
bool rc = true; bool rc = true;
debug_decl(check_defaults, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(check_defaults, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
TAILQ_FOREACH(def, &defaults, entries) { TAILQ_FOREACH(def, &defaults, entries) {
switch (def->type) { switch (def->type) {
@@ -610,7 +610,7 @@ store_int(char *val, struct sudo_defs_types *def, int op)
{ {
const char *errstr; const char *errstr;
int i; int i;
debug_decl(store_int, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(store_int, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
if (op == false) { if (op == false) {
def->sd_un.ival = 0; def->sd_un.ival = 0;
@@ -633,7 +633,7 @@ store_uint(char *val, struct sudo_defs_types *def, int op)
{ {
const char *errstr; const char *errstr;
unsigned int u; unsigned int u;
debug_decl(store_uint, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(store_uint, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
if (op == false) { if (op == false) {
def->sd_un.uival = 0; def->sd_un.uival = 0;
@@ -656,7 +656,7 @@ store_float(char *val, struct sudo_defs_types *def, int op)
{ {
char *endp; char *endp;
double d; double d;
debug_decl(store_float, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(store_float, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
if (op == false) { if (op == false) {
def->sd_un.fval = 0.0; def->sd_un.fval = 0.0;
@@ -676,7 +676,7 @@ static bool
store_tuple(char *val, struct sudo_defs_types *def, int op) store_tuple(char *val, struct sudo_defs_types *def, int op)
{ {
struct def_values *v; struct def_values *v;
debug_decl(store_tuple, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(store_tuple, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
/* /*
* Look up tuple value by name to find enum def_tuple value. * Look up tuple value by name to find enum def_tuple value.
@@ -703,7 +703,7 @@ store_tuple(char *val, struct sudo_defs_types *def, int op)
static bool static bool
store_str(char *val, struct sudo_defs_types *def, int op) store_str(char *val, struct sudo_defs_types *def, int op)
{ {
debug_decl(store_str, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(store_str, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
sudo_efree(def->sd_un.str); sudo_efree(def->sd_un.str);
if (op == false) if (op == false)
@@ -719,7 +719,7 @@ static bool
store_list(char *str, struct sudo_defs_types *def, int op) store_list(char *str, struct sudo_defs_types *def, int op)
{ {
char *start, *end; char *start, *end;
debug_decl(store_list, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(store_list, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
/* Remove all old members. */ /* Remove all old members. */
if (op == false || op == true) if (op == false || op == true)
@@ -748,7 +748,7 @@ static bool
store_syslogfac(char *val, struct sudo_defs_types *def, int op) store_syslogfac(char *val, struct sudo_defs_types *def, int op)
{ {
struct strmap *fac; struct strmap *fac;
debug_decl(store_syslogfac, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(store_syslogfac, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
if (op == false) { if (op == false) {
def->sd_un.ival = false; def->sd_un.ival = false;
@@ -774,7 +774,7 @@ logfac2str(int n)
{ {
#ifdef LOG_NFACILITIES #ifdef LOG_NFACILITIES
struct strmap *fac; struct strmap *fac;
debug_decl(logfac2str, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(logfac2str, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
for (fac = facilities; fac->name && fac->num != n; fac++) for (fac = facilities; fac->name && fac->num != n; fac++)
; ;
@@ -788,7 +788,7 @@ static bool
store_syslogpri(char *val, struct sudo_defs_types *def, int op) store_syslogpri(char *val, struct sudo_defs_types *def, int op)
{ {
struct strmap *pri; struct strmap *pri;
debug_decl(store_syslogpri, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(store_syslogpri, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
if (op == false || !val) if (op == false || !val)
debug_return_bool(false); debug_return_bool(false);
@@ -806,7 +806,7 @@ static const char *
logpri2str(int n) logpri2str(int n)
{ {
struct strmap *pri; struct strmap *pri;
debug_decl(logpri2str, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(logpri2str, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
for (pri = priorities; pri->name && pri->num != n; pri++) for (pri = priorities; pri->name && pri->num != n; pri++)
; ;
@@ -818,7 +818,7 @@ store_mode(char *val, struct sudo_defs_types *def, int op)
{ {
mode_t mode; mode_t mode;
const char *errstr; const char *errstr;
debug_decl(store_mode, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(store_mode, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
if (op == false) { if (op == false) {
def->sd_un.mode = 0777; def->sd_un.mode = 0777;
@@ -840,7 +840,7 @@ static void
list_op(char *val, size_t len, struct sudo_defs_types *def, enum list_ops op) list_op(char *val, size_t len, struct sudo_defs_types *def, enum list_ops op)
{ {
struct list_member *cur, *prev = NULL; struct list_member *cur, *prev = NULL;
debug_decl(list_op, SUDO_DEBUG_DEFAULTS, sudoers_debug_instance) debug_decl(list_op, SUDOERS_DEBUG_DEFAULTS, sudoers_debug_instance)
if (op == freeall) { if (op == freeall) {
while ((cur = SLIST_FIRST(&def->sd_un.list)) != NULL) { while ((cur = SLIST_FIRST(&def->sd_un.list)) != NULL) {

View File

@@ -214,7 +214,7 @@ env_init(char * const envp[])
{ {
char * const *ep; char * const *ep;
size_t len; size_t len;
debug_decl(env_init, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(env_init, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
if (envp == NULL) { if (envp == NULL) {
/* Reset to initial state but keep a pointer to what we allocated. */ /* Reset to initial state but keep a pointer to what we allocated. */
@@ -348,7 +348,7 @@ static int
sudo_putenv(char *str, bool dupcheck, bool overwrite) sudo_putenv(char *str, bool dupcheck, bool overwrite)
{ {
int rval; int rval;
debug_decl(sudo_putenv, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(sudo_putenv, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_putenv: %s", str); sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_putenv: %s", str);
@@ -373,7 +373,7 @@ sudo_setenv2(const char *var, const char *val, bool dupcheck, bool overwrite)
char *estring; char *estring;
size_t esize; size_t esize;
int rval = -1; int rval = -1;
debug_decl(sudo_setenv2, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(sudo_setenv2, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
esize = strlen(var) + 1 + strlen(val) + 1; esize = strlen(var) + 1 + strlen(val) + 1;
estring = sudo_emalloc(esize); estring = sudo_emalloc(esize);
@@ -488,7 +488,7 @@ int
sudo_unsetenv(const char *name) sudo_unsetenv(const char *name)
{ {
int rval; int rval;
debug_decl(sudo_unsetenv, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(sudo_unsetenv, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_unsetenv: %s", name); sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_unsetenv: %s", name);
@@ -528,7 +528,7 @@ char *
sudo_getenv(const char *name) sudo_getenv(const char *name)
{ {
char *val; char *val;
debug_decl(sudo_getenv, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(sudo_getenv, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_getenv: %s", name); sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_getenv: %s", name);
@@ -546,7 +546,7 @@ matches_env_list(const char *var, struct list_members *list, bool *full_match)
{ {
struct list_member *cur; struct list_member *cur;
bool match = false; bool match = false;
debug_decl(matches_env_list, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(matches_env_list, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
SLIST_FOREACH(cur, list, entries) { SLIST_FOREACH(cur, list, entries) {
size_t sep_pos, len = strlen(cur->value); size_t sep_pos, len = strlen(cur->value);
@@ -579,7 +579,7 @@ static bool
matches_env_delete(const char *var) matches_env_delete(const char *var)
{ {
bool full_match; /* unused */ bool full_match; /* unused */
debug_decl(matches_env_delete, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(matches_env_delete, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
/* Skip anything listed in env_delete. */ /* Skip anything listed in env_delete. */
debug_return_bool(matches_env_list(var, &def_env_delete, &full_match)); debug_return_bool(matches_env_list(var, &def_env_delete, &full_match));
@@ -594,7 +594,7 @@ static int
matches_env_check(const char *var, bool *full_match) matches_env_check(const char *var, bool *full_match)
{ {
int keepit = -1; int keepit = -1;
debug_decl(matches_env_check, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(matches_env_check, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
/* Skip anything listed in env_check that includes '/' or '%'. */ /* Skip anything listed in env_check that includes '/' or '%'. */
if (matches_env_list(var, &def_env_check, full_match)) { if (matches_env_list(var, &def_env_check, full_match)) {
@@ -613,7 +613,7 @@ static bool
matches_env_keep(const char *var, bool *full_match) matches_env_keep(const char *var, bool *full_match)
{ {
bool keepit = false; bool keepit = false;
debug_decl(matches_env_keep, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(matches_env_keep, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
/* Preserve SHELL variable for "sudo -s". */ /* Preserve SHELL variable for "sudo -s". */
if (ISSET(sudo_mode, MODE_SHELL) && strncmp(var, "SHELL=", 6) == 0) { if (ISSET(sudo_mode, MODE_SHELL) && strncmp(var, "SHELL=", 6) == 0) {
@@ -634,7 +634,7 @@ env_should_delete(const char *var)
const char *cp; const char *cp;
int delete_it; int delete_it;
bool full_match = false; bool full_match = false;
debug_decl(env_should_delete, SUDO_DEBUG_ENV, sudoers_debug_instance); debug_decl(env_should_delete, SUDOERS_DEBUG_ENV, sudoers_debug_instance);
/* Skip variables with values beginning with () (bash functions) */ /* Skip variables with values beginning with () (bash functions) */
if ((cp = strchr(var, '=')) != NULL) { if ((cp = strchr(var, '=')) != NULL) {
@@ -664,7 +664,7 @@ env_should_keep(const char *var)
int keepit; int keepit;
bool full_match = false; bool full_match = false;
const char *cp; const char *cp;
debug_decl(env_should_keep, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(env_should_keep, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
keepit = matches_env_check(var, &full_match); keepit = matches_env_check(var, &full_match);
if (keepit == -1) if (keepit == -1)
@@ -694,7 +694,7 @@ env_merge(char * const envp[])
{ {
char * const *ep; char * const *ep;
bool rval = true; bool rval = true;
debug_decl(env_merge, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(env_merge, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
for (ep = envp; *ep != NULL; ep++) { for (ep = envp; *ep != NULL; ep++) {
/* XXX - avoid checking value here, should only check name */ /* XXX - avoid checking value here, should only check name */
@@ -759,7 +759,7 @@ rebuild_env(void)
char idbuf[MAX_UID_T_LEN + 1]; char idbuf[MAX_UID_T_LEN + 1];
unsigned int didvar; unsigned int didvar;
bool reset_home = false; bool reset_home = false;
debug_decl(rebuild_env, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(rebuild_env, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
/* /*
* Either clean out the environment or reset to a safe default. * Either clean out the environment or reset to a safe default.
@@ -985,7 +985,7 @@ insert_env_vars(char * const envp[])
{ {
char * const *ep; char * const *ep;
bool rval = true; bool rval = true;
debug_decl(insert_env_vars, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(insert_env_vars, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
/* Add user-specified environment variables. */ /* Add user-specified environment variables. */
if (envp != NULL) { if (envp != NULL) {
@@ -1013,7 +1013,7 @@ validate_env_vars(char * const env_vars[])
char *eq, *bad = NULL; char *eq, *bad = NULL;
size_t len, blen = 0, bsize = 0; size_t len, blen = 0, bsize = 0;
bool okvar, rval = true; bool okvar, rval = true;
debug_decl(validate_env_vars, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(validate_env_vars, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
if (env_vars == NULL) if (env_vars == NULL)
debug_return_bool(true); /* nothing to do */ debug_return_bool(true); /* nothing to do */
@@ -1075,7 +1075,7 @@ read_env_file(const char *path, int overwrite)
bool rval = true; bool rval = true;
char *cp, *var, *val, *line = NULL; char *cp, *var, *val, *line = NULL;
size_t var_len, val_len, linesize = 0; size_t var_len, val_len, linesize = 0;
debug_decl(read_env_file, SUDO_DEBUG_ENV, sudoers_debug_instance) debug_decl(read_env_file, SUDOERS_DEBUG_ENV, sudoers_debug_instance)
if ((fp = fopen(path, "r")) == NULL) { if ((fp = fopen(path, "r")) == NULL) {
if (errno != ENOENT) if (errno != ENOENT)

View File

@@ -62,7 +62,7 @@ find_path(char *infile, char **outfile, struct stat *sbp, char *path,
bool found = false; /* did we find the command? */ bool found = false; /* did we find the command? */
bool checkdot = false; /* check current dir? */ bool checkdot = false; /* check current dir? */
int len; /* length parameter */ int len; /* length parameter */
debug_decl(find_path, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(find_path, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (strlen(infile) >= PATH_MAX) { if (strlen(infile) >= PATH_MAX) {
errno = ENAMETOOLONG; errno = ENAMETOOLONG;

View File

@@ -81,7 +81,7 @@ char *
sudo_getepw(const struct passwd *pw) sudo_getepw(const struct passwd *pw)
{ {
char *epw = NULL; char *epw = NULL;
debug_decl(sudo_getepw, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_getepw, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* If there is a function to check for shadow enabled, use it... */ /* If there is a function to check for shadow enabled, use it... */
#ifdef HAVE_ISCOMSEC #ifdef HAVE_ISCOMSEC
@@ -148,7 +148,7 @@ done:
void void
sudo_setspent(void) sudo_setspent(void)
{ {
debug_decl(sudo_setspent, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_setspent, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
#ifdef HAVE_GETPRPWNAM #ifdef HAVE_GETPRPWNAM
setprpwent(); setprpwent();
@@ -171,7 +171,7 @@ sudo_setspent(void)
void void
sudo_endspent(void) sudo_endspent(void)
{ {
debug_decl(sudo_endspent, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(sudo_endspent, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
#ifdef HAVE_GETPRPWNAM #ifdef HAVE_GETPRPWNAM
endprpwent(); endprpwent();

View File

@@ -45,7 +45,7 @@ sudo_goodpath(const char *path, struct stat *sbp)
{ {
struct stat sb; struct stat sb;
bool rval = false; bool rval = false;
debug_decl(sudo_goodpath, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(sudo_goodpath, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (path != NULL && stat(path, &sb) == 0) { if (path != NULL && stat(path, &sb) == 0) {
/* Make sure path describes an executable regular file. */ /* Make sure path describes an executable regular file. */

View File

@@ -687,7 +687,7 @@ unsigned int yystacksize;
void void
sudoerserror(const char *s) sudoerserror(const char *s)
{ {
debug_decl(sudoerserror, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(sudoerserror, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
/* If we last saw a newline the error is on the preceding line. */ /* If we last saw a newline the error is on the preceding line. */
if (last_token == COMMENT) if (last_token == COMMENT)
@@ -720,7 +720,7 @@ static struct defaults *
new_default(char *var, char *val, int op) new_default(char *var, char *val, int op)
{ {
struct defaults *d; struct defaults *d;
debug_decl(new_default, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(new_default, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
d = sudo_ecalloc(1, sizeof(struct defaults)); d = sudo_ecalloc(1, sizeof(struct defaults));
d->var = var; d->var = var;
@@ -737,7 +737,7 @@ static struct member *
new_member(char *name, int type) new_member(char *name, int type)
{ {
struct member *m; struct member *m;
debug_decl(new_member, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(new_member, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
m = sudo_ecalloc(1, sizeof(struct member)); m = sudo_ecalloc(1, sizeof(struct member));
m->name = name; m->name = name;
@@ -751,7 +751,7 @@ struct sudo_digest *
new_digest(int digest_type, const char *digest_str) new_digest(int digest_type, const char *digest_str)
{ {
struct sudo_digest *dig; struct sudo_digest *dig;
debug_decl(new_digest, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(new_digest, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
dig = sudo_emalloc(sizeof(*dig)); dig = sudo_emalloc(sizeof(*dig));
dig->digest_type = digest_type; dig->digest_type = digest_type;
@@ -770,7 +770,7 @@ add_defaults(int type, struct member *bmem, struct defaults *defs)
{ {
struct defaults *d; struct defaults *d;
struct member_list *binding; struct member_list *binding;
debug_decl(add_defaults, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(add_defaults, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
if (defs != NULL) { if (defs != NULL) {
/* /*
@@ -804,7 +804,7 @@ static void
add_userspec(struct member *members, struct privilege *privs) add_userspec(struct member *members, struct privilege *privs)
{ {
struct userspec *u; struct userspec *u;
debug_decl(add_userspec, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(add_userspec, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
u = sudo_ecalloc(1, sizeof(*u)); u = sudo_ecalloc(1, sizeof(*u));
HLTQ_TO_TAILQ(&u->users, members, entries); HLTQ_TO_TAILQ(&u->users, members, entries);
@@ -824,7 +824,7 @@ init_parser(const char *path, bool quiet)
struct member_list *binding; struct member_list *binding;
struct defaults *d, *d_next; struct defaults *d, *d_next;
struct userspec *us, *us_next; struct userspec *us, *us_next;
debug_decl(init_parser, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(init_parser, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
TAILQ_FOREACH_SAFE(us, &userspecs, entries, us_next) { TAILQ_FOREACH_SAFE(us, &userspecs, entries, us_next) {
struct member *m, *m_next; struct member *m, *m_next;

View File

@@ -672,7 +672,7 @@ group : ALIAS {
void void
sudoerserror(const char *s) sudoerserror(const char *s)
{ {
debug_decl(sudoerserror, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(sudoerserror, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
/* If we last saw a newline the error is on the preceding line. */ /* If we last saw a newline the error is on the preceding line. */
if (last_token == COMMENT) if (last_token == COMMENT)
@@ -705,7 +705,7 @@ static struct defaults *
new_default(char *var, char *val, int op) new_default(char *var, char *val, int op)
{ {
struct defaults *d; struct defaults *d;
debug_decl(new_default, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(new_default, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
d = sudo_ecalloc(1, sizeof(struct defaults)); d = sudo_ecalloc(1, sizeof(struct defaults));
d->var = var; d->var = var;
@@ -722,7 +722,7 @@ static struct member *
new_member(char *name, int type) new_member(char *name, int type)
{ {
struct member *m; struct member *m;
debug_decl(new_member, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(new_member, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
m = sudo_ecalloc(1, sizeof(struct member)); m = sudo_ecalloc(1, sizeof(struct member));
m->name = name; m->name = name;
@@ -736,7 +736,7 @@ struct sudo_digest *
new_digest(int digest_type, const char *digest_str) new_digest(int digest_type, const char *digest_str)
{ {
struct sudo_digest *dig; struct sudo_digest *dig;
debug_decl(new_digest, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(new_digest, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
dig = sudo_emalloc(sizeof(*dig)); dig = sudo_emalloc(sizeof(*dig));
dig->digest_type = digest_type; dig->digest_type = digest_type;
@@ -755,7 +755,7 @@ add_defaults(int type, struct member *bmem, struct defaults *defs)
{ {
struct defaults *d; struct defaults *d;
struct member_list *binding; struct member_list *binding;
debug_decl(add_defaults, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(add_defaults, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
if (defs != NULL) { if (defs != NULL) {
/* /*
@@ -789,7 +789,7 @@ static void
add_userspec(struct member *members, struct privilege *privs) add_userspec(struct member *members, struct privilege *privs)
{ {
struct userspec *u; struct userspec *u;
debug_decl(add_userspec, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(add_userspec, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
u = sudo_ecalloc(1, sizeof(*u)); u = sudo_ecalloc(1, sizeof(*u));
HLTQ_TO_TAILQ(&u->users, members, entries); HLTQ_TO_TAILQ(&u->users, members, entries);
@@ -809,7 +809,7 @@ init_parser(const char *path, bool quiet)
struct member_list *binding; struct member_list *binding;
struct defaults *d, *d_next; struct defaults *d, *d_next;
struct userspec *us, *us_next; struct userspec *us, *us_next;
debug_decl(init_parser, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(init_parser, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
TAILQ_FOREACH_SAFE(us, &userspecs, entries, us_next) { TAILQ_FOREACH_SAFE(us, &userspecs, entries, us_next) {
struct member *m, *m_next; struct member *m, *m_next;

View File

@@ -64,7 +64,7 @@ group_plugin_load(char *plugin_info)
char *args, path[PATH_MAX]; char *args, path[PATH_MAX];
char **argv = NULL; char **argv = NULL;
int len, rc = -1; int len, rc = -1;
debug_decl(group_plugin_load, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(group_plugin_load, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* /*
* Fill in .so path and split out args (if any). * Fill in .so path and split out args (if any).
@@ -161,7 +161,7 @@ done:
void void
group_plugin_unload(void) group_plugin_unload(void)
{ {
debug_decl(group_plugin_unload, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(group_plugin_unload, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (group_plugin != NULL) { if (group_plugin != NULL) {
(group_plugin->cleanup)(); (group_plugin->cleanup)();
@@ -178,7 +178,7 @@ int
group_plugin_query(const char *user, const char *group, group_plugin_query(const char *user, const char *group,
const struct passwd *pwd) const struct passwd *pwd)
{ {
debug_decl(group_plugin_query, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(group_plugin_query, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (group_plugin == NULL) if (group_plugin == NULL)
debug_return_bool(false); debug_return_bool(false);
@@ -194,14 +194,14 @@ group_plugin_query(const char *user, const char *group,
int int
group_plugin_load(char *plugin_info) group_plugin_load(char *plugin_info)
{ {
debug_decl(group_plugin_load, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(group_plugin_load, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
debug_return_bool(false); debug_return_bool(false);
} }
void void
group_plugin_unload(void) group_plugin_unload(void)
{ {
debug_decl(group_plugin_unload, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(group_plugin_unload, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
debug_return; debug_return;
} }
@@ -209,7 +209,7 @@ int
group_plugin_query(const char *user, const char *group, group_plugin_query(const char *user, const char *group,
const struct passwd *pwd) const struct passwd *pwd)
{ {
debug_decl(group_plugin_query, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(group_plugin_query, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
debug_return_bool(false); debug_return_bool(false);
} }

View File

@@ -30,7 +30,7 @@ hexchar(const char *s)
{ {
unsigned char result[2]; unsigned char result[2];
int i; int i;
debug_decl(hexchar, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(hexchar, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
switch (s[i]) { switch (s[i]) {

View File

@@ -62,7 +62,7 @@ set_interfaces(const char *ai)
{ {
char *addrinfo, *addr, *mask; char *addrinfo, *addr, *mask;
struct interface *ifp; struct interface *ifp;
debug_decl(set_interfaces, SUDO_DEBUG_NETIF, sudoers_debug_instance) debug_decl(set_interfaces, SUDOERS_DEBUG_NETIF, sudoers_debug_instance)
addrinfo = sudo_estrdup(ai); addrinfo = sudo_estrdup(ai);
for (addr = strtok(addrinfo, " \t"); addr != NULL; addr = strtok(NULL, " \t")) { for (addr = strtok(addrinfo, " \t"); addr != NULL; addr = strtok(NULL, " \t")) {
@@ -109,7 +109,7 @@ void
dump_interfaces(const char *ai) dump_interfaces(const char *ai)
{ {
char *cp, *addrinfo; char *cp, *addrinfo;
debug_decl(set_interfaces, SUDO_DEBUG_NETIF, sudoers_debug_instance) debug_decl(set_interfaces, SUDOERS_DEBUG_NETIF, sudoers_debug_instance)
addrinfo = sudo_estrdup(ai); addrinfo = sudo_estrdup(ai);

View File

@@ -92,7 +92,7 @@ io_mkdirs(char *path, mode_t mode, bool is_temp)
gid_t parent_gid = 0; gid_t parent_gid = 0;
char *slash = path; char *slash = path;
bool ok = true; bool ok = true;
debug_decl(io_mkdirs, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(io_mkdirs, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* Fast path: not a temporary and already exists. */ /* Fast path: not a temporary and already exists. */
if (!is_temp && stat(path, &sb) == 0) { if (!is_temp && stat(path, &sb) == 0) {
@@ -155,7 +155,7 @@ io_set_max_sessid(const char *maxval)
{ {
const char *errstr; const char *errstr;
unsigned int value; unsigned int value;
debug_decl(io_set_max_sessid, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(io_set_max_sessid, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
value = strtonum(maxval, 0, SESSID_MAX, &errstr); value = strtonum(maxval, 0, SESSID_MAX, &errstr);
if (errstr != NULL) { if (errstr != NULL) {
@@ -187,7 +187,7 @@ io_nextid(char *iolog_dir, char *iolog_dir_fallback, char sessid[7])
ssize_t nread; ssize_t nread;
char pathbuf[PATH_MAX]; char pathbuf[PATH_MAX];
static const char b36char[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; static const char b36char[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
debug_decl(io_nextid, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(io_nextid, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* /*
* Create I/O log directory if it doesn't already exist. * Create I/O log directory if it doesn't already exist.
@@ -297,7 +297,7 @@ mkdir_iopath(const char *iolog_path, char *pathbuf, size_t pathsize)
{ {
size_t len; size_t len;
bool is_temp = false; bool is_temp = false;
debug_decl(mkdir_iopath, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(mkdir_iopath, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
len = strlcpy(pathbuf, iolog_path, pathsize); len = strlcpy(pathbuf, iolog_path, pathsize);
if (len >= pathsize) { if (len >= pathsize) {
@@ -328,7 +328,7 @@ static bool
open_io_fd(char *pathbuf, size_t len, struct io_log_file *iol, bool docompress) open_io_fd(char *pathbuf, size_t len, struct io_log_file *iol, bool docompress)
{ {
int fd; int fd;
debug_decl(open_io_fd, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(open_io_fd, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
pathbuf[len] = '\0'; pathbuf[len] = '\0';
strlcat(pathbuf, iol->suffix, PATH_MAX); strlcat(pathbuf, iol->suffix, PATH_MAX);
@@ -370,7 +370,7 @@ iolog_deserialize_info(struct iolog_details *details, char * const user_info[],
id_t id; id_t id;
uid_t runas_uid = 0; uid_t runas_uid = 0;
gid_t runas_gid = 0; gid_t runas_gid = 0;
debug_decl(iolog_deserialize_info, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(iolog_deserialize_info, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
details->lines = 24; details->lines = 24;
details->cols = 80; details->cols = 80;
@@ -536,7 +536,7 @@ write_info_log(char *pathbuf, size_t len, struct iolog_details *details,
char * const *av; char * const *av;
FILE *fp; FILE *fp;
int fd; int fd;
debug_decl(write_info_log, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(write_info_log, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
pathbuf[len] = '\0'; pathbuf[len] = '\0';
strlcat(pathbuf, "/log", PATH_MAX); strlcat(pathbuf, "/log", PATH_MAX);
@@ -574,7 +574,7 @@ sudoers_io_open(unsigned int version, sudo_conv_t conversation,
const char *plugin_path = NULL; const char *plugin_path = NULL;
size_t len; size_t len;
int i, prev_instance, rval = -1; int i, prev_instance, rval = -1;
debug_decl(sudoers_io_open, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_io_open, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
sudo_conv = conversation; sudo_conv = conversation;
sudo_printf = plugin_printf; sudo_printf = plugin_printf;
@@ -683,7 +683,7 @@ static void
sudoers_io_close(int exit_status, int error) sudoers_io_close(int exit_status, int error)
{ {
int i, prev_instance; int i, prev_instance;
debug_decl(sudoers_io_close, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_io_close, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);
@@ -711,7 +711,7 @@ static int
sudoers_io_version(int verbose) sudoers_io_version(int verbose)
{ {
int prev_instance; int prev_instance;
debug_decl(sudoers_io_version, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_io_version, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);
@@ -731,7 +731,7 @@ sudoers_io_log(const char *buf, unsigned int len, int idx)
{ {
struct timeval now, delay; struct timeval now, delay;
int prev_instance, rval = true; int prev_instance, rval = true;
debug_decl(sudoers_io_version, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_io_version, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);

View File

@@ -50,12 +50,12 @@ static size_t
fill_seq(char *str, size_t strsize, char *logdir) fill_seq(char *str, size_t strsize, char *logdir)
{ {
#ifdef SUDOERS_NO_SEQ #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)); debug_return_size_t(strlcpy(str, "%{seq}", strsize));
#else #else
static char sessid[7]; static char sessid[7];
int len; 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 (sessid[0] == '\0') {
if (!io_nextid(logdir, def_iolog_dir, sessid)) if (!io_nextid(logdir, def_iolog_dir, sessid))
@@ -74,7 +74,7 @@ fill_seq(char *str, size_t strsize, char *logdir)
static size_t static size_t
fill_user(char *str, size_t strsize, char *unused) 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)); 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; struct group *grp;
size_t len; 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) { if ((grp = sudo_getgrgid(user_gid)) != NULL) {
len = strlcpy(str, grp->gr_name, strsize); len = strlcpy(str, grp->gr_name, strsize);
@@ -99,7 +99,7 @@ fill_group(char *str, size_t strsize, char *unused)
static size_t static size_t
fill_runas_user(char *str, size_t strsize, char *unused) 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)); 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; struct group *grp;
size_t len; 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) { if (runas_gr != NULL) {
len = strlcpy(str, runas_gr->gr_name, strsize); 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 static size_t
fill_hostname(char *str, size_t strsize, char *unused) 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)); debug_return_size_t(strlcpy(str, user_shost, strsize));
} }
static size_t static size_t
fill_command(char *str, size_t strsize, char *unused) 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)); 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; struct path_escape *escapes = NULL;
int pass, oldlocale; int pass, oldlocale;
bool strfit; 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 */ /* Expanded path must be <= PATH_MAX */
if (prefix != NULL) if (prefix != NULL)

View File

@@ -398,7 +398,7 @@ sudo_ldap_conf_add_ports(void)
char *host, *port, defport[13]; char *host, *port, defport[13];
char hostbuf[LINE_MAX * 2]; char hostbuf[LINE_MAX * 2];
int len; int len;
debug_decl(sudo_ldap_conf_add_ports, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_conf_add_ports, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
hostbuf[0] = '\0'; hostbuf[0] = '\0';
len = snprintf(defport, sizeof(defport), ":%d", ldap_conf.port); len = snprintf(defport, sizeof(defport), ":%d", ldap_conf.port);
@@ -448,7 +448,7 @@ sudo_ldap_parse_uri(const struct ldap_config_str_list *uri_list)
char hostbuf[LINE_MAX]; char hostbuf[LINE_MAX];
int nldap = 0, nldaps = 0; int nldap = 0, nldaps = 0;
int rc = -1; int rc = -1;
debug_decl(sudo_ldap_parse_uri, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_parse_uri, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
hostbuf[0] = '\0'; hostbuf[0] = '\0';
STAILQ_FOREACH(entry, uri_list, entries) { STAILQ_FOREACH(entry, uri_list, entries) {
@@ -524,7 +524,7 @@ sudo_ldap_join_uri(struct ldap_config_str_list *uri_list)
struct ldap_config_str *uri; struct ldap_config_str *uri;
size_t len = 0; size_t len = 0;
char *buf, *cp; char *buf, *cp;
debug_decl(sudo_ldap_join_uri, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_join_uri, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
STAILQ_FOREACH(uri, uri_list, entries) { STAILQ_FOREACH(uri, uri_list, entries) {
if (ldap_conf.ssl_mode == SUDO_LDAP_STARTTLS) { if (ldap_conf.ssl_mode == SUDO_LDAP_STARTTLS) {
@@ -556,7 +556,7 @@ sudo_ldap_init(LDAP **ldp, const char *host, int port)
{ {
LDAP *ld; LDAP *ld;
int rc = LDAP_CONNECT_ERROR; int rc = LDAP_CONNECT_ERROR;
debug_decl(sudo_ldap_init, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_init, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
#ifdef HAVE_LDAPSSL_INIT #ifdef HAVE_LDAPSSL_INIT
if (ldap_conf.ssl_mode != SUDO_LDAP_CLEAR) { if (ldap_conf.ssl_mode != SUDO_LDAP_CLEAR) {
@@ -653,7 +653,7 @@ sudo_ldap_check_non_unix_group(LDAP *ld, LDAPMessage *entry, struct passwd *pw)
struct berval **bv, **p; struct berval **bv, **p;
char *val; char *val;
int ret = false; int ret = false;
debug_decl(sudo_ldap_check_non_unix_group, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_check_non_unix_group, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (!entry) if (!entry)
debug_return_bool(ret); debug_return_bool(ret);
@@ -694,7 +694,7 @@ sudo_ldap_check_host(LDAP *ld, LDAPMessage *entry)
struct berval **bv, **p; struct berval **bv, **p;
char *val; char *val;
bool ret = false; bool ret = false;
debug_decl(sudo_ldap_check_host, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_check_host, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (!entry) if (!entry)
debug_return_bool(ret); debug_return_bool(ret);
@@ -726,7 +726,7 @@ sudo_ldap_check_runas_user(LDAP *ld, LDAPMessage *entry)
struct berval **bv, **p; struct berval **bv, **p;
char *val; char *val;
bool ret = false; bool ret = false;
debug_decl(sudo_ldap_check_runas_user, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_check_runas_user, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (!runas_pw) if (!runas_pw)
debug_return_bool(UNSPEC); debug_return_bool(UNSPEC);
@@ -797,7 +797,7 @@ sudo_ldap_check_runas_group(LDAP *ld, LDAPMessage *entry)
struct berval **bv, **p; struct berval **bv, **p;
char *val; char *val;
bool ret = false; bool ret = false;
debug_decl(sudo_ldap_check_runas_group, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_check_runas_group, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* runas_gr is only set if the user specified the -g flag */ /* runas_gr is only set if the user specified the -g flag */
if (!runas_gr) if (!runas_gr)
@@ -830,7 +830,7 @@ static bool
sudo_ldap_check_runas(LDAP *ld, LDAPMessage *entry) sudo_ldap_check_runas(LDAP *ld, LDAPMessage *entry)
{ {
bool ret; bool ret;
debug_decl(sudo_ldap_check_runas, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_check_runas, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (!entry) if (!entry)
debug_return_bool(false); debug_return_bool(false);
@@ -846,7 +846,7 @@ sudo_ldap_extract_digest(char **cmnd, struct sudo_digest *digest)
{ {
char *ep, *cp = *cmnd; char *ep, *cp = *cmnd;
int digest_type = SUDO_DIGEST_INVALID; int digest_type = SUDO_DIGEST_INVALID;
debug_decl(sudo_ldap_check_command, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_check_command, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* /*
* Check for and extract a digest prefix, e.g. * Check for and extract a digest prefix, e.g.
@@ -912,7 +912,7 @@ sudo_ldap_check_command(LDAP *ld, LDAPMessage *entry, int *setenv_implied)
char *allowed_cmnd, *allowed_args, *val; char *allowed_cmnd, *allowed_args, *val;
bool foundbang; bool foundbang;
int ret = UNSPEC; int ret = UNSPEC;
debug_decl(sudo_ldap_check_command, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_check_command, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (!entry) if (!entry)
debug_return_bool(ret); debug_return_bool(ret);
@@ -980,7 +980,7 @@ sudo_ldap_check_bool(LDAP *ld, LDAPMessage *entry, char *option)
struct berval **bv, **p; struct berval **bv, **p;
char ch, *var; char ch, *var;
int ret = UNSPEC; int ret = UNSPEC;
debug_decl(sudo_ldap_check_bool, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_check_bool, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (entry == NULL) if (entry == NULL)
debug_return_bool(ret); debug_return_bool(ret);
@@ -1014,7 +1014,7 @@ sudo_ldap_parse_options(LDAP *ld, LDAPMessage *entry)
{ {
struct berval **bv, **p; struct berval **bv, **p;
char op, *var, *val; char op, *var, *val;
debug_decl(sudo_ldap_parse_options, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_parse_options, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (entry == NULL) if (entry == NULL)
debug_return; debug_return;
@@ -1085,7 +1085,7 @@ sudo_ldap_timefilter(char *buffer, size_t buffersize)
time_t now; time_t now;
char timebuffer[sizeof("20120727121554.0Z")]; char timebuffer[sizeof("20120727121554.0Z")];
int bytes = 0; int bytes = 0;
debug_decl(sudo_ldap_timefilter, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_timefilter, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Make sure we have a formatted timestamp for __now__. */ /* Make sure we have a formatted timestamp for __now__. */
time(&now); time(&now);
@@ -1119,7 +1119,7 @@ static char *
sudo_ldap_build_default_filter(void) sudo_ldap_build_default_filter(void)
{ {
char *filt; char *filt;
debug_decl(sudo_ldap_build_default_filter, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_build_default_filter, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (ldap_conf.search_filter) if (ldap_conf.search_filter)
sudo_easprintf(&filt, "(&%s(cn=defaults))", ldap_conf.search_filter); sudo_easprintf(&filt, "(&%s(cn=defaults))", ldap_conf.search_filter);
@@ -1232,7 +1232,7 @@ sudo_ldap_build_pass1(struct passwd *pw)
struct group_list *grlist; struct group_list *grlist;
size_t sz = 0; size_t sz = 0;
int i; int i;
debug_decl(sudo_ldap_build_pass1, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_build_pass1, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* If there is a filter, allocate space for the global AND. */ /* If there is a filter, allocate space for the global AND. */
if (ldap_conf.timed || ldap_conf.search_filter) if (ldap_conf.timed || ldap_conf.search_filter)
@@ -1348,7 +1348,7 @@ static char *
sudo_ldap_build_pass2(void) sudo_ldap_build_pass2(void)
{ {
char *filt, timebuffer[TIMEFILTER_LENGTH + 1]; char *filt, timebuffer[TIMEFILTER_LENGTH + 1];
debug_decl(sudo_ldap_build_pass2, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_build_pass2, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Short circuit if no non-Unix group support. */ /* Short circuit if no non-Unix group support. */
if (!def_use_netgroups && !def_group_plugin) { if (!def_use_netgroups && !def_group_plugin) {
@@ -1389,7 +1389,7 @@ sudo_ldap_decode_secret(const char *secret)
{ {
unsigned char *result = NULL; unsigned char *result = NULL;
size_t len, reslen; size_t len, reslen;
debug_decl(sudo_ldap_decode_secret, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_decode_secret, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (strncasecmp(secret, "base64:", sizeof("base64:") - 1) == 0) { if (strncasecmp(secret, "base64:", sizeof("base64:") - 1) == 0) {
/* /*
@@ -1415,7 +1415,7 @@ sudo_ldap_read_secret(const char *path)
{ {
FILE *fp; FILE *fp;
char buf[LINE_MAX]; char buf[LINE_MAX];
debug_decl(sudo_ldap_read_secret, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_read_secret, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if ((fp = fopen(path_ldap_secret, "r")) != NULL) { if ((fp = fopen(path_ldap_secret, "r")) != NULL) {
if (fgets(buf, sizeof(buf), fp) != NULL) { if (fgets(buf, sizeof(buf), fp) != NULL) {
@@ -1444,7 +1444,7 @@ sudo_ldap_parse_keyword(const char *keyword, const char *value,
{ {
struct ldap_config_table *cur; struct ldap_config_table *cur;
const char *errstr; const char *errstr;
debug_decl(sudo_ldap_parse_keyword, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_parse_keyword, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Look up keyword in config tables */ /* Look up keyword in config tables */
for (cur = table; cur->conf_str != NULL; cur++) { for (cur = table; cur->conf_str != NULL; cur++) {
@@ -1500,7 +1500,7 @@ static const char *
sudo_krb5_ccname_path(const char *old_ccname) sudo_krb5_ccname_path(const char *old_ccname)
{ {
const char *ccname = old_ccname; const char *ccname = old_ccname;
debug_decl(sudo_krb5_ccname_path, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_krb5_ccname_path, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Strip off leading FILE: or WRFILE: prefix. */ /* Strip off leading FILE: or WRFILE: prefix. */
switch (ccname[0]) { switch (ccname[0]) {
@@ -1527,7 +1527,7 @@ sudo_check_krb5_ccname(const char *ccname)
{ {
int fd = -1; int fd = -1;
const char *ccname_path; const char *ccname_path;
debug_decl(sudo_check_krb5_ccname, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_check_krb5_ccname, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Strip off prefix to get path name. */ /* Strip off prefix to get path name. */
ccname_path = sudo_krb5_ccname_path(ccname); ccname_path = sudo_krb5_ccname_path(ccname);
@@ -1556,7 +1556,7 @@ sudo_ldap_read_config(void)
FILE *fp; FILE *fp;
char *cp, *keyword, *value, *line = NULL; char *cp, *keyword, *value, *line = NULL;
size_t linesize = 0; size_t linesize = 0;
debug_decl(sudo_ldap_read_config, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_read_config, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* defaults */ /* defaults */
ldap_conf.version = 3; ldap_conf.version = 3;
@@ -1790,7 +1790,7 @@ sudo_ldap_get_first_rdn(LDAP *ld, LDAPMessage *entry)
#ifdef HAVE_LDAP_STR2DN #ifdef HAVE_LDAP_STR2DN
char *dn, *rdn = NULL; char *dn, *rdn = NULL;
LDAPDN tmpDN; LDAPDN tmpDN;
debug_decl(sudo_ldap_get_first_rdn, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_get_first_rdn, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if ((dn = ldap_get_dn(ld, entry)) == NULL) if ((dn = ldap_get_dn(ld, entry)) == NULL)
debug_return_str(NULL); debug_return_str(NULL);
@@ -1802,7 +1802,7 @@ sudo_ldap_get_first_rdn(LDAP *ld, LDAPMessage *entry)
debug_return_str(rdn); debug_return_str(rdn);
#else #else
char *dn, **edn; char *dn, **edn;
debug_decl(sudo_ldap_get_first_rdn, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_get_first_rdn, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if ((dn = ldap_get_dn(ld, entry)) == NULL) if ((dn = ldap_get_dn(ld, entry)) == NULL)
return NULL; return NULL;
@@ -1827,7 +1827,7 @@ sudo_ldap_display_defaults(struct sudo_nss *nss, struct passwd *pw,
LDAPMessage *entry, *result; LDAPMessage *entry, *result;
char *prefix, *filt; char *prefix, *filt;
int rc, count = 0; int rc, count = 0;
debug_decl(sudo_ldap_display_defaults, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_display_defaults, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (handle == NULL || handle->ld == NULL) if (handle == NULL || handle->ld == NULL)
goto done; goto done;
@@ -1873,7 +1873,7 @@ static int
sudo_ldap_display_bound_defaults(struct sudo_nss *nss, struct passwd *pw, sudo_ldap_display_bound_defaults(struct sudo_nss *nss, struct passwd *pw,
struct sudo_lbuf *lbuf) struct sudo_lbuf *lbuf)
{ {
debug_decl(sudo_ldap_display_bound_defaults, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_display_bound_defaults, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
debug_return_int(0); debug_return_int(0);
} }
@@ -1885,7 +1885,7 @@ sudo_ldap_display_entry_short(LDAP *ld, LDAPMessage *entry, struct sudo_lbuf *lb
{ {
struct berval **bv, **p; struct berval **bv, **p;
int count = 0; int count = 0;
debug_decl(sudo_ldap_display_entry_short, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_display_entry_short, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
sudo_lbuf_append(lbuf, " ("); sudo_lbuf_append(lbuf, " (");
@@ -1955,7 +1955,7 @@ sudo_ldap_display_entry_long(LDAP *ld, LDAPMessage *entry, struct sudo_lbuf *lbu
struct berval **bv, **p; struct berval **bv, **p;
char *rdn; char *rdn;
int count = 0; int count = 0;
debug_decl(sudo_ldap_display_entry_long, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_display_entry_long, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* extract the dn, only show the first rdn */ /* extract the dn, only show the first rdn */
rdn = sudo_ldap_get_first_rdn(ld, entry); rdn = sudo_ldap_get_first_rdn(ld, entry);
@@ -2040,7 +2040,7 @@ sudo_ldap_display_privs(struct sudo_nss *nss, struct passwd *pw,
struct ldap_result *lres; struct ldap_result *lres;
LDAPMessage *entry; LDAPMessage *entry;
int i, count = 0; int i, count = 0;
debug_decl(sudo_ldap_display_privs, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_display_privs, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (handle == NULL || handle->ld == NULL) if (handle == NULL || handle->ld == NULL)
goto done; goto done;
@@ -2071,7 +2071,7 @@ sudo_ldap_display_cmnd(struct sudo_nss *nss, struct passwd *pw)
LDAPMessage *entry; LDAPMessage *entry;
bool found = false; bool found = false;
int i; int i;
debug_decl(sudo_ldap_display_cmnd, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_display_cmnd, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (handle == NULL || handle->ld == NULL) if (handle == NULL || handle->ld == NULL)
goto done; goto done;
@@ -2108,7 +2108,7 @@ sudo_set_krb5_ccache_name(const char *name, const char **old_name)
int rc = 0; int rc = 0;
unsigned int junk; unsigned int junk;
static bool initialized; static bool initialized;
debug_decl(sudo_set_krb5_ccache_name, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_set_krb5_ccache_name, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (!initialized) { if (!initialized) {
sudo_gss_krb5_ccache_name = sudo_gss_krb5_ccache_name =
@@ -2151,7 +2151,7 @@ sudo_krb5_copy_cc_file(const char *old_ccname)
ssize_t nread, nwritten = -1; ssize_t nread, nwritten = -1;
static char new_ccname[sizeof(_PATH_TMP) + sizeof("sudocc_XXXXXXXX") - 1]; static char new_ccname[sizeof(_PATH_TMP) + sizeof("sudocc_XXXXXXXX") - 1];
char buf[10240], *ret = NULL; char buf[10240], *ret = NULL;
debug_decl(sudo_krb5_copy_cc_file, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_krb5_copy_cc_file, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
old_ccname = sudo_krb5_ccname_path(old_ccname); old_ccname = sudo_krb5_ccname_path(old_ccname);
if (old_ccname != NULL) { if (old_ccname != NULL) {
@@ -2212,7 +2212,7 @@ sudo_ldap_sasl_interact(LDAP *ld, unsigned int flags, void *_auth_id,
char *auth_id = (char *)_auth_id; char *auth_id = (char *)_auth_id;
sasl_interact_t *interact = (sasl_interact_t *)_interact; sasl_interact_t *interact = (sasl_interact_t *)_interact;
int rc = LDAP_SUCCESS; int rc = LDAP_SUCCESS;
debug_decl(sudo_ldap_sasl_interact, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_sasl_interact, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
for (; interact->id != SASL_CB_LIST_END; interact++) { for (; interact->id != SASL_CB_LIST_END; interact++) {
if (interact->id != SASL_CB_USER) { if (interact->id != SASL_CB_USER) {
@@ -2254,7 +2254,7 @@ sudo_ldap_set_options_table(LDAP *ld, struct ldap_config_table *table)
struct ldap_config_table *cur; struct ldap_config_table *cur;
int ival, rc, errors = 0; int ival, rc, errors = 0;
char *sval; char *sval;
debug_decl(sudo_ldap_set_options_table, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_set_options_table, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
for (cur = table; cur->conf_str != NULL; cur++) { for (cur = table; cur->conf_str != NULL; cur++) {
if (cur->opt_val == -1) if (cur->opt_val == -1)
@@ -2299,7 +2299,7 @@ static int
sudo_ldap_set_options_global(void) sudo_ldap_set_options_global(void)
{ {
int rc; int rc;
debug_decl(sudo_ldap_set_options_global, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_set_options_global, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Set ber options */ /* Set ber options */
#ifdef LBER_OPT_DEBUG_LEVEL #ifdef LBER_OPT_DEBUG_LEVEL
@@ -2320,7 +2320,7 @@ static int
sudo_ldap_set_options_conn(LDAP *ld) sudo_ldap_set_options_conn(LDAP *ld)
{ {
int rc; int rc;
debug_decl(sudo_ldap_set_options_conn, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_set_options_conn, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Parse per-connection LDAP options table. */ /* Parse per-connection LDAP options table. */
rc = sudo_ldap_set_options_table(ld, ldap_conf_conn); rc = sudo_ldap_set_options_table(ld, ldap_conf_conn);
@@ -2382,7 +2382,7 @@ static struct ldap_result *
sudo_ldap_result_alloc(void) sudo_ldap_result_alloc(void)
{ {
struct ldap_result *result; struct ldap_result *result;
debug_decl(sudo_ldap_result_alloc, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_result_alloc, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
result = sudo_ecalloc(1, sizeof(*result)); result = sudo_ecalloc(1, sizeof(*result));
STAILQ_INIT(&result->searches); STAILQ_INIT(&result->searches);
@@ -2397,7 +2397,7 @@ static void
sudo_ldap_result_free(struct ldap_result *lres) sudo_ldap_result_free(struct ldap_result *lres)
{ {
struct ldap_search_result *s; struct ldap_search_result *s;
debug_decl(sudo_ldap_result_free, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_result_free, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (lres != NULL) { if (lres != NULL) {
if (lres->nentries) { if (lres->nentries) {
@@ -2422,7 +2422,7 @@ sudo_ldap_result_add_search(struct ldap_result *lres, LDAP *ldap,
LDAPMessage *searchresult) LDAPMessage *searchresult)
{ {
struct ldap_search_result *news; struct ldap_search_result *news;
debug_decl(sudo_ldap_result_add_search, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_result_add_search, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Create new entry and add it to the end of the chain. */ /* Create new entry and add it to the end of the chain. */
news = sudo_ecalloc(1, sizeof(*news)); news = sudo_ecalloc(1, sizeof(*news));
@@ -2441,7 +2441,7 @@ static int
sudo_ldap_bind_s(LDAP *ld) sudo_ldap_bind_s(LDAP *ld)
{ {
int rc; int rc;
debug_decl(sudo_ldap_bind_s, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_bind_s, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
#ifdef HAVE_LDAP_SASL_INTERACTIVE_BIND_S #ifdef HAVE_LDAP_SASL_INTERACTIVE_BIND_S
if (ldap_conf.rootuse_sasl == true || if (ldap_conf.rootuse_sasl == true ||
@@ -2537,7 +2537,7 @@ sudo_ldap_open(struct sudo_nss *nss)
sigaction_t sa, saved_sa_pipe; sigaction_t sa, saved_sa_pipe;
bool ldapnoinit = false; bool ldapnoinit = false;
struct sudo_ldap_handle *handle; struct sudo_ldap_handle *handle;
debug_decl(sudo_ldap_open, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_open, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Ignore SIGPIPE if we cannot bind to the server. */ /* Ignore SIGPIPE if we cannot bind to the server. */
memset(&sa, 0, sizeof(sa)); memset(&sa, 0, sizeof(sa));
@@ -2641,7 +2641,7 @@ sudo_ldap_setdefs(struct sudo_nss *nss)
LDAPMessage *entry, *result; LDAPMessage *entry, *result;
char *filt; char *filt;
int rc; int rc;
debug_decl(sudo_ldap_setdefs, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_setdefs, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (handle == NULL || handle->ld == NULL) if (handle == NULL || handle->ld == NULL)
debug_return_int(-1); debug_return_int(-1);
@@ -2684,7 +2684,7 @@ sudo_ldap_lookup(struct sudo_nss *nss, int ret, int pwflag)
LDAPMessage *entry; LDAPMessage *entry;
int i, rc, setenv_implied; int i, rc, setenv_implied;
struct ldap_result *lres = NULL; struct ldap_result *lres = NULL;
debug_decl(sudo_ldap_lookup, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_lookup, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (handle == NULL || handle->ld == NULL) if (handle == NULL || handle->ld == NULL)
debug_return_int(ret); debug_return_int(ret);
@@ -2803,7 +2803,7 @@ ldap_entry_compare(const void *a, const void *b)
{ {
const struct ldap_entry_wrapper *aw = a; const struct ldap_entry_wrapper *aw = a;
const struct ldap_entry_wrapper *bw = b; const struct ldap_entry_wrapper *bw = b;
debug_decl(ldap_entry_compare, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(ldap_entry_compare, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
debug_return_int(bw->order < aw->order ? -1 : debug_return_int(bw->order < aw->order ? -1 :
(bw->order > aw->order ? 1 : 0)); (bw->order > aw->order ? 1 : 0));
@@ -2816,7 +2816,7 @@ ldap_entry_compare(const void *a, const void *b)
static struct ldap_search_result * static struct ldap_search_result *
sudo_ldap_result_last_search(struct ldap_result *lres) sudo_ldap_result_last_search(struct ldap_result *lres)
{ {
debug_decl(sudo_ldap_result_last_search, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_result_last_search, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
debug_return_ptr(STAILQ_LAST(&lres->searches, ldap_search_result, entries)); debug_return_ptr(STAILQ_LAST(&lres->searches, ldap_search_result, entries));
} }
@@ -2831,7 +2831,7 @@ sudo_ldap_result_add_entry(struct ldap_result *lres, LDAPMessage *entry)
struct berval **bv; struct berval **bv;
double order = 0.0; double order = 0.0;
char *ep; char *ep;
debug_decl(sudo_ldap_result_add_entry, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_result_add_entry, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* Determine whether the entry has the sudoOrder attribute. */ /* Determine whether the entry has the sudoOrder attribute. */
last = sudo_ldap_result_last_search(lres); last = sudo_ldap_result_last_search(lres);
@@ -2874,7 +2874,7 @@ static void
sudo_ldap_result_free_nss(struct sudo_nss *nss) sudo_ldap_result_free_nss(struct sudo_nss *nss)
{ {
struct sudo_ldap_handle *handle = nss->handle; struct sudo_ldap_handle *handle = nss->handle;
debug_decl(sudo_ldap_result_free_nss, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_result_free_nss, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (handle->result != NULL) { if (handle->result != NULL) {
DPRINTF1("removing reusable search result"); DPRINTF1("removing reusable search result");
@@ -2904,7 +2904,7 @@ sudo_ldap_result_get(struct sudo_nss *nss, struct passwd *pw)
LDAP *ld = handle->ld; LDAP *ld = handle->ld;
int pass, rc; int pass, rc;
char *filt; char *filt;
debug_decl(sudo_ldap_result_get, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_result_get, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* /*
* If we already have a cached result, return it so we don't have to * If we already have a cached result, return it so we don't have to
@@ -3000,7 +3000,7 @@ static int
sudo_ldap_close(struct sudo_nss *nss) sudo_ldap_close(struct sudo_nss *nss)
{ {
struct sudo_ldap_handle *handle = nss->handle; struct sudo_ldap_handle *handle = nss->handle;
debug_decl(sudo_ldap_close, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_ldap_close, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
if (handle != NULL) { if (handle != NULL) {
/* Free the result before unbinding; it may use the LDAP connection. */ /* Free the result before unbinding; it may use the LDAP connection. */

View File

@@ -50,7 +50,7 @@ static int
linux_audit_open(void) linux_audit_open(void)
{ {
static int au_fd = -1; static int au_fd = -1;
debug_decl(linux_audit_open, SUDO_DEBUG_AUDIT, sudoers_debug_instance) debug_decl(linux_audit_open, SUDOERS_DEBUG_AUDIT, sudoers_debug_instance)
if (au_fd != -1) if (au_fd != -1)
debug_return_int(au_fd); debug_return_int(au_fd);
@@ -73,7 +73,7 @@ linux_audit_command(char *argv[], int result)
int au_fd, rc = -1; int au_fd, rc = -1;
char *command, *cp, **av; char *command, *cp, **av;
size_t size, n; size_t size, n;
debug_decl(linux_audit_command, SUDO_DEBUG_AUDIT, sudoers_debug_instance) debug_decl(linux_audit_command, SUDOERS_DEBUG_AUDIT, sudoers_debug_instance)
/* Don't return an error if auditing is not configured. */ /* Don't return an error if auditing is not configured. */
if ((au_fd = linux_audit_open()) < 0) if ((au_fd = linux_audit_open()) < 0)

View File

@@ -87,7 +87,7 @@ mysyslog(int pri, const char *fmt, ...)
#endif #endif
char buf[MAXSYSLOGLEN+1]; char buf[MAXSYSLOGLEN+1];
va_list ap; va_list ap;
debug_decl(mysyslog, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(mysyslog, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
va_start(ap, fmt); va_start(ap, fmt);
#ifdef LOG_NFACILITIES #ifdef LOG_NFACILITIES
@@ -124,7 +124,7 @@ do_syslog(int pri, char *msg)
char *p, *tmp, save; char *p, *tmp, save;
const char *fmt; const char *fmt;
int oldlocale; int oldlocale;
debug_decl(do_syslog, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(do_syslog, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale); sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);
@@ -176,7 +176,7 @@ do_logfile(char *msg)
mode_t oldmask; mode_t oldmask;
int oldlocale; int oldlocale;
FILE *fp; FILE *fp;
debug_decl(do_logfile, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(do_logfile, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale); sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);
@@ -235,7 +235,7 @@ log_denial(int status, bool inform_user)
char *logline; char *logline;
int oldlocale; int oldlocale;
bool uid_changed; bool uid_changed;
debug_decl(log_denial, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(log_denial, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
/* Handle auditing first (audit_failure() handles the locale itself). */ /* Handle auditing first (audit_failure() handles the locale itself). */
if (ISSET(status, FLAG_NO_USER | FLAG_NO_HOST)) if (ISSET(status, FLAG_NO_USER | FLAG_NO_HOST))
@@ -315,7 +315,7 @@ void
log_failure(int status, int flags) log_failure(int status, int flags)
{ {
bool inform_user = true; bool inform_user = true;
debug_decl(log_failure, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(log_failure, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
/* The user doesn't always get to see the log message (path info). */ /* The user doesn't always get to see the log message (path info). */
if (!ISSET(status, FLAG_NO_USER | FLAG_NO_HOST) && def_path_info && if (!ISSET(status, FLAG_NO_USER | FLAG_NO_HOST) && def_path_info &&
@@ -347,7 +347,7 @@ void
log_auth_failure(int status, unsigned int tries) log_auth_failure(int status, unsigned int tries)
{ {
int flags = 0; int flags = 0;
debug_decl(log_auth_failure, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(log_auth_failure, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
/* Handle auditing first. */ /* Handle auditing first. */
audit_failure(NewArgc, NewArgv, N_("authentication failure")); audit_failure(NewArgc, NewArgv, N_("authentication failure"));
@@ -390,7 +390,7 @@ log_allowed(int status)
char *logline; char *logline;
int oldlocale; int oldlocale;
bool uid_changed; bool uid_changed;
debug_decl(log_allowed, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(log_allowed, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
/* Log and mail messages should be in the sudoers locale. */ /* Log and mail messages should be in the sudoers locale. */
sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale); sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);
@@ -431,7 +431,7 @@ vlog_warning(int flags, const char *fmt, va_list ap)
char *logline, *message; char *logline, *message;
bool uid_changed; bool uid_changed;
va_list ap2; va_list ap2;
debug_decl(vlog_error, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(vlog_error, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
/* Need extra copy of ap for sudo_vwarn()/sudo_vwarnx() below. */ /* Need extra copy of ap for sudo_vwarn()/sudo_vwarnx() below. */
if (!ISSET(flags, SLOG_NO_STDERR)) if (!ISSET(flags, SLOG_NO_STDERR))
@@ -517,7 +517,7 @@ void
log_warning(int flags, const char *fmt, ...) log_warning(int flags, const char *fmt, ...)
{ {
va_list ap; va_list ap;
debug_decl(log_error, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(log_error, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
/* Log the error. */ /* Log the error. */
va_start(ap, fmt); va_start(ap, fmt);
@@ -531,7 +531,7 @@ void
log_warningx(int flags, const char *fmt, ...) log_warningx(int flags, const char *fmt, ...)
{ {
va_list ap; va_list ap;
debug_decl(log_error, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(log_error, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
/* Log the error. */ /* Log the error. */
va_start(ap, fmt); va_start(ap, fmt);
@@ -567,7 +567,7 @@ send_mail(const char *fmt, ...)
NULL NULL
}; };
#endif /* NO_ROOT_MAILER */ #endif /* NO_ROOT_MAILER */
debug_decl(send_mail, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(send_mail, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
/* If mailer is disabled just return. */ /* If mailer is disabled just return. */
if (!def_mailerpath || !def_mailto) if (!def_mailerpath || !def_mailto)
@@ -754,7 +754,7 @@ send_mail(const char *fmt, ...)
static int static int
should_mail(int status) should_mail(int status)
{ {
debug_decl(should_mail, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(should_mail, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
debug_return_bool(def_mail_always || ISSET(status, VALIDATE_ERROR) || debug_return_bool(def_mail_always || ISSET(status, VALIDATE_ERROR) ||
(def_mail_no_user && ISSET(status, FLAG_NO_USER)) || (def_mail_no_user && ISSET(status, FLAG_NO_USER)) ||
@@ -790,7 +790,7 @@ new_logline(const char *message, int serrno)
#endif #endif
const char *tsid = NULL; const char *tsid = NULL;
size_t len = 0; size_t len = 0;
debug_decl(new_logline, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(new_logline, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
#ifndef SUDOERS_NO_SEQ #ifndef SUDOERS_NO_SEQ
/* A TSID may be a sudoers-style session ID or a free-form string. */ /* A TSID may be a sudoers-style session ID or a free-form string. */

View File

@@ -41,7 +41,7 @@ writeln_wrap(FILE *fp, char *line, size_t len, size_t maxlen)
char *indent = ""; char *indent = "";
char *beg = line; char *beg = line;
char *end; char *end;
debug_decl(writeln_wrap, SUDO_DEBUG_LOGGING, sudoers_debug_instance) debug_decl(writeln_wrap, SUDOERS_DEBUG_LOGGING, sudoers_debug_instance)
/* /*
* Print out line with word wrap around maxlen characters. * Print out line with word wrap around maxlen characters.

View File

@@ -119,7 +119,7 @@ userlist_matches(const struct passwd *pw, const struct member_list *list)
struct member *m; struct member *m;
struct alias *a; struct alias *a;
int rval, matched = UNSPEC; int rval, matched = UNSPEC;
debug_decl(userlist_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(userlist_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
TAILQ_FOREACH_REVERSE(m, list, member_list, entries) { TAILQ_FOREACH_REVERSE(m, list, member_list, entries) {
switch (m->type) { switch (m->type) {
@@ -169,7 +169,7 @@ runaslist_matches(const struct member_list *user_list,
int rval; int rval;
int user_matched = UNSPEC; int user_matched = UNSPEC;
int group_matched = UNSPEC; int group_matched = UNSPEC;
debug_decl(runaslist_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(runaslist_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
if (runas_pw != NULL) { if (runas_pw != NULL) {
/* If no runas user or runas group listed in sudoers, use default. */ /* If no runas user or runas group listed in sudoers, use default. */
@@ -275,7 +275,7 @@ hostlist_matches(const struct member_list *list)
struct member *m; struct member *m;
struct alias *a; struct alias *a;
int rval, matched = UNSPEC; int rval, matched = UNSPEC;
debug_decl(hostlist_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(hostlist_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
TAILQ_FOREACH_REVERSE(m, list, member_list, entries) { TAILQ_FOREACH_REVERSE(m, list, member_list, entries) {
switch (m->type) { switch (m->type) {
@@ -319,7 +319,7 @@ cmndlist_matches(const struct member_list *list)
{ {
struct member *m; struct member *m;
int matched = UNSPEC; int matched = UNSPEC;
debug_decl(cmndlist_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(cmndlist_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
TAILQ_FOREACH_REVERSE(m, list, member_list, entries) { TAILQ_FOREACH_REVERSE(m, list, member_list, entries) {
matched = cmnd_matches(m); matched = cmnd_matches(m);
@@ -339,7 +339,7 @@ cmnd_matches(const struct member *m)
struct alias *a; struct alias *a;
struct sudo_command *c; struct sudo_command *c;
int rval, matched = UNSPEC; int rval, matched = UNSPEC;
debug_decl(cmnd_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(cmnd_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
switch (m->type) { switch (m->type) {
case ALL: case ALL:
@@ -366,7 +366,7 @@ static bool
command_args_match(const char *sudoers_cmnd, const char *sudoers_args) command_args_match(const char *sudoers_cmnd, const char *sudoers_args)
{ {
int flags = 0; int flags = 0;
debug_decl(command_args_match, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(command_args_match, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
/* /*
* If no args specified in sudoers, any user args are allowed. * If no args specified in sudoers, any user args are allowed.
@@ -397,7 +397,7 @@ bool
command_matches(const char *sudoers_cmnd, const char *sudoers_args, const struct sudo_digest *digest) command_matches(const char *sudoers_cmnd, const char *sudoers_args, const struct sudo_digest *digest)
{ {
bool rc = false; bool rc = false;
debug_decl(command_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(command_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
/* Check for pseudo-commands */ /* Check for pseudo-commands */
if (sudoers_cmnd[0] != '/') { if (sudoers_cmnd[0] != '/') {
@@ -445,7 +445,7 @@ done:
static bool static bool
command_matches_fnmatch(const char *sudoers_cmnd, const char *sudoers_args) command_matches_fnmatch(const char *sudoers_cmnd, const char *sudoers_args)
{ {
debug_decl(command_matches_fnmatch, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(command_matches_fnmatch, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
/* /*
* Return true if fnmatch(3) succeeds AND * Return true if fnmatch(3) succeeds AND
@@ -473,7 +473,7 @@ command_matches_glob(const char *sudoers_cmnd, const char *sudoers_args)
size_t dlen; size_t dlen;
char **ap, *base, *cp; char **ap, *base, *cp;
glob_t gl; glob_t gl;
debug_decl(command_matches_glob, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(command_matches_glob, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
/* /*
* First check to see if we can avoid the call to glob(3). * First check to see if we can avoid the call to glob(3).
@@ -543,7 +543,7 @@ static bool
command_matches_normal(const char *sudoers_cmnd, const char *sudoers_args, const struct sudo_digest *digest) command_matches_normal(const char *sudoers_cmnd, const char *sudoers_args, const struct sudo_digest *digest)
{ {
size_t dlen; size_t dlen;
debug_decl(command_matches_normal, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(command_matches_normal, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
dlen = strlen(sudoers_cmnd); dlen = strlen(sudoers_cmnd);
@@ -615,7 +615,7 @@ digest_matches(const char *file, const struct sudo_digest *sd)
FILE *fp; FILE *fp;
unsigned int i; unsigned int i;
int h; int h;
debug_decl(digest_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(digest_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
for (i = 0; digest_functions[i].digest_name != NULL; i++) { for (i = 0; digest_functions[i].digest_name != NULL; i++) {
if (sd->digest_type == i) { if (sd->digest_type == i) {
@@ -678,7 +678,7 @@ command_matches_normal(const char *sudoers_cmnd, const char *sudoers_args, const
struct stat sudoers_stat; struct stat sudoers_stat;
const char *base; const char *base;
size_t dlen; size_t dlen;
debug_decl(command_matches_normal, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(command_matches_normal, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
/* If it ends in '/' it is a directory spec. */ /* If it ends in '/' it is a directory spec. */
dlen = strlen(sudoers_cmnd); dlen = strlen(sudoers_cmnd);
@@ -725,7 +725,7 @@ command_matches_normal(const char *sudoers_cmnd, const char *sudoers_args, const
static bool static bool
command_matches_dir(const char *sudoers_dir, size_t dlen) command_matches_dir(const char *sudoers_dir, size_t dlen)
{ {
debug_decl(command_matches_dir, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(command_matches_dir, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
debug_return_bool(strncmp(user_cmnd, sudoers_dir, dlen) == 0); debug_return_bool(strncmp(user_cmnd, sudoers_dir, dlen) == 0);
} }
#else /* !SUDOERS_NAME_MATCH */ #else /* !SUDOERS_NAME_MATCH */
@@ -739,7 +739,7 @@ command_matches_dir(const char *sudoers_dir, size_t dlen)
struct dirent *dent; struct dirent *dent;
char buf[PATH_MAX]; char buf[PATH_MAX];
DIR *dirp; DIR *dirp;
debug_decl(command_matches_dir, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(command_matches_dir, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
/* /*
* Grot through directory entries, looking for user_base. * Grot through directory entries, looking for user_base.
@@ -784,7 +784,7 @@ hostname_matches(const char *shost, const char *lhost, const char *pattern)
{ {
const char *host; const char *host;
bool rc; bool rc;
debug_decl(hostname_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(hostname_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
host = strchr(pattern, '.') != NULL ? lhost : shost; host = strchr(pattern, '.') != NULL ? lhost : shost;
if (has_meta(pattern)) { if (has_meta(pattern)) {
@@ -808,7 +808,7 @@ userpw_matches(const char *sudoers_user, const char *user, const struct passwd *
const char *errstr; const char *errstr;
uid_t uid; uid_t uid;
bool rc; bool rc;
debug_decl(userpw_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(userpw_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
if (pw != NULL && *sudoers_user == '#') { if (pw != NULL && *sudoers_user == '#') {
uid = (uid_t) sudo_strtoid(sudoers_user + 1, NULL, NULL, &errstr); uid = (uid_t) sudo_strtoid(sudoers_user + 1, NULL, NULL, &errstr);
@@ -835,7 +835,7 @@ group_matches(const char *sudoers_group, const struct group *gr)
const char *errstr; const char *errstr;
gid_t gid; gid_t gid;
bool rc; bool rc;
debug_decl(group_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(group_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
if (*sudoers_group == '#') { if (*sudoers_group == '#') {
gid = (gid_t) sudo_strtoid(sudoers_group + 1, NULL, NULL, &errstr); gid = (gid_t) sudo_strtoid(sudoers_group + 1, NULL, NULL, &errstr);
@@ -861,7 +861,7 @@ usergr_matches(const char *group, const char *user, const struct passwd *pw)
{ {
int matched = false; int matched = false;
struct passwd *pw0 = NULL; struct passwd *pw0 = NULL;
debug_decl(usergr_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(usergr_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
/* make sure we have a valid usergroup, sudo style */ /* make sure we have a valid usergroup, sudo style */
if (*group++ != '%') { if (*group++ != '%') {
@@ -947,7 +947,7 @@ netgr_matches(const char *netgr, const char *lhost, const char *shost, const cha
static int initialized; static int initialized;
#endif #endif
bool rc = false; bool rc = false;
debug_decl(netgr_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(netgr_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
if (!def_use_netgroups) { if (!def_use_netgroups) {
sudo_debug_printf(SUDO_DEBUG_INFO, "netgroups are disabled"); sudo_debug_printf(SUDO_DEBUG_INFO, "netgroups are disabled");

View File

@@ -58,7 +58,7 @@ addr_matches_if(const char *n)
unsigned int j; unsigned int j;
#endif #endif
unsigned int family; unsigned int family;
debug_decl(addr_matches_if, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(addr_matches_if, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
#ifdef HAVE_STRUCT_IN6_ADDR #ifdef HAVE_STRUCT_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr.ip6) == 1) { if (inet_pton(AF_INET6, n, &addr.ip6) == 1) {
@@ -111,7 +111,7 @@ addr_matches_if_netmask(const char *n, const char *m)
#endif #endif
unsigned int family; unsigned int family;
const char *errstr; const char *errstr;
debug_decl(addr_matches_if, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(addr_matches_if, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
#ifdef HAVE_STRUCT_IN6_ADDR #ifdef HAVE_STRUCT_IN6_ADDR
if (inet_pton(AF_INET6, n, &addr.ip6) == 1) if (inet_pton(AF_INET6, n, &addr.ip6) == 1)
@@ -203,7 +203,7 @@ addr_matches(char *n)
{ {
char *m; char *m;
bool rc; bool rc;
debug_decl(addr_matches, SUDO_DEBUG_MATCH, sudoers_debug_instance) debug_decl(addr_matches, SUDOERS_DEBUG_MATCH, sudoers_debug_instance)
/* If there's an explicit netmask, use it. */ /* If there's an explicit netmask, use it. */
if ((m = strchr(n, '/'))) { if ((m = strchr(n, '/'))) {

View File

@@ -82,7 +82,7 @@ struct sudo_nss sudo_nss_file = {
int int
sudo_file_open(struct sudo_nss *nss) sudo_file_open(struct sudo_nss *nss)
{ {
debug_decl(sudo_file_open, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_open, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (def_ignore_local_sudoers) if (def_ignore_local_sudoers)
debug_return_int(-1); debug_return_int(-1);
@@ -93,7 +93,7 @@ sudo_file_open(struct sudo_nss *nss)
int int
sudo_file_close(struct sudo_nss *nss) sudo_file_close(struct sudo_nss *nss)
{ {
debug_decl(sudo_file_close, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_close, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
/* Free parser data structures and close sudoers file. */ /* Free parser data structures and close sudoers file. */
init_parser(NULL, false); init_parser(NULL, false);
@@ -111,7 +111,7 @@ sudo_file_close(struct sudo_nss *nss)
int int
sudo_file_parse(struct sudo_nss *nss) sudo_file_parse(struct sudo_nss *nss)
{ {
debug_decl(sudo_file_close, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_close, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (nss->handle == NULL) if (nss->handle == NULL)
debug_return_int(-1); debug_return_int(-1);
@@ -136,7 +136,7 @@ sudo_file_parse(struct sudo_nss *nss)
int int
sudo_file_setdefs(struct sudo_nss *nss) sudo_file_setdefs(struct sudo_nss *nss)
{ {
debug_decl(sudo_file_setdefs, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_setdefs, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (nss->handle == NULL) if (nss->handle == NULL)
debug_return_int(-1); debug_return_int(-1);
@@ -159,7 +159,7 @@ sudo_file_lookup(struct sudo_nss *nss, int validated, int pwflag)
struct privilege *priv; struct privilege *priv;
struct userspec *us; struct userspec *us;
struct member *matching_user; struct member *matching_user;
debug_decl(sudo_file_lookup, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_lookup, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (nss->handle == NULL) if (nss->handle == NULL)
debug_return_int(validated); debug_return_int(validated);
@@ -301,7 +301,7 @@ static void
sudo_file_append_cmnd(struct cmndspec *cs, struct cmndtag *tags, sudo_file_append_cmnd(struct cmndspec *cs, struct cmndtag *tags,
struct sudo_lbuf *lbuf) struct sudo_lbuf *lbuf)
{ {
debug_decl(sudo_file_append_cmnd, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_append_cmnd, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
#ifdef HAVE_PRIV_SET #ifdef HAVE_PRIV_SET
if (cs->privs) if (cs->privs)
@@ -352,7 +352,7 @@ sudo_file_display_priv_short(struct passwd *pw, struct userspec *us,
struct privilege *priv; struct privilege *priv;
struct cmndtag tags; struct cmndtag tags;
int nfound = 0; int nfound = 0;
debug_decl(sudo_file_display_priv_short, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_display_priv_short, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
/* gcc -Wuninitialized false positive */ /* gcc -Wuninitialized false positive */
tags.noexec = UNSPEC; tags.noexec = UNSPEC;
@@ -448,7 +448,7 @@ sudo_file_display_priv_long(struct passwd *pw, struct userspec *us,
struct member *m; struct member *m;
struct privilege *priv; struct privilege *priv;
int nfound = 0, olen; int nfound = 0, olen;
debug_decl(sudo_file_display_priv_long, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_display_priv_long, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
TAILQ_FOREACH(priv, &us->privileges, entries) { TAILQ_FOREACH(priv, &us->privileges, entries) {
if (hostlist_matches(&priv->hostlist) != ALLOW) if (hostlist_matches(&priv->hostlist) != ALLOW)
@@ -527,7 +527,7 @@ sudo_file_display_privs(struct sudo_nss *nss, struct passwd *pw,
{ {
struct userspec *us; struct userspec *us;
int nfound = 0; int nfound = 0;
debug_decl(sudo_file_display_priv, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_display_priv, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (nss->handle == NULL) if (nss->handle == NULL)
goto done; goto done;
@@ -555,7 +555,7 @@ sudo_file_display_defaults(struct sudo_nss *nss, struct passwd *pw,
struct defaults *d; struct defaults *d;
char *prefix; char *prefix;
int nfound = 0; int nfound = 0;
debug_decl(sudo_file_display_defaults, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_display_defaults, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (nss->handle == NULL) if (nss->handle == NULL)
goto done; goto done;
@@ -606,7 +606,7 @@ sudo_file_display_bound_defaults(struct sudo_nss *nss, struct passwd *pw,
struct sudo_lbuf *lbuf) struct sudo_lbuf *lbuf)
{ {
int nfound = 0; int nfound = 0;
debug_decl(sudo_file_display_bound_defaults, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_display_bound_defaults, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
/* XXX - should only print ones that match what the user can do. */ /* XXX - should only print ones that match what the user can do. */
nfound += display_bound_defaults(DEFAULTS_RUNAS, lbuf); nfound += display_bound_defaults(DEFAULTS_RUNAS, lbuf);
@@ -626,7 +626,7 @@ display_bound_defaults(int dtype, struct sudo_lbuf *lbuf)
struct member *m; struct member *m;
char *dsep; char *dsep;
int atype, nfound = 0; int atype, nfound = 0;
debug_decl(display_bound_defaults, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(display_bound_defaults, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
switch (dtype) { switch (dtype) {
case DEFAULTS_HOST: case DEFAULTS_HOST:
@@ -685,7 +685,7 @@ sudo_file_display_cmnd(struct sudo_nss *nss, struct passwd *pw)
struct userspec *us; struct userspec *us;
int rval = 1; int rval = 1;
int host_match, runas_match, cmnd_match; int host_match, runas_match, cmnd_match;
debug_decl(sudo_file_display_cmnd, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_file_display_cmnd, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (nss->handle == NULL) if (nss->handle == NULL)
goto done; goto done;
@@ -733,7 +733,7 @@ _print_member(struct sudo_lbuf *lbuf, char *name, int type, int negated,
struct alias *a; struct alias *a;
struct member *m; struct member *m;
struct sudo_command *c; struct sudo_command *c;
debug_decl(_print_member, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(_print_member, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
switch (type) { switch (type) {
case ALL: case ALL:

View File

@@ -93,7 +93,7 @@ sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group)
const char *plugin_path = NULL; const char *plugin_path = NULL;
struct sudo_conf_debug_file_list debug_files = TAILQ_HEAD_INITIALIZER(debug_files); struct sudo_conf_debug_file_list debug_files = TAILQ_HEAD_INITIALIZER(debug_files);
int flags = 0; int flags = 0;
debug_decl(sudoers_policy_deserialize_info, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_deserialize_info, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
#define MATCHES(s, v) (strncmp(s, v, sizeof(v) - 1) == 0) #define MATCHES(s, v) (strncmp(s, v, sizeof(v) - 1) == 0)
@@ -403,7 +403,7 @@ sudoers_policy_exec_setup(char *argv[], char *envp[], mode_t cmnd_umask,
char **command_info; char **command_info;
int info_len = 0; int info_len = 0;
int rval = -1; int rval = -1;
debug_decl(sudoers_policy_exec_setup, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_exec_setup, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
/* Increase the length of command_info as needed, it is *not* checked. */ /* Increase the length of command_info as needed, it is *not* checked. */
command_info = sudo_ecalloc(32, sizeof(char **)); command_info = sudo_ecalloc(32, sizeof(char **));
@@ -539,7 +539,7 @@ sudoers_policy_open(unsigned int version, sudo_conv_t conversation,
{ {
struct sudoers_policy_open_info info; struct sudoers_policy_open_info info;
int prev_instance, rval; int prev_instance, rval;
debug_decl(sudoers_policy_open, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_open, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
sudo_version = version; sudo_version = version;
sudo_conv = conversation; sudo_conv = conversation;
@@ -565,7 +565,7 @@ static void
sudoers_policy_close(int exit_status, int error_code) sudoers_policy_close(int exit_status, int error_code)
{ {
int prev_instance; int prev_instance;
debug_decl(sudoers_policy_close, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_close, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);
@@ -617,7 +617,7 @@ static int
sudoers_policy_init_session(struct passwd *pwd, char **user_env[]) sudoers_policy_init_session(struct passwd *pwd, char **user_env[])
{ {
int prev_instance, rval; int prev_instance, rval;
debug_decl(sudoers_policy_init_session, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_init_session, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);
@@ -636,7 +636,7 @@ sudoers_policy_check(int argc, char * const argv[], char *env_add[],
{ {
struct sudoers_exec_args exec_args; struct sudoers_exec_args exec_args;
int prev_instance, rval; int prev_instance, rval;
debug_decl(sudoers_policy_check, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_check, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);
if (!ISSET(sudo_mode, MODE_EDIT)) if (!ISSET(sudo_mode, MODE_EDIT))
@@ -661,7 +661,7 @@ static int
sudoers_policy_validate(void) sudoers_policy_validate(void)
{ {
int prev_instance, rval; int prev_instance, rval;
debug_decl(sudoers_policy_validate, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_validate, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);
user_cmnd = "validate"; user_cmnd = "validate";
@@ -676,7 +676,7 @@ static void
sudoers_policy_invalidate(int remove) sudoers_policy_invalidate(int remove)
{ {
int prev_instance; int prev_instance;
debug_decl(sudoers_policy_invalidate, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_invalidate, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);
@@ -693,7 +693,7 @@ sudoers_policy_list(int argc, char * const argv[], int verbose,
const char *list_user) const char *list_user)
{ {
int prev_instance, rval = -1; int prev_instance, rval = -1;
debug_decl(sudoers_policy_list, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_list, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);
@@ -726,7 +726,7 @@ static int
sudoers_policy_version(int verbose) sudoers_policy_version(int verbose)
{ {
int prev_instance; int prev_instance;
debug_decl(sudoers_policy_version, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_version, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);
@@ -761,7 +761,7 @@ sudoers_policy_register_hooks(int version, int (*register_hook)(struct sudo_hook
{ {
struct sudo_hook hook; struct sudo_hook hook;
int prev_instance; int prev_instance;
debug_decl(sudoers_policy_register_hooks, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_register_hooks, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance); prev_instance = sudo_debug_set_default_instance(sudoers_debug_instance);

View File

@@ -53,7 +53,7 @@ expand_prompt(const char *old_prompt, const char *auth_user)
int subst; int subst;
const char *p; const char *p;
char *np, *new_prompt, *endp; char *np, *new_prompt, *endp;
debug_decl(expand_prompt, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(expand_prompt, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* How much space do we need to malloc for the prompt? */ /* How much space do we need to malloc for the prompt? */
subst = 0; subst = 0;

View File

@@ -91,7 +91,7 @@ cmp_pwnam(const void *v1, const void *v2)
void void
sudo_pw_addref(struct passwd *pw) sudo_pw_addref(struct passwd *pw)
{ {
debug_decl(sudo_pw_addref, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_pw_addref, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
ptr_to_item(pw)->refcnt++; ptr_to_item(pw)->refcnt++;
debug_return; debug_return;
} }
@@ -100,7 +100,7 @@ static void
sudo_pw_delref_item(void *v) sudo_pw_delref_item(void *v)
{ {
struct cache_item *item = v; struct cache_item *item = v;
debug_decl(sudo_pw_delref_item, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_pw_delref_item, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (--item->refcnt == 0) if (--item->refcnt == 0)
sudo_efree(item); sudo_efree(item);
@@ -111,7 +111,7 @@ sudo_pw_delref_item(void *v)
void void
sudo_pw_delref(struct passwd *pw) sudo_pw_delref(struct passwd *pw)
{ {
debug_decl(sudo_pw_delref, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_pw_delref, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
sudo_pw_delref_item(ptr_to_item(pw)); sudo_pw_delref_item(ptr_to_item(pw));
debug_return; debug_return;
} }
@@ -124,7 +124,7 @@ sudo_getpwuid(uid_t uid)
{ {
struct cache_item key, *item; struct cache_item key, *item;
struct rbnode *node; struct rbnode *node;
debug_decl(sudo_getpwuid, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_getpwuid, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
key.k.uid = uid; key.k.uid = uid;
if ((node = rbfind(pwcache_byuid, &key)) != NULL) { if ((node = rbfind(pwcache_byuid, &key)) != NULL) {
@@ -167,7 +167,7 @@ sudo_getpwnam(const char *name)
struct cache_item key, *item; struct cache_item key, *item;
struct rbnode *node; struct rbnode *node;
size_t len; size_t len;
debug_decl(sudo_getpwnam, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_getpwnam, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
key.k.name = (char *) name; key.k.name = (char *) name;
if ((node = rbfind(pwcache_byname, &key)) != NULL) { if ((node = rbfind(pwcache_byname, &key)) != NULL) {
@@ -215,7 +215,7 @@ sudo_mkpwent(const char *user, uid_t uid, gid_t gid, const char *home,
struct rbnode *node; struct rbnode *node;
size_t len, name_len, home_len, shell_len; size_t len, name_len, home_len, shell_len;
int i; int i;
debug_decl(sudo_mkpwent, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_mkpwent, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
/* Optional arguments. */ /* Optional arguments. */
if (home == NULL) if (home == NULL)
@@ -278,7 +278,7 @@ sudo_fakepwnam(const char *user, gid_t gid)
{ {
const char *errstr; const char *errstr;
uid_t uid; uid_t uid;
debug_decl(sudo_fakepwnam, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_fakepwnam, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
uid = (uid_t) sudo_strtoid(user + 1, NULL, NULL, &errstr); uid = (uid_t) sudo_strtoid(user + 1, NULL, NULL, &errstr);
if (errstr != NULL) { if (errstr != NULL) {
@@ -292,7 +292,7 @@ sudo_fakepwnam(const char *user, gid_t gid)
void void
sudo_setpwent(void) sudo_setpwent(void)
{ {
debug_decl(sudo_setpwent, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_setpwent, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
setpwent(); setpwent();
if (pwcache_byuid == NULL) if (pwcache_byuid == NULL)
@@ -306,7 +306,7 @@ sudo_setpwent(void)
void void
sudo_freepwcache(void) sudo_freepwcache(void)
{ {
debug_decl(sudo_freepwcache, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_freepwcache, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (pwcache_byuid != NULL) { if (pwcache_byuid != NULL) {
rbdestroy(pwcache_byuid, sudo_pw_delref_item); rbdestroy(pwcache_byuid, sudo_pw_delref_item);
@@ -323,7 +323,7 @@ sudo_freepwcache(void)
void void
sudo_endpwent(void) sudo_endpwent(void)
{ {
debug_decl(sudo_endpwent, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_endpwent, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
endpwent(); endpwent();
sudo_freepwcache(); sudo_freepwcache();
@@ -345,7 +345,7 @@ cmp_grgid(const void *v1, const void *v2)
void void
sudo_gr_addref(struct group *gr) sudo_gr_addref(struct group *gr)
{ {
debug_decl(sudo_gr_addref, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_gr_addref, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
ptr_to_item(gr)->refcnt++; ptr_to_item(gr)->refcnt++;
debug_return; debug_return;
} }
@@ -354,7 +354,7 @@ static void
sudo_gr_delref_item(void *v) sudo_gr_delref_item(void *v)
{ {
struct cache_item *item = v; struct cache_item *item = v;
debug_decl(sudo_gr_delref_item, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_gr_delref_item, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (--item->refcnt == 0) if (--item->refcnt == 0)
sudo_efree(item); sudo_efree(item);
@@ -365,7 +365,7 @@ sudo_gr_delref_item(void *v)
void void
sudo_gr_delref(struct group *gr) sudo_gr_delref(struct group *gr)
{ {
debug_decl(sudo_gr_delref, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_gr_delref, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
sudo_gr_delref_item(ptr_to_item(gr)); sudo_gr_delref_item(ptr_to_item(gr));
debug_return; debug_return;
} }
@@ -378,7 +378,7 @@ sudo_getgrgid(gid_t gid)
{ {
struct cache_item key, *item; struct cache_item key, *item;
struct rbnode *node; struct rbnode *node;
debug_decl(sudo_getgrgid, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_getgrgid, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
key.k.gid = gid; key.k.gid = gid;
if ((node = rbfind(grcache_bygid, &key)) != NULL) { if ((node = rbfind(grcache_bygid, &key)) != NULL) {
@@ -415,7 +415,7 @@ sudo_getgrnam(const char *name)
struct cache_item key, *item; struct cache_item key, *item;
struct rbnode *node; struct rbnode *node;
size_t len; size_t len;
debug_decl(sudo_getgrnam, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_getgrnam, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
key.k.name = (char *) name; key.k.name = (char *) name;
if ((node = rbfind(grcache_byname, &key)) != NULL) { if ((node = rbfind(grcache_byname, &key)) != NULL) {
@@ -456,7 +456,7 @@ sudo_fakegrnam(const char *group)
struct rbnode *node; struct rbnode *node;
size_t len, name_len; size_t len, name_len;
int i; int i;
debug_decl(sudo_fakegrnam, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_fakegrnam, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
name_len = strlen(group); name_len = strlen(group);
len = sizeof(*gritem) + name_len + 1; len = sizeof(*gritem) + name_len + 1;
@@ -501,7 +501,7 @@ sudo_fakegrnam(const char *group)
void void
sudo_grlist_addref(struct group_list *grlist) sudo_grlist_addref(struct group_list *grlist)
{ {
debug_decl(sudo_gr_addref, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_gr_addref, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
ptr_to_item(grlist)->refcnt++; ptr_to_item(grlist)->refcnt++;
debug_return; debug_return;
} }
@@ -510,7 +510,7 @@ static void
sudo_grlist_delref_item(void *v) sudo_grlist_delref_item(void *v)
{ {
struct cache_item *item = v; struct cache_item *item = v;
debug_decl(sudo_gr_delref_item, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_gr_delref_item, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (--item->refcnt == 0) if (--item->refcnt == 0)
sudo_efree(item); sudo_efree(item);
@@ -521,7 +521,7 @@ sudo_grlist_delref_item(void *v)
void void
sudo_grlist_delref(struct group_list *grlist) sudo_grlist_delref(struct group_list *grlist)
{ {
debug_decl(sudo_gr_delref, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_gr_delref, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
sudo_grlist_delref_item(ptr_to_item(grlist)); sudo_grlist_delref_item(ptr_to_item(grlist));
debug_return; debug_return;
} }
@@ -529,7 +529,7 @@ sudo_grlist_delref(struct group_list *grlist)
void void
sudo_setgrent(void) sudo_setgrent(void)
{ {
debug_decl(sudo_setgrent, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_setgrent, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
setgrent(); setgrent();
if (grcache_bygid == NULL) if (grcache_bygid == NULL)
@@ -545,7 +545,7 @@ sudo_setgrent(void)
void void
sudo_freegrcache(void) sudo_freegrcache(void)
{ {
debug_decl(sudo_freegrcache, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_freegrcache, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (grcache_bygid != NULL) { if (grcache_bygid != NULL) {
rbdestroy(grcache_bygid, sudo_gr_delref_item); rbdestroy(grcache_bygid, sudo_gr_delref_item);
@@ -566,7 +566,7 @@ sudo_freegrcache(void)
void void
sudo_endgrent(void) sudo_endgrent(void)
{ {
debug_decl(sudo_endgrent, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_endgrent, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
endgrent(); endgrent();
sudo_freegrcache(); sudo_freegrcache();
@@ -580,7 +580,7 @@ sudo_get_grlist(const struct passwd *pw)
struct cache_item key, *item; struct cache_item key, *item;
struct rbnode *node; struct rbnode *node;
size_t len; size_t len;
debug_decl(sudo_get_grlist, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_get_grlist, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
key.k.name = pw->pw_name; key.k.name = pw->pw_name;
if ((node = rbfind(grlist_cache, &key)) != NULL) { if ((node = rbfind(grlist_cache, &key)) != NULL) {
@@ -616,7 +616,7 @@ sudo_set_grlist(struct passwd *pw, char * const *groups, char * const *gids)
{ {
struct cache_item key, *item; struct cache_item key, *item;
struct rbnode *node; struct rbnode *node;
debug_decl(sudo_set_grlist, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_set_grlist, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
/* /*
* Cache group db entry if it doesn't already exist * Cache group db entry if it doesn't already exist
@@ -644,7 +644,7 @@ user_in_group(const struct passwd *pw, const char *group)
const char *errstr; const char *errstr;
int i; int i;
bool matched = false; bool matched = false;
debug_decl(user_in_group, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(user_in_group, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if ((grlist = sudo_get_grlist(pw)) != NULL) { if ((grlist = sudo_get_grlist(pw)) != NULL) {
/* /*

View File

@@ -88,7 +88,7 @@ sudo_make_pwitem(uid_t uid, const char *name)
size_t nsize, psize, csize, gsize, dsize, ssize, total; size_t nsize, psize, csize, gsize, dsize, ssize, total;
struct cache_item_pw *pwitem; struct cache_item_pw *pwitem;
struct passwd *pw, *newpw; struct passwd *pw, *newpw;
debug_decl(sudo_make_pwitem, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_make_pwitem, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
/* Look up by name or uid. */ /* Look up by name or uid. */
pw = name ? getpwnam(name) : getpwuid(uid); pw = name ? getpwnam(name) : getpwuid(uid);
@@ -162,7 +162,7 @@ sudo_make_gritem(gid_t gid, const char *name)
size_t nsize, psize, nmem, total, len; size_t nsize, psize, nmem, total, len;
struct cache_item_gr *gritem; struct cache_item_gr *gritem;
struct group *gr, *newgr; struct group *gr, *newgr;
debug_decl(sudo_make_gritem, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_make_gritem, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
/* Look up by name or gid. */ /* Look up by name or gid. */
gr = name ? getgrnam(name) : getgrgid(gid); gr = name ? getgrnam(name) : getgrgid(gid);
@@ -235,7 +235,7 @@ sudo_make_grlist_item(const struct passwd *pw, char * const *unused1,
GETGROUPS_T *gids; GETGROUPS_T *gids;
struct group *grp; struct group *grp;
int i, ngids, groupname_len; int i, ngids, groupname_len;
debug_decl(sudo_make_grlist_item, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_make_grlist_item, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if (pw == sudo_user.pw && sudo_user.gids != NULL) { if (pw == sudo_user.pw && sudo_user.gids != NULL) {
gids = user_gids; gids = user_gids;

View File

@@ -88,7 +88,7 @@ struct rbtree *
rbcreate(int (*compar)(const void *, const void*)) rbcreate(int (*compar)(const void *, const void*))
{ {
struct rbtree *tree; struct rbtree *tree;
debug_decl(rbcreate, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rbcreate, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
tree = (struct rbtree *) sudo_emalloc(sizeof(*tree)); tree = (struct rbtree *) sudo_emalloc(sizeof(*tree));
tree->compar = compar; tree->compar = compar;
@@ -119,7 +119,7 @@ static void
rotate_left(struct rbtree *tree, struct rbnode *node) rotate_left(struct rbtree *tree, struct rbnode *node)
{ {
struct rbnode *child; struct rbnode *child;
debug_decl(rotate_left, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rotate_left, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
child = node->right; child = node->right;
node->right = child->left; node->right = child->left;
@@ -145,7 +145,7 @@ static void
rotate_right(struct rbtree *tree, struct rbnode *node) rotate_right(struct rbtree *tree, struct rbnode *node)
{ {
struct rbnode *child; struct rbnode *child;
debug_decl(rotate_right, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rotate_right, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
child = node->left; child = node->left;
node->left = child->right; node->left = child->right;
@@ -175,7 +175,7 @@ rbinsert(struct rbtree *tree, void *data)
struct rbnode *node = rbfirst(tree); struct rbnode *node = rbfirst(tree);
struct rbnode *parent = rbroot(tree); struct rbnode *parent = rbroot(tree);
int res; int res;
debug_decl(rbinsert, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rbinsert, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
/* Find correct insertion point. */ /* Find correct insertion point. */
while (node != rbnil(tree)) { while (node != rbnil(tree)) {
@@ -267,7 +267,7 @@ rbfind(struct rbtree *tree, void *key)
{ {
struct rbnode *node = rbfirst(tree); struct rbnode *node = rbfirst(tree);
int res; int res;
debug_decl(rbfind, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rbfind, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
while (node != rbnil(tree)) { while (node != rbnil(tree)) {
if ((res = tree->compar(key, node->data)) == 0) if ((res = tree->compar(key, node->data)) == 0)
@@ -287,7 +287,7 @@ rbapply_node(struct rbtree *tree, struct rbnode *node,
int (*func)(void *, void *), void *cookie, enum rbtraversal order) int (*func)(void *, void *), void *cookie, enum rbtraversal order)
{ {
int error; int error;
debug_decl(rbapply_node, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rbapply_node, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
if (node != rbnil(tree)) { if (node != rbnil(tree)) {
if (order == preorder) if (order == preorder)
@@ -314,7 +314,7 @@ static struct rbnode *
rbsuccessor(struct rbtree *tree, struct rbnode *node) rbsuccessor(struct rbtree *tree, struct rbnode *node)
{ {
struct rbnode *succ; struct rbnode *succ;
debug_decl(rbsuccessor, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rbsuccessor, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
if ((succ = node->right) != rbnil(tree)) { if ((succ = node->right) != rbnil(tree)) {
while (succ->left != rbnil(tree)) while (succ->left != rbnil(tree))
@@ -335,7 +335,7 @@ rbsuccessor(struct rbtree *tree, struct rbnode *node)
static void static void
_rbdestroy(struct rbtree *tree, struct rbnode *node, void (*destroy)(void *)) _rbdestroy(struct rbtree *tree, struct rbnode *node, void (*destroy)(void *))
{ {
debug_decl(_rbdestroy, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(_rbdestroy, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
if (node != rbnil(tree)) { if (node != rbnil(tree)) {
_rbdestroy(tree, node->left, destroy); _rbdestroy(tree, node->left, destroy);
_rbdestroy(tree, node->right, destroy); _rbdestroy(tree, node->right, destroy);
@@ -353,7 +353,7 @@ _rbdestroy(struct rbtree *tree, struct rbnode *node, void (*destroy)(void *))
void void
rbdestroy(struct rbtree *tree, void (*destroy)(void *)) rbdestroy(struct rbtree *tree, void (*destroy)(void *))
{ {
debug_decl(rbdestroy, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rbdestroy, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
_rbdestroy(tree, rbfirst(tree), destroy); _rbdestroy(tree, rbfirst(tree), destroy);
sudo_efree(tree); sudo_efree(tree);
debug_return; debug_return;
@@ -366,7 +366,7 @@ void *rbdelete(struct rbtree *tree, struct rbnode *z)
{ {
struct rbnode *x, *y; struct rbnode *x, *y;
void *data = z->data; void *data = z->data;
debug_decl(rbdelete, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rbdelete, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
if (z->left == rbnil(tree) || z->right == rbnil(tree)) if (z->left == rbnil(tree) || z->right == rbnil(tree))
y = z; y = z;
@@ -408,7 +408,7 @@ static void
rbrepair(struct rbtree *tree, struct rbnode *node) rbrepair(struct rbtree *tree, struct rbnode *node)
{ {
struct rbnode *sibling; struct rbnode *sibling;
debug_decl(rbrepair, SUDO_DEBUG_RBTREE, sudoers_debug_instance) debug_decl(rbrepair, SUDOERS_DEBUG_RBTREE, sudoers_debug_instance)
while (node->color == black && node != rbfirst(tree)) { while (node->color == black && node != rbfirst(tree)) {
if (node == node->parent->left) { if (node == node->parent->left) {

View File

@@ -86,7 +86,7 @@ static int perm_stack_depth = 0;
bool bool
rewind_perms(void) rewind_perms(void)
{ {
debug_decl(rewind_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(rewind_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth != 0) { if (perm_stack_depth != 0) {
while (perm_stack_depth > 1) { while (perm_stack_depth > 1) {
@@ -116,7 +116,7 @@ set_perms(int perm)
struct perm_state *state, *ostate = NULL; struct perm_state *state, *ostate = NULL;
char errbuf[1024]; char errbuf[1024];
const char *errstr = errbuf; const char *errstr = errbuf;
debug_decl(set_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(set_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth == PERM_STACK_MAX) { if (perm_stack_depth == PERM_STACK_MAX) {
errstr = N_("perm stack overflow"); errstr = N_("perm stack overflow");
@@ -372,7 +372,7 @@ bool
restore_perms(void) restore_perms(void)
{ {
struct perm_state *state, *ostate; struct perm_state *state, *ostate;
debug_decl(restore_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(restore_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth < 2) { if (perm_stack_depth < 2) {
sudo_warnx(U_("perm stack underflow")); sudo_warnx(U_("perm stack underflow"));
@@ -441,7 +441,7 @@ set_perms(int perm)
struct perm_state *state, *ostate = NULL; struct perm_state *state, *ostate = NULL;
char errbuf[1024]; char errbuf[1024];
const char *errstr = errbuf; const char *errstr = errbuf;
debug_decl(set_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(set_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth == PERM_STACK_MAX) { if (perm_stack_depth == PERM_STACK_MAX) {
errstr = N_("perm stack overflow"); errstr = N_("perm stack overflow");
@@ -711,7 +711,7 @@ bool
restore_perms(void) restore_perms(void)
{ {
struct perm_state *state, *ostate; struct perm_state *state, *ostate;
debug_decl(restore_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(restore_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth < 2) { if (perm_stack_depth < 2) {
sudo_warnx(U_("perm stack underflow")); sudo_warnx(U_("perm stack underflow"));
@@ -844,7 +844,7 @@ set_perms(int perm)
struct perm_state *state, *ostate = NULL; struct perm_state *state, *ostate = NULL;
char errbuf[1024]; char errbuf[1024];
const char *errstr = errbuf; const char *errstr = errbuf;
debug_decl(set_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(set_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth == PERM_STACK_MAX) { if (perm_stack_depth == PERM_STACK_MAX) {
errstr = N_("perm stack overflow"); errstr = N_("perm stack overflow");
@@ -1070,7 +1070,7 @@ bool
restore_perms(void) restore_perms(void)
{ {
struct perm_state *state, *ostate; struct perm_state *state, *ostate;
debug_decl(restore_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(restore_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth < 2) { if (perm_stack_depth < 2) {
sudo_warnx(U_("perm stack underflow")); sudo_warnx(U_("perm stack underflow"));
@@ -1141,7 +1141,7 @@ set_perms(int perm)
struct perm_state *state, *ostate = NULL; struct perm_state *state, *ostate = NULL;
char errbuf[1024]; char errbuf[1024];
const char *errstr = errbuf; const char *errstr = errbuf;
debug_decl(set_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(set_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth == PERM_STACK_MAX) { if (perm_stack_depth == PERM_STACK_MAX) {
errstr = N_("perm stack overflow"); errstr = N_("perm stack overflow");
@@ -1366,7 +1366,7 @@ bool
restore_perms(void) restore_perms(void)
{ {
struct perm_state *state, *ostate; struct perm_state *state, *ostate;
debug_decl(restore_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(restore_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth < 2) { if (perm_stack_depth < 2) {
sudo_warnx(U_("perm stack underflow")); sudo_warnx(U_("perm stack underflow"));
@@ -1433,7 +1433,7 @@ set_perms(int perm)
struct perm_state *state, *ostate = NULL; struct perm_state *state, *ostate = NULL;
char errbuf[1024]; char errbuf[1024];
const char *errstr = errbuf; const char *errstr = errbuf;
debug_decl(set_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(set_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth == PERM_STACK_MAX) { if (perm_stack_depth == PERM_STACK_MAX) {
errstr = N_("perm stack overflow"); errstr = N_("perm stack overflow");
@@ -1530,7 +1530,7 @@ boll
restore_perms(void) restore_perms(void)
{ {
struct perm_state *state, *ostate; struct perm_state *state, *ostate;
debug_decl(restore_perms, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(restore_perms, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (perm_stack_depth < 2) { if (perm_stack_depth < 2) {
sudo_warnx(U_("perm stack underflow")); sudo_warnx(U_("perm stack underflow"));
@@ -1574,7 +1574,7 @@ runas_setgroups(void)
{ {
struct passwd *pw; struct passwd *pw;
struct group_list *grlist; struct group_list *grlist;
debug_decl(runas_setgroups, SUDO_DEBUG_PERMS, sudoers_debug_instance) debug_decl(runas_setgroups, SUDOERS_DEBUG_PERMS, sudoers_debug_instance)
if (def_preserve_groups) { if (def_preserve_groups) {
sudo_grlist_addref(user_group_list); sudo_grlist_addref(user_group_list);

View File

@@ -124,7 +124,7 @@ static void
sudo_sss_attrcpy(struct sss_sudo_attr *dst, const struct sss_sudo_attr *src) sudo_sss_attrcpy(struct sss_sudo_attr *dst, const struct sss_sudo_attr *src)
{ {
unsigned int i; unsigned int i;
debug_decl(sudo_sss_attrcpy, SUDO_DEBUG_SSSD, sudoers_debug_instance) debug_decl(sudo_sss_attrcpy, SUDOERS_DEBUG_SSSD, sudoers_debug_instance)
sudo_debug_printf(SUDO_DEBUG_DEBUG, "dst=%p, src=%p", dst, src); sudo_debug_printf(SUDO_DEBUG_DEBUG, "dst=%p, src=%p", dst, src);
sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_emalloc: cnt=%d", src->num_values); sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_emalloc: cnt=%d", src->num_values);
@@ -143,7 +143,7 @@ static void
sudo_sss_rulecpy(struct sss_sudo_rule *dst, const struct sss_sudo_rule *src) sudo_sss_rulecpy(struct sss_sudo_rule *dst, const struct sss_sudo_rule *src)
{ {
unsigned int i; unsigned int i;
debug_decl(sudo_sss_rulecpy, SUDO_DEBUG_SSSD, sudoers_debug_instance) debug_decl(sudo_sss_rulecpy, SUDOERS_DEBUG_SSSD, sudoers_debug_instance)
sudo_debug_printf(SUDO_DEBUG_DEBUG, "dst=%p, src=%p", dst, src); sudo_debug_printf(SUDO_DEBUG_DEBUG, "dst=%p, src=%p", dst, src);
sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_emalloc: cnt=%d", src->num_attrs); sudo_debug_printf(SUDO_DEBUG_INFO, "sudo_emalloc: cnt=%d", src->num_attrs);
@@ -172,7 +172,7 @@ sudo_sss_filter_result(struct sudo_sss_handle *handle,
struct sss_sudo_result *out_res; struct sss_sudo_result *out_res;
unsigned int i, l; unsigned int i, l;
int r; int r;
debug_decl(sudo_sss_filter_result, SUDO_DEBUG_SSSD, sudoers_debug_instance) debug_decl(sudo_sss_filter_result, SUDOERS_DEBUG_SSSD, sudoers_debug_instance)
sudo_debug_printf(SUDO_DEBUG_DEBUG, "in_res=%p, count=%u, act=%s", sudo_debug_printf(SUDO_DEBUG_DEBUG, "in_res=%p, count=%u, act=%s",
in_res, in_res ? in_res->num_rules : 0, in_res, in_res ? in_res->num_rules : 0,
@@ -240,7 +240,7 @@ static int sudo_sss_open(struct sudo_nss *nss)
{ {
struct sudo_sss_handle *handle; struct sudo_sss_handle *handle;
static const char path[] = _PATH_SSSD_LIB"/libsss_sudo.so"; static const char path[] = _PATH_SSSD_LIB"/libsss_sudo.so";
debug_decl(sudo_sss_open, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_open, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
/* Create a handle container. */ /* Create a handle container. */
handle = sudo_emalloc(sizeof(struct sudo_sss_handle)); handle = sudo_emalloc(sizeof(struct sudo_sss_handle));
@@ -306,7 +306,7 @@ static int sudo_sss_open(struct sudo_nss *nss)
static int sudo_sss_close(struct sudo_nss *nss) static int sudo_sss_close(struct sudo_nss *nss)
{ {
struct sudo_sss_handle *handle; struct sudo_sss_handle *handle;
debug_decl(sudo_sss_close, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_close, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (nss && nss->handle) { if (nss && nss->handle) {
handle = nss->handle; handle = nss->handle;
@@ -319,7 +319,7 @@ static int sudo_sss_close(struct sudo_nss *nss)
// ok // ok
static int sudo_sss_parse(struct sudo_nss *nss) static int sudo_sss_parse(struct sudo_nss *nss)
{ {
debug_decl(sudo_sss_parse, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_parse, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
debug_return_int(0); debug_return_int(0);
} }
@@ -331,7 +331,7 @@ static int sudo_sss_setdefs(struct sudo_nss *nss)
struct sss_sudo_rule *sss_rule; struct sss_sudo_rule *sss_rule;
uint32_t sss_error; uint32_t sss_error;
unsigned int i; unsigned int i;
debug_decl(sudo_sss_setdefs, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_setdefs, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (handle == NULL) if (handle == NULL)
debug_return_int(-1); debug_return_int(-1);
@@ -368,7 +368,7 @@ static int sudo_sss_setdefs(struct sudo_nss *nss)
static int sudo_sss_checkpw(struct sudo_nss *nss, struct passwd *pw) static int sudo_sss_checkpw(struct sudo_nss *nss, struct passwd *pw)
{ {
struct sudo_sss_handle *handle = nss->handle; struct sudo_sss_handle *handle = nss->handle;
debug_decl(sudo_sss_checkpw, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_checkpw, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (pw->pw_name != handle->pw->pw_name || if (pw->pw_name != handle->pw->pw_name ||
pw->pw_uid != handle->pw->pw_uid) { pw->pw_uid != handle->pw->pw_uid) {
@@ -389,7 +389,7 @@ sudo_sss_check_runas_user(struct sudo_sss_handle *handle, struct sss_sudo_rule *
char **val_array = NULL; char **val_array = NULL;
char *val; char *val;
int ret = false, i; int ret = false, i;
debug_decl(sudo_sss_check_runas_user, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_check_runas_user, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (!runas_pw) if (!runas_pw)
debug_return_int(UNSPEC); debug_return_int(UNSPEC);
@@ -492,7 +492,7 @@ sudo_sss_check_runas_group(struct sudo_sss_handle *handle, struct sss_sudo_rule
char **val_array = NULL; char **val_array = NULL;
char *val; char *val;
int ret = false, i; int ret = false, i;
debug_decl(sudo_sss_check_runas_group, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_check_runas_group, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
/* runas_gr is only set if the user specified the -g flag */ /* runas_gr is only set if the user specified the -g flag */
if (!runas_gr) if (!runas_gr)
@@ -536,7 +536,7 @@ static bool
sudo_sss_check_runas(struct sudo_sss_handle *handle, struct sss_sudo_rule *rule) sudo_sss_check_runas(struct sudo_sss_handle *handle, struct sss_sudo_rule *rule)
{ {
bool ret; bool ret;
debug_decl(sudo_sss_check_runas, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_check_runas, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (rule == NULL) if (rule == NULL)
debug_return_bool(false); debug_return_bool(false);
@@ -553,7 +553,7 @@ sudo_sss_check_host(struct sudo_sss_handle *handle, struct sss_sudo_rule *rule)
char **val_array, *val; char **val_array, *val;
bool ret = false; bool ret = false;
int i; int i;
debug_decl(sudo_sss_check_host, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_check_host, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (rule == NULL) if (rule == NULL)
debug_return_bool(ret); debug_return_bool(ret);
@@ -605,7 +605,7 @@ sudo_sss_filter_user_netgroup(struct sudo_sss_handle *handle, struct sss_sudo_ru
bool ret = false, netgroup_spec_found = false; bool ret = false, netgroup_spec_found = false;
char **val_array, *val; char **val_array, *val;
int i; int i;
debug_decl(sudo_sss_filter_user_netgroup, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_filter_user_netgroup, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (!handle || !rule) if (!handle || !rule)
debug_return_bool(ret); debug_return_bool(ret);
@@ -645,7 +645,7 @@ sudo_sss_result_filterp(struct sudo_sss_handle *handle,
struct sss_sudo_rule *rule, void *unused) struct sss_sudo_rule *rule, void *unused)
{ {
(void)unused; (void)unused;
debug_decl(sudo_sss_result_filterp, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_result_filterp, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (sudo_sss_check_host(handle, rule) && if (sudo_sss_check_host(handle, rule) &&
sudo_sss_filter_user_netgroup(handle, rule)) sudo_sss_filter_user_netgroup(handle, rule))
@@ -660,7 +660,7 @@ sudo_sss_result_get(struct sudo_nss *nss, struct passwd *pw, uint32_t *state)
struct sudo_sss_handle *handle = nss->handle; struct sudo_sss_handle *handle = nss->handle;
struct sss_sudo_result *u_sss_result, *f_sss_result; struct sss_sudo_result *u_sss_result, *f_sss_result;
uint32_t sss_error = 0, ret; uint32_t sss_error = 0, ret;
debug_decl(sudo_sss_result_get, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_result_get, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (sudo_sss_checkpw(nss, pw) != 0) if (sudo_sss_checkpw(nss, pw) != 0)
debug_return_ptr(NULL); debug_return_ptr(NULL);
@@ -738,7 +738,7 @@ sudo_sss_check_bool(struct sudo_sss_handle *handle, struct sss_sudo_rule *rule,
{ {
char ch, *var, **val_array = NULL; char ch, *var, **val_array = NULL;
int i, ret = UNSPEC; int i, ret = UNSPEC;
debug_decl(sudo_sss_check_bool, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_check_bool, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (rule == NULL) if (rule == NULL)
debug_return_int(ret); debug_return_int(ret);
@@ -780,7 +780,7 @@ sudo_sss_extract_digest(char **cmnd, struct sudo_digest *digest)
{ {
char *ep, *cp = *cmnd; char *ep, *cp = *cmnd;
int digest_type = SUDO_DIGEST_INVALID; int digest_type = SUDO_DIGEST_INVALID;
debug_decl(sudo_sss_check_command, SUDO_DEBUG_LDAP, sudoers_debug_instance) debug_decl(sudo_sss_check_command, SUDOERS_DEBUG_LDAP, sudoers_debug_instance)
/* /*
* Check for and extract a digest prefix, e.g. * Check for and extract a digest prefix, e.g.
@@ -849,7 +849,7 @@ sudo_sss_check_command(struct sudo_sss_handle *handle,
bool foundbang; bool foundbang;
unsigned int i; unsigned int i;
struct sudo_digest digest, *allowed_digest = NULL; struct sudo_digest digest, *allowed_digest = NULL;
debug_decl(sudo_sss_check_command, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_check_command, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (rule == NULL) if (rule == NULL)
debug_return_int(ret); debug_return_int(ret);
@@ -924,7 +924,7 @@ sudo_sss_parse_options(struct sudo_sss_handle *handle, struct sss_sudo_rule *rul
int i; int i;
char op, *v, *val; char op, *v, *val;
char **val_array = NULL; char **val_array = NULL;
debug_decl(sudo_sss_parse_options, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_parse_options, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (rule == NULL) if (rule == NULL)
debug_return; debug_return;
@@ -982,7 +982,7 @@ sudo_sss_lookup(struct sudo_nss *nss, int ret, int pwflag)
struct sss_sudo_result *sss_result = NULL; struct sss_sudo_result *sss_result = NULL;
struct sss_sudo_rule *rule; struct sss_sudo_rule *rule;
uint32_t i, state = 0; uint32_t i, state = 0;
debug_decl(sudo_sss_lookup, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_lookup, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
/* Fetch list of sudoRole entries that match user and host. */ /* Fetch list of sudoRole entries that match user and host. */
sss_result = sudo_sss_result_get(nss, sudo_user.pw, &state); sss_result = sudo_sss_result_get(nss, sudo_user.pw, &state);
@@ -1103,7 +1103,7 @@ sudo_sss_display_cmnd(struct sudo_nss *nss, struct passwd *pw)
struct sss_sudo_rule *rule; struct sss_sudo_rule *rule;
unsigned int i; unsigned int i;
bool found = false; bool found = false;
debug_decl(sudo_sss_display_cmnd, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_display_cmnd, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (handle == NULL) if (handle == NULL)
goto done; goto done;
@@ -1152,7 +1152,7 @@ sudo_sss_display_defaults(struct sudo_nss *nss, struct passwd *pw,
char *prefix, *val, **val_array = NULL; char *prefix, *val, **val_array = NULL;
unsigned int i, j; unsigned int i, j;
int count = 0; int count = 0;
debug_decl(sudo_sss_display_defaults, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_display_defaults, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (handle == NULL) if (handle == NULL)
goto done; goto done;
@@ -1214,7 +1214,7 @@ static int
sudo_sss_display_bound_defaults(struct sudo_nss *nss, sudo_sss_display_bound_defaults(struct sudo_nss *nss,
struct passwd *pw, struct sudo_lbuf *lbuf) struct passwd *pw, struct sudo_lbuf *lbuf)
{ {
debug_decl(sudo_sss_display_bound_defaults, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_display_bound_defaults, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
debug_return_int(0); debug_return_int(0);
} }
@@ -1224,7 +1224,7 @@ sudo_sss_display_entry_long(struct sudo_sss_handle *handle,
{ {
char **val_array = NULL; char **val_array = NULL;
int count = 0, i; int count = 0, i;
debug_decl(sudo_sss_display_entry_long, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_display_entry_long, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
/* get the RunAsUser Values from the entry */ /* get the RunAsUser Values from the entry */
sudo_lbuf_append(lbuf, " RunAsUsers: "); sudo_lbuf_append(lbuf, " RunAsUsers: ");
@@ -1319,7 +1319,7 @@ sudo_sss_display_entry_short(struct sudo_sss_handle *handle,
{ {
char **val_array = NULL; char **val_array = NULL;
int count = 0, i; int count = 0, i;
debug_decl(sudo_sss_display_entry_short, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_display_entry_short, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
sudo_lbuf_append(lbuf, " ("); sudo_lbuf_append(lbuf, " (");
@@ -1432,7 +1432,7 @@ sudo_sss_display_privs(struct sudo_nss *nss, struct passwd *pw,
struct sss_sudo_result *sss_result = NULL; struct sss_sudo_result *sss_result = NULL;
struct sss_sudo_rule *rule; struct sss_sudo_rule *rule;
unsigned int i, count = 0; unsigned int i, count = 0;
debug_decl(sudo_sss_display_privs, SUDO_DEBUG_SSSD, sudoers_debug_instance); debug_decl(sudo_sss_display_privs, SUDOERS_DEBUG_SSSD, sudoers_debug_instance);
if (handle == NULL) if (handle == NULL)
debug_return_int(-1); debug_return_int(-1);

View File

@@ -80,7 +80,7 @@ sudo_read_nss(void)
bool saw_files = false; bool saw_files = false;
bool got_match = false; bool got_match = false;
static struct sudo_nss_list snl = TAILQ_HEAD_INITIALIZER(snl); static struct sudo_nss_list snl = TAILQ_HEAD_INITIALIZER(snl);
debug_decl(sudo_read_nss, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_read_nss, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if ((fp = fopen(_PATH_NSSWITCH_CONF, "r")) == NULL) if ((fp = fopen(_PATH_NSSWITCH_CONF, "r")) == NULL)
goto nomatch; goto nomatch;
@@ -158,7 +158,7 @@ sudo_read_nss(void)
bool saw_ldap = false; bool saw_ldap = false;
bool got_match = false; bool got_match = false;
static struct sudo_nss_list snl = TAILQ_HEAD_INITIALIZER(snl); static struct sudo_nss_list snl = TAILQ_HEAD_INITIALIZER(snl);
debug_decl(sudo_read_nss, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_read_nss, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
if ((fp = fopen(_PATH_NETSVC_CONF, "r")) == NULL) if ((fp = fopen(_PATH_NETSVC_CONF, "r")) == NULL)
goto nomatch; goto nomatch;
@@ -239,7 +239,7 @@ struct sudo_nss_list *
sudo_read_nss(void) sudo_read_nss(void)
{ {
static struct sudo_nss_list snl = TAILQ_HEAD_INITIALIZER(snl); static struct sudo_nss_list snl = TAILQ_HEAD_INITIALIZER(snl);
debug_decl(sudo_read_nss, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(sudo_read_nss, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
# ifdef HAVE_SSSD # ifdef HAVE_SSSD
TAILQ_INSERT_TAIL(&snl, &sudo_nss_sss, entries); TAILQ_INSERT_TAIL(&snl, &sudo_nss_sss, entries);
@@ -261,7 +261,7 @@ output(const char *buf)
{ {
struct sudo_conv_message msg; struct sudo_conv_message msg;
struct sudo_conv_reply repl; struct sudo_conv_reply repl;
debug_decl(output, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(output, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
/* Call conversation function */ /* Call conversation function */
memset(&msg, 0, sizeof(msg)); memset(&msg, 0, sizeof(msg));
@@ -284,7 +284,7 @@ display_privs(struct sudo_nss_list *snl, struct passwd *pw)
struct sudo_lbuf defs, privs; struct sudo_lbuf defs, privs;
struct stat sb; struct stat sb;
int cols, count, olen; int cols, count, olen;
debug_decl(display_privs, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(display_privs, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
cols = sudo_user.cols; cols = sudo_user.cols;
if (fstat(STDOUT_FILENO, &sb) == 0 && S_ISFIFO(sb.st_mode)) if (fstat(STDOUT_FILENO, &sb) == 0 && S_ISFIFO(sb.st_mode))
@@ -349,7 +349,7 @@ bool
display_cmnd(struct sudo_nss_list *snl, struct passwd *pw) display_cmnd(struct sudo_nss_list *snl, struct passwd *pw)
{ {
struct sudo_nss *nss; struct sudo_nss *nss;
debug_decl(display_cmnd, SUDO_DEBUG_NSS, sudoers_debug_instance) debug_decl(display_cmnd, SUDOERS_DEBUG_NSS, sudoers_debug_instance)
TAILQ_FOREACH(nss, snl, entries) { TAILQ_FOREACH(nss, snl, entries) {
if (nss->display_cmnd(nss, pw) == 0) if (nss->display_cmnd(nss, pw) == 0)

View File

@@ -120,7 +120,7 @@ sudoers_policy_init(void *info, char * const envp[])
volatile int sources = 0; volatile int sources = 0;
struct sudo_nss *nss, *nss_next; struct sudo_nss *nss, *nss_next;
int rval = -1; int rval = -1;
debug_decl(sudoers_policy_init, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_init, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
bindtextdomain("sudoers", LOCALEDIR); bindtextdomain("sudoers", LOCALEDIR);
@@ -225,7 +225,7 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
struct sudo_nss *nss; struct sudo_nss *nss;
int cmnd_status = -1, oldlocale, validated; int cmnd_status = -1, oldlocale, validated;
volatile int rval = true; volatile int rval = true;
debug_decl(sudoers_policy_main, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_policy_main, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
/* Is root even allowed to run sudo? */ /* Is root even allowed to run sudo? */
if (user_uid == 0 && !def_root_sudo) { if (user_uid == 0 && !def_root_sudo) {
@@ -560,7 +560,7 @@ init_vars(char * const envp[])
{ {
char * const * ep; char * const * ep;
bool unknown_user = false; bool unknown_user = false;
debug_decl(init_vars, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(init_vars, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
sudoers_initlocale(setlocale(LC_ALL, NULL), def_sudoers_locale); sudoers_initlocale(setlocale(LC_ALL, NULL), def_sudoers_locale);
@@ -641,7 +641,7 @@ set_cmnd(void)
{ {
int rval = FOUND; int rval = FOUND;
char *path = user_path; char *path = user_path;
debug_decl(set_cmnd, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(set_cmnd, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
/* Allocate user_stat for find_path() and match functions. */ /* Allocate user_stat for find_path() and match functions. */
user_stat = sudo_ecalloc(1, sizeof(struct stat)); user_stat = sudo_ecalloc(1, sizeof(struct stat));
@@ -738,7 +738,7 @@ open_sudoers(const char *sudoers, bool doedit, bool *keepopen)
{ {
struct stat sb; struct stat sb;
FILE *fp = NULL; FILE *fp = NULL;
debug_decl(open_sudoers, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(open_sudoers, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
if (!set_perms(PERM_SUDOERS)) if (!set_perms(PERM_SUDOERS))
debug_return_ptr(NULL); debug_return_ptr(NULL);
@@ -816,7 +816,7 @@ set_loginclass(struct passwd *pw)
const int errflags = SLOG_RAW_MSG; const int errflags = SLOG_RAW_MSG;
login_cap_t *lc; login_cap_t *lc;
bool rval = true; bool rval = true;
debug_decl(set_loginclass, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(set_loginclass, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
if (!def_use_loginclass) if (!def_use_loginclass)
goto done; goto done;
@@ -872,7 +872,7 @@ set_fqdn(void)
{ {
struct addrinfo *res0, hint; struct addrinfo *res0, hint;
char *p; char *p;
debug_decl(set_fqdn, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(set_fqdn, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
memset(&hint, 0, sizeof(hint)); memset(&hint, 0, sizeof(hint));
hint.ai_family = PF_UNSPEC; hint.ai_family = PF_UNSPEC;
@@ -902,7 +902,7 @@ static bool
set_runaspw(const char *user, bool quiet) set_runaspw(const char *user, bool quiet)
{ {
struct passwd *pw = NULL; struct passwd *pw = NULL;
debug_decl(set_runaspw, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(set_runaspw, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
if (*user == '#') { if (*user == '#') {
const char *errstr; const char *errstr;
@@ -933,7 +933,7 @@ static bool
set_runasgr(const char *group, bool quiet) set_runasgr(const char *group, bool quiet)
{ {
struct group *gr = NULL; struct group *gr = NULL;
debug_decl(set_runasgr, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(set_runasgr, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
if (*group == '#') { if (*group == '#') {
const char *errstr; const char *errstr;
@@ -985,7 +985,7 @@ void
sudoers_cleanup(void) sudoers_cleanup(void)
{ {
struct sudo_nss *nss; struct sudo_nss *nss;
debug_decl(sudoers_cleanup, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(sudoers_cleanup, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
if (snl != NULL) { if (snl != NULL) {
TAILQ_FOREACH(nss, snl, entries) { TAILQ_FOREACH(nss, snl, entries) {
@@ -1006,7 +1006,7 @@ resolve_editor(const char *ed, size_t edlen, int nfiles, char **files, int *argc
char *cp, **nargv, *editor, *editor_path = NULL; char *cp, **nargv, *editor, *editor_path = NULL;
int ac, i, nargc; int ac, i, nargc;
bool wasblank; bool wasblank;
debug_decl(resolve_editor, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(resolve_editor, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
/* Note: editor becomes part of argv_out and is not freed. */ /* Note: editor becomes part of argv_out and is not freed. */
editor = sudo_emalloc(edlen + 1); editor = sudo_emalloc(edlen + 1);
@@ -1060,7 +1060,7 @@ find_editor(int nfiles, char **files, int *argc_out, char ***argv_out)
const char *cp, *ep, *editor; const char *cp, *ep, *editor;
char *editor_path = NULL, **ev, *ev0[4]; char *editor_path = NULL, **ev, *ev0[4];
size_t len; size_t len;
debug_decl(find_editor, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(find_editor, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
/* /*
* If any of SUDO_EDITOR, VISUAL or EDITOR are set, choose the first one. * If any of SUDO_EDITOR, VISUAL or EDITOR are set, choose the first one.
@@ -1101,7 +1101,7 @@ create_admin_success_flag(void)
struct stat statbuf; struct stat statbuf;
char flagfile[PATH_MAX]; char flagfile[PATH_MAX];
int fd, n; int fd, n;
debug_decl(create_admin_success_flag, SUDO_DEBUG_PLUGIN, sudoers_debug_instance) debug_decl(create_admin_success_flag, SUDOERS_DEBUG_PLUGIN, sudoers_debug_instance)
/* Check whether the user is in the admin group. */ /* Check whether the user is in the admin group. */
if (!user_in_group(sudo_user.pw, "admin")) if (!user_in_group(sudo_user.pw, "admin"))

View File

@@ -42,8 +42,8 @@
#include "sudo_nss.h" #include "sudo_nss.h"
#include "sudo_plugin.h" #include "sudo_plugin.h"
#include "sudo_conf.h" #include "sudo_conf.h"
#include "sudo_debug.h"
#include "sudo_util.h" #include "sudo_util.h"
#include "sudoers_debug.h"
/* /*
* Password db and supplementary group IDs with associated group names. * Password db and supplementary group IDs with associated group names.

View File

@@ -46,6 +46,30 @@
int sudoers_debug_instance = SUDO_DEBUG_INSTANCE_INITIALIZER; int sudoers_debug_instance = SUDO_DEBUG_INSTANCE_INITIALIZER;
static const char *const sudoers_debug_subsystems[] = {
"main",
"util",
"netif",
"plugin",
"event",
"audit",
"ldap",
"match",
"parser",
"alias",
"defaults",
"auth",
"env",
"logging",
"nss",
"rbtree",
"perms",
"sssd",
NULL
};
#define NUM_SUBSYSTEMS (sizeof(sudoers_debug_subsystems) / sizeof(sudoers_debug_subsystems[0]) - 1)
/* /*
* Parse the "filename flags,..." debug_flags entry and insert a new * Parse the "filename flags,..." debug_flags entry and insert a new
* sudo_debug_file struct into debug_files. * sudo_debug_file struct into debug_files.
@@ -91,8 +115,8 @@ sudoers_debug_register(struct sudo_conf_debug_file_list *debug_files,
/* Setup debugging if indicated. */ /* Setup debugging if indicated. */
if (!TAILQ_EMPTY(debug_files)) { if (!TAILQ_EMPTY(debug_files)) {
if (plugin_path != NULL) { if (plugin_path != NULL) {
sudoers_debug_instance = sudoers_debug_instance = sudo_debug_register(plugin_path,
sudo_debug_register(plugin_path, NULL, 0, debug_files); sudoers_debug_subsystems, NUM_SUBSYSTEMS, debug_files);
} }
TAILQ_FOREACH_SAFE(debug_file, debug_files, entries, debug_next) { TAILQ_FOREACH_SAFE(debug_file, debug_files, entries, debug_next) {
TAILQ_REMOVE(debug_files, debug_file, entries); TAILQ_REMOVE(debug_files, debug_file, entries);

View File

@@ -0,0 +1,47 @@
/*
* Copyright (c) 2014 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
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _SUDOERS_DEBUG_H
#define _SUDOERS_DEBUG_H
#include "sudo_debug.h"
/*
* Sudoers debug subsystems.
* The first five entries must match the sudo front end.
* Note: order must match sudoers_debug_subsystems[]
*/
#define SUDOERS_DEBUG_MAIN ( 1<<16) /* main() */
#define SUDOERS_DEBUG_UTIL ( 2<<16) /* utility functions */
#define SUDOERS_DEBUG_NETIF ( 3<<16) /* network interface functions */
#define SUDOERS_DEBUG_PLUGIN ( 4<<16) /* main plugin functions */
#define SUDOERS_DEBUG_EVENT ( 5<<16) /* event handling */
#define SUDOERS_DEBUG_AUDIT ( 6<<16) /* audit */
#define SUDOERS_DEBUG_LDAP ( 7<<16) /* sudoers LDAP */
#define SUDOERS_DEBUG_MATCH ( 8<<16) /* sudoers matching */
#define SUDOERS_DEBUG_PARSER ( 9<<16) /* sudoers parser */
#define SUDOERS_DEBUG_ALIAS (10<<16) /* sudoers alias functions */
#define SUDOERS_DEBUG_DEFAULTS (11<<16) /* sudoers defaults settings */
#define SUDOERS_DEBUG_AUTH (12<<16) /* authentication functions */
#define SUDOERS_DEBUG_ENV (13<<16) /* environment handling */
#define SUDOERS_DEBUG_LOGGING (14<<16) /* logging functions */
#define SUDOERS_DEBUG_NSS (15<<16) /* network service switch */
#define SUDOERS_DEBUG_RBTREE (16<<16) /* red-black tree functions */
#define SUDOERS_DEBUG_PERMS (17<<16) /* uid/gid swapping functions */
#define SUDOERS_DEBUG_SSSD (18<<16) /* sudoers SSSD */
#define SUDOERS_DEBUG_ALL 0xffff0000 /* all subsystems */
#endif /* _SUDOERS_DEBUG_H */

View File

@@ -124,7 +124,7 @@ main(int argc, char *argv[])
const char *errstr; const char *errstr;
int match, host_match, runas_match, cmnd_match; int match, host_match, runas_match, cmnd_match;
int ch, dflag, exitcode = 0; int ch, dflag, exitcode = 0;
debug_decl(main, SUDO_DEBUG_MAIN, sudoers_debug_instance) debug_decl(main, SUDOERS_DEBUG_MAIN, sudoers_debug_instance)
#if defined(SUDO_DEVEL) && defined(__OpenBSD__) #if defined(SUDO_DEVEL) && defined(__OpenBSD__)
malloc_options = "AFGJPR"; malloc_options = "AFGJPR";
@@ -349,7 +349,7 @@ static void
set_runaspw(const char *user) set_runaspw(const char *user)
{ {
struct passwd *pw = NULL; struct passwd *pw = NULL;
debug_decl(set_runaspw, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(set_runaspw, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (*user == '#') { if (*user == '#') {
const char *errstr; const char *errstr;
@@ -373,7 +373,7 @@ static void
set_runasgr(const char *group) set_runasgr(const char *group)
{ {
struct group *gr = NULL; struct group *gr = NULL;
debug_decl(set_runasgr, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(set_runasgr, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (*group == '#') { if (*group == '#') {
const char *errstr; const char *errstr;
@@ -423,7 +423,7 @@ open_sudoers(const char *sudoers, bool doedit, bool *keepopen)
struct stat sb; struct stat sb;
FILE *fp = NULL; FILE *fp = NULL;
char *sudoers_base; char *sudoers_base;
debug_decl(open_sudoers, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(open_sudoers, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
sudoers_base = strrchr(sudoers, '/'); sudoers_base = strrchr(sudoers, '/');
if (sudoers_base != NULL) if (sudoers_base != NULL)
@@ -480,7 +480,7 @@ void
print_member(struct member *m) print_member(struct member *m)
{ {
struct sudo_command *c; struct sudo_command *c;
debug_decl(print_member, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_member, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (m->negated) if (m->negated)
putchar('!'); putchar('!');
@@ -502,7 +502,7 @@ print_defaults(void)
{ {
struct defaults *d; struct defaults *d;
struct member *m; struct member *m;
debug_decl(print_defaults, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_defaults, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
TAILQ_FOREACH(d, &defaults, entries) { TAILQ_FOREACH(d, &defaults, entries) {
(void) fputs("Defaults", stdout); (void) fputs("Defaults", stdout);
@@ -541,7 +541,7 @@ print_alias(void *v1, void *v2)
struct alias *a = (struct alias *)v1; struct alias *a = (struct alias *)v1;
struct member *m; struct member *m;
struct sudo_command *c; struct sudo_command *c;
debug_decl(print_alias, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_alias, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
switch (a->type) { switch (a->type) {
case HOSTALIAS: case HOSTALIAS:
@@ -580,7 +580,7 @@ print_privilege(struct privilege *priv)
struct cmndspec *cs; struct cmndspec *cs;
struct member *m; struct member *m;
struct cmndtag tags; struct cmndtag tags;
debug_decl(print_privilege, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_privilege, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
TAILQ_FOREACH(m, &priv->hostlist, entries) { TAILQ_FOREACH(m, &priv->hostlist, entries) {
if (m != TAILQ_FIRST(&priv->hostlist)) if (m != TAILQ_FIRST(&priv->hostlist))
@@ -644,7 +644,7 @@ print_userspecs(void)
struct member *m; struct member *m;
struct userspec *us; struct userspec *us;
struct privilege *priv; struct privilege *priv;
debug_decl(print_userspecs, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_userspecs, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
TAILQ_FOREACH(us, &userspecs, entries) { TAILQ_FOREACH(us, &userspecs, entries) {
TAILQ_FOREACH(m, &us->users, entries) { TAILQ_FOREACH(m, &us->users, entries) {
@@ -666,7 +666,7 @@ print_userspecs(void)
void void
dump_sudoers(void) dump_sudoers(void)
{ {
debug_decl(dump_sudoers, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(dump_sudoers, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
print_defaults(); print_defaults();

View File

@@ -70,7 +70,7 @@ static struct timestamp_entry timestamp_key;
static bool static bool
ts_match_record(struct timestamp_entry *key, struct timestamp_entry *entry) ts_match_record(struct timestamp_entry *key, struct timestamp_entry *entry)
{ {
debug_decl(ts_match_record, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(ts_match_record, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (entry->version != key->version) if (entry->version != key->version)
debug_return_bool(false); debug_return_bool(false);
@@ -110,7 +110,7 @@ static bool
ts_find_record(int fd, struct timestamp_entry *key, struct timestamp_entry *entry) ts_find_record(int fd, struct timestamp_entry *key, struct timestamp_entry *entry)
{ {
struct timestamp_entry cur; struct timestamp_entry cur;
debug_decl(ts_find_record, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(ts_find_record, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* /*
* Look for a matching record. * Look for a matching record.
@@ -145,7 +145,7 @@ ts_update_record(int fd, struct timestamp_entry *entry, off_t timestamp_hint)
struct timestamp_entry cur; struct timestamp_entry cur;
ssize_t nwritten; ssize_t nwritten;
off_t old_eof = (off_t)-1; off_t old_eof = (off_t)-1;
debug_decl(ts_update_record, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(ts_update_record, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* First try the hint if one is given. */ /* First try the hint if one is given. */
if (timestamp_hint != (off_t)-1) { if (timestamp_hint != (off_t)-1) {
@@ -215,7 +215,7 @@ ts_mkdirs(char *path, uid_t owner, mode_t mode, mode_t parent_mode, bool quiet)
gid_t parent_gid = 0; gid_t parent_gid = 0;
char *slash = path; char *slash = path;
bool rval = false; bool rval = false;
debug_decl(ts_mkdirs, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(ts_mkdirs, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
while ((slash = strchr(slash + 1, '/')) != NULL) { while ((slash = strchr(slash + 1, '/')) != NULL) {
*slash = '\0'; *slash = '\0';
@@ -265,7 +265,7 @@ ts_secure_dir(char *path, bool make_it, bool quiet)
{ {
struct stat sb; struct stat sb;
bool rval = false; bool rval = false;
debug_decl(ts_secure_dir, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(ts_secure_dir, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO, "checking %s", path); sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO, "checking %s", path);
switch (sudo_secure_dir(path, timestamp_uid, -1, &sb)) { switch (sudo_secure_dir(path, timestamp_uid, -1, &sb)) {
@@ -309,7 +309,7 @@ int
build_timestamp(struct passwd *pw) build_timestamp(struct passwd *pw)
{ {
int len; int len;
debug_decl(build_timestamp, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(build_timestamp, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
len = snprintf(timestamp_file, sizeof(timestamp_file), "%s/%s", len = snprintf(timestamp_file, sizeof(timestamp_file), "%s/%s",
def_timestampdir, user_name); def_timestampdir, user_name);
@@ -333,7 +333,7 @@ update_timestamp(struct passwd *pw)
bool uid_changed = false; bool uid_changed = false;
bool rval = false; bool rval = false;
int fd; int fd;
debug_decl(update_timestamp, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(update_timestamp, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Zero timeout means don't update the time stamp file. */ /* Zero timeout means don't update the time stamp file. */
if (def_timestamp_timeout == 0) if (def_timestamp_timeout == 0)
@@ -382,7 +382,7 @@ timestamp_status(struct passwd *pw)
int status = TS_ERROR; /* assume the worst */ int status = TS_ERROR; /* assume the worst */
struct stat sb; struct stat sb;
int fd = -1; int fd = -1;
debug_decl(timestamp_status, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(timestamp_status, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
/* Reset time stamp offset hint. */ /* Reset time stamp offset hint. */
timestamp_hint = (off_t)-1; timestamp_hint = (off_t)-1;
@@ -533,7 +533,7 @@ remove_timestamp(bool unlink_it)
struct timestamp_entry entry; struct timestamp_entry entry;
bool uid_changed = false; bool uid_changed = false;
int fd = -1; int fd = -1;
debug_decl(remove_timestamp, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(remove_timestamp, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (build_timestamp(NULL) == -1) if (build_timestamp(NULL) == -1)
debug_return; debug_return;
@@ -602,7 +602,7 @@ already_lectured(int unused)
char status_file[PATH_MAX]; char status_file[PATH_MAX];
struct stat sb; struct stat sb;
int len; int len;
debug_decl(already_lectured, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(already_lectured, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
if (ts_secure_dir(def_lecture_status_dir, false, true)) { if (ts_secure_dir(def_lecture_status_dir, false, true)) {
len = snprintf(status_file, sizeof(status_file), "%s/%s", len = snprintf(status_file, sizeof(status_file), "%s/%s",
@@ -626,7 +626,7 @@ set_lectured(void)
char lecture_status[PATH_MAX]; char lecture_status[PATH_MAX];
bool uid_changed = false; bool uid_changed = false;
int len, fd = -1; int len, fd = -1;
debug_decl(set_lectured, SUDO_DEBUG_AUTH, sudoers_debug_instance) debug_decl(set_lectured, SUDOERS_DEBUG_AUTH, sudoers_debug_instance)
len = snprintf(lecture_status, sizeof(lecture_status), "%s/%s", len = snprintf(lecture_status, sizeof(lecture_status), "%s/%s",
def_lecture_status_dir, user_name); def_lecture_status_dir, user_name);

View File

@@ -4030,7 +4030,7 @@ read_dir_files(const char *dirpath, struct path_list ***pathsp)
int max_paths = 32; int max_paths = 32;
struct dirent *dent; struct dirent *dent;
struct path_list **paths = NULL; struct path_list **paths = NULL;
debug_decl(read_dir_files, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(read_dir_files, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
dir = opendir(dirpath); dir = opendir(dirpath);
if (dir == NULL) { if (dir == NULL) {
@@ -4105,7 +4105,7 @@ switch_dir(struct include_stack *stack, char *dirpath)
{ {
struct path_list **paths = NULL; struct path_list **paths = NULL;
int count, i; int count, i;
debug_decl(switch_dir, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(switch_dir, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
count = read_dir_files(dirpath, &paths); count = read_dir_files(dirpath, &paths);
if (count > 0) { if (count > 0) {
@@ -4133,7 +4133,7 @@ void
init_lexer(void) init_lexer(void)
{ {
struct path_list *pl; struct path_list *pl;
debug_decl(init_lexer, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(init_lexer, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
while (idepth) { while (idepth) {
idepth--; idepth--;
@@ -4164,7 +4164,7 @@ _push_include(char *path, bool isdir)
{ {
struct path_list *pl; struct path_list *pl;
FILE *fp; FILE *fp;
debug_decl(_push_include, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(_push_include, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
/* push current state onto stack */ /* push current state onto stack */
if (idepth >= istacksize) { if (idepth >= istacksize) {
@@ -4265,7 +4265,7 @@ pop_include(void)
{ {
struct path_list *pl; struct path_list *pl;
FILE *fp; FILE *fp;
debug_decl(pop_include, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(pop_include, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
if (idepth == 0) if (idepth == 0)
debug_return_bool(false); debug_return_bool(false);
@@ -4307,7 +4307,7 @@ parse_include(char *base)
char *cp, *ep, *path, *pp; char *cp, *ep, *path, *pp;
int dirlen = 0, len = 0, subst = 0; int dirlen = 0, len = 0, subst = 0;
size_t shost_len = 0; size_t shost_len = 0;
debug_decl(parse_include, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(parse_include, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
/* Pull out path from #include line. */ /* Pull out path from #include line. */
cp = base + sizeof("#include"); cp = base + sizeof("#include");
@@ -4390,7 +4390,7 @@ sudoers_trace_print(const char *msg)
/* XXX - assumes a final newline */ /* XXX - assumes a final newline */
if (strchr(msg, '\n') != NULL) if (strchr(msg, '\n') != NULL)
{ {
sudo_debug_printf2(NULL, NULL, 0, SUDO_DEBUG_PARSER|SUDO_DEBUG_DEBUG, sudo_debug_printf2(NULL, NULL, 0, SUDOERS_DEBUG_PARSER|SUDO_DEBUG_DEBUG,
"%s:%d %s", sudoers, sudolineno, lbuf.buf); "%s:%d %s", sudoers, sudolineno, lbuf.buf);
lbuf.len = 0; lbuf.len = 0;
} }

View File

@@ -771,7 +771,7 @@ read_dir_files(const char *dirpath, struct path_list ***pathsp)
int max_paths = 32; int max_paths = 32;
struct dirent *dent; struct dirent *dent;
struct path_list **paths = NULL; struct path_list **paths = NULL;
debug_decl(read_dir_files, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(read_dir_files, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
dir = opendir(dirpath); dir = opendir(dirpath);
if (dir == NULL) { if (dir == NULL) {
@@ -846,7 +846,7 @@ switch_dir(struct include_stack *stack, char *dirpath)
{ {
struct path_list **paths = NULL; struct path_list **paths = NULL;
int count, i; int count, i;
debug_decl(switch_dir, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(switch_dir, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
count = read_dir_files(dirpath, &paths); count = read_dir_files(dirpath, &paths);
if (count > 0) { if (count > 0) {
@@ -874,7 +874,7 @@ void
init_lexer(void) init_lexer(void)
{ {
struct path_list *pl; struct path_list *pl;
debug_decl(init_lexer, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(init_lexer, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
while (idepth) { while (idepth) {
idepth--; idepth--;
@@ -905,7 +905,7 @@ _push_include(char *path, bool isdir)
{ {
struct path_list *pl; struct path_list *pl;
FILE *fp; FILE *fp;
debug_decl(_push_include, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(_push_include, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
/* push current state onto stack */ /* push current state onto stack */
if (idepth >= istacksize) { if (idepth >= istacksize) {
@@ -1006,7 +1006,7 @@ pop_include(void)
{ {
struct path_list *pl; struct path_list *pl;
FILE *fp; FILE *fp;
debug_decl(pop_include, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(pop_include, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
if (idepth == 0) if (idepth == 0)
debug_return_bool(false); debug_return_bool(false);
@@ -1048,7 +1048,7 @@ parse_include(char *base)
char *cp, *ep, *path, *pp; char *cp, *ep, *path, *pp;
int dirlen = 0, len = 0, subst = 0; int dirlen = 0, len = 0, subst = 0;
size_t shost_len = 0; size_t shost_len = 0;
debug_decl(parse_include, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(parse_include, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
/* Pull out path from #include line. */ /* Pull out path from #include line. */
cp = base + sizeof("#include"); cp = base + sizeof("#include");
@@ -1131,7 +1131,7 @@ sudoers_trace_print(const char *msg)
/* XXX - assumes a final newline */ /* XXX - assumes a final newline */
if (strchr(msg, '\n') != NULL) if (strchr(msg, '\n') != NULL)
{ {
sudo_debug_printf2(NULL, NULL, 0, SUDO_DEBUG_PARSER|SUDO_DEBUG_DEBUG, sudo_debug_printf2(NULL, NULL, 0, SUDOERS_DEBUG_PARSER|SUDO_DEBUG_DEBUG,
"%s:%d %s", sudoers, sudolineno, lbuf.buf); "%s:%d %s", sudoers, sudolineno, lbuf.buf);
lbuf.len = 0; lbuf.len = 0;
} }

View File

@@ -61,7 +61,7 @@ fill_txt(const char *src, int len, int olen)
{ {
char *dst; char *dst;
int h; int h;
debug_decl(fill_txt, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(fill_txt, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
dst = olen ? realloc(sudoerslval.string, olen + len + 1) : malloc(len + 1); dst = olen ? realloc(sudoerslval.string, olen + len + 1) : malloc(len + 1);
if (dst == NULL) { if (dst == NULL) {
@@ -96,7 +96,7 @@ bool
append(const char *src, int len) append(const char *src, int len)
{ {
int olen = 0; int olen = 0;
debug_decl(append, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(append, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
if (sudoerslval.string != NULL) if (sudoerslval.string != NULL)
olen = strlen(sudoerslval.string); olen = strlen(sudoerslval.string);
@@ -112,7 +112,7 @@ fill_cmnd(const char *src, int len)
{ {
char *dst; char *dst;
int i; int i;
debug_decl(fill_cmnd, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(fill_cmnd, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
arg_len = arg_size = 0; arg_len = arg_size = 0;
@@ -141,7 +141,7 @@ fill_args(const char *s, int len, int addspace)
{ {
int new_len; int new_len;
char *p; char *p;
debug_decl(fill_args, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(fill_args, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
if (sudoerslval.command.args == NULL) { if (sudoerslval.command.args == NULL) {
addspace = 0; addspace = 0;
@@ -188,7 +188,7 @@ bool
ipv6_valid(const char *s) ipv6_valid(const char *s)
{ {
int nmatch = 0; int nmatch = 0;
debug_decl(ipv6_valid, SUDO_DEBUG_PARSER, sudoers_debug_instance) debug_decl(ipv6_valid, SUDOERS_DEBUG_PARSER, sudoers_debug_instance)
for (; *s != '\0'; s++) { for (; *s != '\0'; s++) {
if (s[0] == ':' && s[1] == ':') { if (s[0] == ':' && s[1] == ':') {

View File

@@ -150,7 +150,7 @@ main(int argc, char *argv[])
int ch, exitcode = 0; int ch, exitcode = 0;
bool quiet, strict, oldperms; bool quiet, strict, oldperms;
const char *export_path; const char *export_path;
debug_decl(main, SUDO_DEBUG_MAIN, sudoers_debug_instance) debug_decl(main, SUDOERS_DEBUG_MAIN, sudoers_debug_instance)
#if defined(SUDO_DEVEL) && defined(__OpenBSD__) #if defined(SUDO_DEVEL) && defined(__OpenBSD__)
{ {
@@ -322,7 +322,7 @@ edit_sudoers(struct sudoersfile *sp, char *editor, char *args, int lineno)
ssize_t nread; /* number of bytes read */ ssize_t nread; /* number of bytes read */
struct stat sb; /* stat buffer */ struct stat sb; /* stat buffer */
bool rval = false; /* return value */ bool rval = false; /* return value */
debug_decl(edit_sudoers, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(edit_sudoers, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (fstat(sp->fd, &sb) == -1) if (fstat(sp->fd, &sb) == -1)
sudo_fatal(U_("unable to stat %s"), sp->path); sudo_fatal(U_("unable to stat %s"), sp->path);
@@ -480,7 +480,7 @@ reparse_sudoers(char *editor, char *args, bool strict, bool quiet)
struct sudoersfile *sp, *last; struct sudoersfile *sp, *last;
FILE *fp; FILE *fp;
int ch; int ch;
debug_decl(reparse_sudoers, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(reparse_sudoers, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* /*
* Parse the edited sudoers files and do sanity checking * Parse the edited sudoers files and do sanity checking
@@ -567,7 +567,7 @@ install_sudoers(struct sudoersfile *sp, bool oldperms)
{ {
struct stat sb; struct stat sb;
bool rval = false; bool rval = false;
debug_decl(install_sudoers, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(install_sudoers, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (!sp->modified) { if (!sp->modified) {
/* /*
@@ -707,7 +707,7 @@ static int
whatnow(void) whatnow(void)
{ {
int choice, c; int choice, c;
debug_decl(whatnow, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(whatnow, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
for (;;) { for (;;) {
(void) fputs(_("What now? "), stdout); (void) fputs(_("What now? "), stdout);
@@ -739,7 +739,7 @@ static void
setup_signals(void) setup_signals(void)
{ {
sigaction_t sa; sigaction_t sa;
debug_decl(setup_signals, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(setup_signals, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* /*
* Setup signal handlers to cleanup nicely. * Setup signal handlers to cleanup nicely.
@@ -761,7 +761,7 @@ run_command(char *path, char **argv)
{ {
int status; int status;
pid_t pid, rv; pid_t pid, rv;
debug_decl(run_command, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(run_command, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
switch (pid = sudo_debug_fork()) { switch (pid = sudo_debug_fork()) {
case -1: case -1:
@@ -791,7 +791,7 @@ check_owner(const char *path, bool quiet)
{ {
struct stat sb; struct stat sb;
bool ok = true; bool ok = true;
debug_decl(check_owner, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(check_owner, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (stat(path, &sb) == 0) { if (stat(path, &sb) == 0) {
if (sb.st_uid != SUDOERS_UID || sb.st_gid != SUDOERS_GID) { if (sb.st_uid != SUDOERS_UID || sb.st_gid != SUDOERS_GID) {
@@ -817,7 +817,7 @@ static bool
check_syntax(char *sudoers_path, bool quiet, bool strict, bool oldperms) check_syntax(char *sudoers_path, bool quiet, bool strict, bool oldperms)
{ {
bool ok = false; bool ok = false;
debug_decl(check_syntax, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(check_syntax, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (strcmp(sudoers_path, "-") == 0) { if (strcmp(sudoers_path, "-") == 0) {
sudoersin = stdin; sudoersin = stdin;
@@ -885,7 +885,7 @@ open_sudoers(const char *path, bool doedit, bool *keepopen)
struct sudoersfile *entry; struct sudoersfile *entry;
FILE *fp; FILE *fp;
int open_flags; int open_flags;
debug_decl(open_sudoers, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(open_sudoers, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (checkonly) if (checkonly)
open_flags = O_RDONLY; open_flags = O_RDONLY;
@@ -934,7 +934,7 @@ static char *
get_editor(char **args) get_editor(char **args)
{ {
char *Editor, *EditorArgs, *EditorPath, *UserEditor, *UserEditorArgs; char *Editor, *EditorArgs, *EditorPath, *UserEditor, *UserEditorArgs;
debug_decl(get_editor, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(get_editor, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* /*
* Check VISUAL and EDITOR environment variables to see which editor * Check VISUAL and EDITOR environment variables to see which editor
@@ -1038,7 +1038,7 @@ static char *
get_args(char *cmnd) get_args(char *cmnd)
{ {
char *args; char *args;
debug_decl(get_args, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(get_args, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
args = cmnd; args = cmnd;
while (*args && !isblank((unsigned char) *args)) while (*args && !isblank((unsigned char) *args))
@@ -1058,7 +1058,7 @@ static void
get_hostname(void) get_hostname(void)
{ {
char *p, thost[HOST_NAME_MAX + 1]; char *p, thost[HOST_NAME_MAX + 1];
debug_decl(get_hostname, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(get_hostname, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (gethostname(thost, sizeof(thost)) != -1) { if (gethostname(thost, sizeof(thost)) != -1) {
thost[sizeof(thost) - 1] = '\0'; thost[sizeof(thost) - 1] = '\0';
@@ -1085,7 +1085,7 @@ alias_remove_recursive(char *name, int type)
struct member *m; struct member *m;
struct alias *a; struct alias *a;
bool rval = true; bool rval = true;
debug_decl(alias_remove_recursive, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(alias_remove_recursive, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
if ((a = alias_remove(name, type)) != NULL) { if ((a = alias_remove(name, type)) != NULL) {
TAILQ_FOREACH(m, &a->members, entries) { TAILQ_FOREACH(m, &a->members, entries) {
@@ -1115,7 +1115,7 @@ check_alias(char *name, int type, int strict, int quiet)
struct member *m; struct member *m;
struct alias *a; struct alias *a;
int errors = 0; int errors = 0;
debug_decl(check_alias, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(check_alias, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
if ((a = alias_get(name, type)) != NULL) { if ((a = alias_get(name, type)) != NULL) {
/* check alias contents */ /* check alias contents */
@@ -1157,7 +1157,7 @@ check_aliases(bool strict, bool quiet)
struct userspec *us; struct userspec *us;
struct defaults *d; struct defaults *d;
int atype, errors = 0; int atype, errors = 0;
debug_decl(check_aliases, SUDO_DEBUG_ALIAS, sudoers_debug_instance) debug_decl(check_aliases, SUDOERS_DEBUG_ALIAS, sudoers_debug_instance)
alias_freelist = rbcreate(alias_compare); alias_freelist = rbcreate(alias_compare);

View File

@@ -162,7 +162,7 @@ static void
print_pair_json(FILE *fp, const char *pre, const char *name, print_pair_json(FILE *fp, const char *pre, const char *name,
const struct json_value *value, const char *post, int indent) const struct json_value *value, const char *post, int indent)
{ {
debug_decl(print_pair_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_pair_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
print_indent(fp, indent); print_indent(fp, indent);
@@ -215,7 +215,7 @@ static void
printstr_json(FILE *fp, const char *pre, const char *str, const char *post, printstr_json(FILE *fp, const char *pre, const char *str, const char *post,
int indent) int indent)
{ {
debug_decl(printstr_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(printstr_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
print_indent(fp, indent); print_indent(fp, indent);
if (pre != NULL) if (pre != NULL)
@@ -239,7 +239,7 @@ print_command_json(FILE *fp, struct member *m, int indent, bool last_one)
struct sudo_command *c = (struct sudo_command *)m->name; struct sudo_command *c = (struct sudo_command *)m->name;
struct json_value value; struct json_value value;
const char *digest_name; const char *digest_name;
debug_decl(print_command_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_command_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
printstr_json(fp, "{", NULL, NULL, indent); printstr_json(fp, "{", NULL, NULL, indent);
if (m->negated || c->digest != NULL) { if (m->negated || c->digest != NULL) {
@@ -362,7 +362,7 @@ print_member_json(FILE *fp, struct member *m, enum word_type word_type,
const char *typestr; const char *typestr;
const char *errstr; const char *errstr;
id_t id; id_t id;
debug_decl(print_member_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_member_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* Most of the time we print a string. */ /* Most of the time we print a string. */
value.type = JSON_STRING; value.type = JSON_STRING;
@@ -494,7 +494,7 @@ print_alias_json(void *v1, void *v2)
struct alias *a = v1; struct alias *a = v1;
struct json_alias_closure *closure = v2; struct json_alias_closure *closure = v2;
struct member *m; struct member *m;
debug_decl(print_alias_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_alias_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (a->type != closure->alias_type) if (a->type != closure->alias_type)
debug_return_int(0); debug_return_int(0);
@@ -527,7 +527,7 @@ static void
print_binding_json(FILE *fp, struct member_list *binding, int type, int indent) print_binding_json(FILE *fp, struct member_list *binding, int type, int indent)
{ {
struct member *m; struct member *m;
debug_decl(print_binding_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_binding_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (TAILQ_EMPTY(binding)) if (TAILQ_EMPTY(binding))
debug_return; debug_return;
@@ -555,7 +555,7 @@ print_defaults_list_json(FILE *fp, struct defaults *def, int indent)
{ {
char savech, *start, *end = def->val; char savech, *start, *end = def->val;
struct json_value value; struct json_value value;
debug_decl(print_defaults_list_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_defaults_list_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
fprintf(fp, "%*s{\n", indent, ""); fprintf(fp, "%*s{\n", indent, "");
indent += 4; indent += 4;
@@ -628,7 +628,7 @@ print_defaults_json(FILE *fp, int indent, bool need_comma)
struct json_value value; struct json_value value;
struct defaults *def, *next; struct defaults *def, *next;
int type; int type;
debug_decl(print_defaults_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_defaults_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (TAILQ_EMPTY(&defaults)) if (TAILQ_EMPTY(&defaults))
debug_return_bool(need_comma); debug_return_bool(need_comma);
@@ -706,7 +706,7 @@ print_aliases_by_type_json(FILE *fp, int alias_type, const char *title,
int indent, bool need_comma) int indent, bool need_comma)
{ {
struct json_alias_closure closure; struct json_alias_closure closure;
debug_decl(print_aliases_by_type_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_aliases_by_type_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
closure.fp = fp; closure.fp = fp;
closure.indent = indent; closure.indent = indent;
@@ -733,7 +733,7 @@ print_aliases_by_type_json(FILE *fp, int alias_type, const char *title,
static bool static bool
print_aliases_json(FILE *fp, int indent, bool need_comma) print_aliases_json(FILE *fp, int indent, bool need_comma)
{ {
debug_decl(print_aliases_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_aliases_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
need_comma = print_aliases_by_type_json(fp, USERALIAS, "User_Aliases", need_comma = print_aliases_by_type_json(fp, USERALIAS, "User_Aliases",
indent, need_comma); indent, need_comma);
@@ -776,7 +776,7 @@ print_cmndspec_json(FILE *fp, struct cmndspec *cs, struct cmndspec **nextp,
struct json_value value; struct json_value value;
struct member *m; struct member *m;
bool last_one; bool last_one;
debug_decl(print_cmndspec_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_cmndspec_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* Open Cmnd_Spec object. */ /* Open Cmnd_Spec object. */
fprintf(fp, "%*s{\n", indent, ""); fprintf(fp, "%*s{\n", indent, "");
@@ -934,7 +934,7 @@ print_userspec_json(FILE *fp, struct userspec *us, int indent)
struct privilege *priv; struct privilege *priv;
struct member *m; struct member *m;
struct cmndspec *cs, *next; struct cmndspec *cs, *next;
debug_decl(print_userspec_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_userspec_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
/* /*
* Each userspec struct may contain multiple privileges for * Each userspec struct may contain multiple privileges for
@@ -988,7 +988,7 @@ static bool
print_userspecs_json(FILE *fp, int indent, bool need_comma) print_userspecs_json(FILE *fp, int indent, bool need_comma)
{ {
struct userspec *us; struct userspec *us;
debug_decl(print_userspecs_json, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(print_userspecs_json, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (TAILQ_EMPTY(&userspecs)) if (TAILQ_EMPTY(&userspecs))
debug_return_bool(need_comma); debug_return_bool(need_comma);
@@ -1015,7 +1015,7 @@ export_sudoers(const char *sudoers_path, const char *export_path,
bool ok = false, need_comma = false; bool ok = false, need_comma = false;
const int indent = 4; const int indent = 4;
FILE *export_fp = stdout; FILE *export_fp = stdout;
debug_decl(export_sudoers, SUDO_DEBUG_UTIL, sudoers_debug_instance) debug_decl(export_sudoers, SUDOERS_DEBUG_UTIL, sudoers_debug_instance)
if (strcmp(sudoers_path, "-") == 0) { if (strcmp(sudoers_path, "-") == 0) {
sudoersin = stdin; sudoersin = stdin;