From: Todd C. Miller Date: Mon, 29 Aug 2011 18:51:12 +0000 (-0400) Subject: Add calls to setprogname() for test programs. X-Git-Tag: SUDO_1_8_3~53^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f478f8406686f21a72cdbe47b7b203e3f4a548bd;p=sudo Add calls to setprogname() for test programs. --- diff --git a/plugins/sudoers/regress/iolog_path/check_iolog_path.c b/plugins/sudoers/regress/iolog_path/check_iolog_path.c index cef22ffab..036d86a71 100644 --- a/plugins/sudoers/regress/iolog_path/check_iolog_path.c +++ b/plugins/sudoers/regress/iolog_path/check_iolog_path.c @@ -105,6 +105,10 @@ main(int argc, char *argv[]) int errors = 0; int tests = 0; +#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME) + setprogname(argc > 0 ? argv[0] : "check_iolog_path"); +#endif + if (argc != 2) usage(); diff --git a/plugins/sudoers/regress/logging/check_wrap.c b/plugins/sudoers/regress/logging/check_wrap.c index 2b904d929..33d7b9ddd 100644 --- a/plugins/sudoers/regress/logging/check_wrap.c +++ b/plugins/sudoers/regress/logging/check_wrap.c @@ -56,6 +56,10 @@ main(int argc, char *argv[]) char *cp, *dash, *line, lines[2][2048]; int which = 0; +#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME) + setprogname(argc > 0 ? argv[0] : "check_wrap"); +#endif + if (argc != 2) usage(); diff --git a/plugins/sudoers/regress/parser/check_addr.c b/plugins/sudoers/regress/parser/check_addr.c index 65f7099bc..b96dec63b 100644 --- a/plugins/sudoers/regress/parser/check_addr.c +++ b/plugins/sudoers/regress/parser/check_addr.c @@ -92,6 +92,10 @@ main(int argc, char *argv[]) size_t len; FILE *fp; +#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME) + setprogname(argc > 0 ? argv[0] : "check_addr"); +#endif + if (argc != 2) usage();