--- embedaddon/sudo/common/regress/sudo_conf/conf_test.c 2013/07/22 00:51:37 1.1.1.1 +++ embedaddon/sudo/common/regress/sudo_conf/conf_test.c 2014/06/15 16:12:54 1.1.1.3 @@ -43,9 +43,12 @@ #include "missing.h" #include "sudo_conf.h" +#include "sudo_util.h" static void sudo_conf_dump(void); +__dso_public int main(int argc, char *argv[]); + /* * Simple test driver for sudo_conf(). * Parses the given configuration file and dumps the resulting @@ -54,8 +57,9 @@ static void sudo_conf_dump(void); int main(int argc, char *argv[]) { + initprogname(argc > 0 ? argv[0] : "conf_test"); if (argc != 2) { - fprintf(stderr, "usage: conf_test conf_file\n"); + fprintf(stderr, "usage: %s conf_file\n", getprogname()); exit(1); } sudo_conf_read(argv[1]); @@ -84,7 +88,7 @@ sudo_conf_dump(void) if (sudo_conf_noexec_path() != NULL) printf("Path noexec %s\n", sudo_conf_noexec_path()); #endif - tq_foreach_fwd(plugins, info) { + TAILQ_FOREACH(info, plugins, entries) { printf("Plugin %s %s", info->symbol_name, info->path); if (info->options) { char * const * op; @@ -93,18 +97,4 @@ sudo_conf_dump(void) } putchar('\n'); } -} - -/* STUB */ -void -warning_set_locale(void) -{ - return; -} - -/* STUB */ -void -warning_restore_locale(void) -{ - return; }